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