1.. _inventek_eswifi_shield:
2
3Inventek es-WIFI Shield
4#######################
5
6Overview
7********
8
9The es-WIFI (embedded Serial-to-WiFi) modules are devices developed by Inventek
10Systems.  It integrates WIFI and optionally Bluetooth Low Energy.  The es-WIFI
11devices can run Cypress WICED or Inventek's IWIN (Inventek Systems Wireless
12Interoperability Network) AT commands set.  The current es-WIFI driver is able
13to use one of two serial interfaces: SPI or UART.
14
15The Zephyr es-WIFI drivers was implemented using ISM43362-M3G-L44 with SPI
16interface.  The UART was implemented with ISM4343-WBM-L151.  Besides that,
17user can reprogram the modules to switch from one interface type to another
18by the JTAG pin header.
19
20
21ISMART4343C-EVB
22===============
23
24The `ISMART4343C-EVB`_ is a development Kit with Arduino Uno R3 compatible
25shield.  It allows evaluate es-WIFI modules with SPI or UART interface.  For
26UART interface the `inventek_eswifi_arduino_uart`_ must be selected.  For
27SPI interface the `inventek_eswifi_arduino_spi`_ must be enabled.  The EVB
28can use 5V from Arduino header, if board provide it, J17 position 1-2.
29Otherwise, J17 2-3 will select USB-5V. More information can be found at
30`ISMART4343C-EVB Users Manual`_.
31
32.. note::
33	The Inventek's EVBs signals are 3.3V only.
34
35.. image:: ismart4343c-evb.jpg
36   :align: center
37   :alt: ISMART4343C-EVB
38
39Pins Assignment of the ISMART EVBs
40==================================
41
42The below table presents signals by interface.  The UART switch SW3 must be on
43position 3 to enable RX/TX signals when using es-WIFI with UART firmware.
44
45To enable full control by Arduino header user should do some manual wiring.
46The signals from D3 up to D7 are not connected by default on the Inventek's
47shield.  These signals marked as optional can help on development. The current
48driver do not handle that signals and are simple suggestions and can be left
49as is.  Some arduino boards don't have NRST pin connected to a GPIO pin.  The
50recommendation is bend the NRST pin and make a wire to D6.  WAKE-UP signal is
51available at header J26 pin 1 and shield configuration uses D7 to control that
52signal, user need do a wire connecting these two terminals.  On the below
53image is possible see suggested wiring connections.
54
55.. image:: ismart4343c-evb-wiring.jpg
56   :align: center
57   :alt: ISMART4343C-EVB Wiring
58
59+-----------------------+-----------+---------------------+
60| Arduino Connector Pin | Function  | Serial Connection   |
61+=======================+===========+=====================+
62| D0                    | UART RX   | UART                |
63+-----------------------+-----------+---------------------+
64| D1                    | UART TX   | UART                |
65+-----------------------+-----------+---------------------+
66| D3                    | CFG-1     | UART/SPI [optional] |
67+-----------------------+-----------+---------------------+
68| D4                    | CFG-0     | UART/SPI [optional] |
69+-----------------------+-----------+---------------------+
70| D5                    | BOOT-0    | UART/SPI [optional] |
71+-----------------------+-----------+---------------------+
72| D6                    | NRST      | UART/SPI [wiring]   |
73+-----------------------+-----------+---------------------+
74| D7                    | WAKE-UP   | UART/SPI [wiring]   |
75+-----------------------+-----------+---------------------+
76| D9                    | CMD/RDY   | SPI                 |
77+-----------------------+-----------+---------------------+
78| D10                   | SPI CS    | SPI                 |
79+-----------------------+-----------+---------------------+
80| D11                   | SPI MOSI  | SPI                 |
81+-----------------------+-----------+---------------------+
82| D12                   | SPI MISO  | SPI                 |
83+-----------------------+-----------+---------------------+
84| D13                   | SPI SCK   | SPI                 |
85+-----------------------+-----------+---------------------+
86
87
88Supported variations
89====================
90
91The below table suggests shield variation accordingly with end user
92application.  When a standard Arduino R3 connector is available on board, user
93should select the matching shield configuration based on the serial interface
94(SERIAL or SPI).  The inventek_eswifi is available to allow users testing a
95built-in module with dedicated <board>.overlay and <board>.defconfig files.
96
97+-----------------------------+---------------------------------+-----------+
98| Connector Standard          | Shield Designation              | Variation |
99+=============================+=================================+===========+
100| Without standard (overlay)  | `inventek_eswifi`_              |     1     |
101+-----------------------------+---------------------------------+-----------+
102| Arduino by UART             | `inventek_eswifi_arduino_uart`_ |     2     |
103+-----------------------------+---------------------------------+-----------+
104| Arduino by SPI              | `inventek_eswifi_arduino_spi`_  |     3     |
105+-----------------------------+---------------------------------+-----------+
106
107Requirements
108************
109
110This shield requires a board which provides a configuration that allows an
111UART or SPI interface and two or three GPIO. (see :ref:`shields` for more
112details).
113
114.. note::
115	Some boards may already have a network interface:  Check network
116	documentation to understand how properly configure both interfaces.
117	To keep simple, you can keep only the WIFI interface enabled at
118	Networking -> Link Layer Options.  This will avoid problems running
119	Zephyr samples.
120
121Tested Boards
122=============
123
124+-----------------------------+------------------------------+-----------+
125| Board                       | Disabled Interface           | Variation |
126+=============================+==============================+===========+
127| ATMEL sam_v71_xult          | Ethernet                     |   2 , 3   |
128+-----------------------------+------------------------------+-----------+
129| ST nucleo_f767zi            | Ethernet                     |   2 , 3   |
130+-----------------------------+------------------------------+-----------+
131| ST disco_l475_iot1          |                              |     -     |
132+-----------------------------+------------------------------+-----------+
133
134.. note::
135	ST disco_l475_iot1 already have an ISM43362 module with IWIN SPI
136	firmware.  It doesn't need this shield to expose es-WIFI.  It is only
137	used here as reference to demonstrate how configure an on-board
138	module.
139
140Sample usage
141************
142
143The reference sample for WIFI is :zephyr:code-sample:`wifi-shell`.  It allows you to use WIFI
144shell to scan local Wireless networks.  With the password you can pick,
145connect and send ping.
146
147Build and Programming
148*********************
149
150Set ``-DSHIELD=<shield designator>`` when you invoke ``west build``.
151
152.. zephyr-app-commands::
153   :zephyr-app: samples/net/wifi
154   :host-os: unix
155   :board: [sam_v71_xult | nucleo_f767zi]
156   :shield: inventek_eswifi_arduino_uart
157   :goals: build flash
158   :compact:
159
160.. zephyr-app-commands::
161   :zephyr-app: samples/net/wifi
162   :host-os: unix
163   :board: [sam_v71_xult | nucleo_f767zi]
164   :shield: inventek_eswifi_arduino_spi
165   :goals: build flash
166   :compact:
167
168.. zephyr-app-commands::
169   :zephyr-app: samples/net/wifi
170   :host-os: unix
171   :board: disco_l475_iot1
172   :goals: build flash
173   :compact:
174
175
176References
177**********
178
179.. target-notes::
180
181.. _ISMART4343C-EVB:
182   https://www.inventeksys.com/ismart4343-c-arduino-shield-wi-fi-2ghz-bluetooth-ble/
183
184.. _ISMART4343C-EVB Users Manual:
185   https://www.inventeksys.com/wp-content/uploads/IoT-EVB-Users-Manual.pdf
186
187.. _inventek_eswifi:
188   https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/shields/inventek_eswifi/inventek_eswifi.overlay
189
190.. _inventek_eswifi_arduino_uart:
191   https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/shields/inventek_eswifi/inventek_eswifi_arduino_uart.overlay
192
193.. _inventek_eswifi_arduino_spi:
194   https://github.com/zephyrproject-rtos/zephyr/blob/master/boards/shields/inventek_eswifi/inventek_eswifi_arduino_spi.overlay
195