Home

Discover Wi-Fi User Manual

image

Contents

1. _ Discover WI FI User Manual se V1 4 Date 12 Dec 2013 Revision history Rev Description By 1 3 20130816 Review and Modifications Ankur Tomar 1 4 20131204 Adding http and https function Huangyin ii Page Contents Section 1 Introguchon nnne nnne nnns snnt essere ns 1 EL D CO E a te en 1 1 2 STIMSZF4ADIS COVER Y KE EE 2 Section 2 Hardware Features 3 21 posre Physical NPIS i SIONS Sn eo ae neo ae cm ro 3 2 2 Board Electrical ChRaracteriSEICS EEN 3 2 5 BOard Techical B 6g 5 10 4 ee M SI ISIN DPI US TAN CRUS 4 ZO el Sere EE 4 2 3 2 Wi Fi Module SING 20 O EE 4 2 3 3 External Interface Pin D tail ones eene dies Eege e 6 Section 3 Quick Start Standalone Mode 8 LN gae X 8 S EE ET s cust Us NUMINI Indiis ENDE mE DE 8 Section 4 Working with STM32F4DISCOVERY enm 11 UE NS CO I 12 HE et VY eS e ret a aa e 12 4 1 2 Turn the System Power OD Sn anne tem d Der bM ote pte cm toto 14 2 SOIN TE 14 oS RUE III HOSE CCl OMY E 15 4 3 TS COS a 16 4 3 2 AP Test Te ONS se a a 21 4 4 HTTP Extended Function WEN 29 22 07 NO RE
2. Join F 4 9 46AM vr EE SN82xx Demo he WiFi STA status WiFi scan and join STA IP Config DHCP Hostname no change erase H Append last 3 bytes of MAC to hostname Configure IP Get IP info 10 Page Section 4 Working with STM32F4DISCOVERY The Discover Wi Fi module provides UART and SPI host interfaces Embest has provided a number of test code examples to help the end user to control the Discover Wi Fi expansion board from the STM32F4DISCOVERY Kit using the UART interface for SPI interfaces users can develop their own solution using the Murata SPI software solution for more information please refer to Discover Wi Fi SN8200 Reference Material SNIC SPI 01 2B091 exe Below is the list of developed main functions for the UART solution i Get Wi Fi Status 1 Wi Fi Scan dic NN 2 Send From Stock Disconnect Wi Fi diode NE UDP Server Wi Fi OFF HTTP get req Wi Fi ON HTTP post req HTTP post Jsonreq HTTP chunked post req HTTPS get req TLS client j TLS server HTTPS server m Show Menu ug Press q to Quit 11 Page 4 1 System Setup 4 1 1 Hardware Setup It s better to have two available boards EVK1 and EVK2 to complete all the tests Here EVK2 will mainly be used as and HTTP or HTTPS server If you do not have another Discover Wi Fi it is possible to setup your local server to finish the test yourself EVK1 Setup v First connect the ST
3. 10 closeSocket Socket 5 closed v The SERVER will acknowledge by displaying received as below v Now press a on the CLIENT STM32F4 Wi Fi side and press 4 on the SERVER computer PC side to send 100 UDP packets to testclient 26 Page UDP send to 172 31 0 1 738 396 544 787 17 15 666 259 954 883 226 v Hyper terminal will display the receving confirmation of 100UDP packets on CLIENT side 27 Page a udpcCreatesSockert Socket 5 opened udpsStartRecy T38 v Once the tests are finished you can press q to terminate the program and the terminal will show as below q Goodbye Embedded World 28 Page 4 4 HTTP Extended Function Note Here we used EVK1 and EVK2 to do the extended function tests EVK2 is mainly used as an HTTP or HTTPS server if you do not have another Discover Wi Fi you can setup your own server to finish the test yourself 4 4 1 HTTP Get If the network has internet access any valid domain name can be used And you only require EVK1 to do this test First connect the EVK1 to the available wireless network You can refer to ection 4 3 1 for the basic connection operation Here we use the Embest network and connect successfully as below 1 Witiscan Embe st CMCC AUTO JUANPI COM PUB Murata W5 417F04 CMCC CMCC AUTO CMCC AUTO weichuang huangteng 360 Z5D0A595 WifiDisconn Enter SSID Embe st Enter Security Mode g 0 for o
4. 51 Page
5. 8B 6C 41 7F 64 Not joined any network Wifi On Wifi Scan Wifi Join Get IF TCF client IGP sever Send from sock Get WiFi status WiFi Leave Clean up Snic and turn off Wifi AP On Off Close socket HTTP get reg HTTP post reg j HITE post Json req HTTP chunked post reg HTTPS get reg ILS client TLS server CHITPS server UDP client code change required UDP server Show Menu Then make the EVK2 join the wireless network in this case Embest 31 Page Embest GHGC GHGC RUTO GHGC RUTO JURMPI COM PUH GHGC GHGC RUTO TP LINK_3F25A8 INTEST Meeting Hoom HPY S WIFI ueichuang JUANPI COM HH 3J6H Z5846F 36H Z5 DAP jJ6H Z58 78 36H ZSBD5E i 1 VW Vi C WW WW WW WW E C db db m W b 6 6 6 6 1 1 1 1 1 1 Enter SSID Embest Enter Security Mode Ce g H for open 2 For WPA TKIP 4 for WPAZ AES 4 Enter Security Key embest Netuork UP Join success TPGonfig OK WiFi On Mac BB6 6B 6C 41 7F 84 Joined SSID Embhest Press the a key on the PC and choose the AP mode AP status AP is OFF AP status AP is OM Press 1 to scan for WiFi networks on EVK1 You can find the EVK1 s AP SSID 32 Page WifisScan Murata W5 417F04 Embe st JUANPI COM PUB CMCC CMCC AUTO CMCC AUTO TP LINE 3F25A8 HPYJ S WIFI JUANPI COM HE weichuang 360 Z2ZSBDSE huangteng 2360 258978 hikvision INTEST Meeting Room CMCC CMCC AUTO S i
6. Power Connection Left DC Power Right USB Power 3 2 First Start up First we need a computer laptop or Smartphone or other equipment with Wi Fi capability Here we are using a smartphone as an example v Stepi Open your WLAN Settings v Step2 You ll find the Murata Wi Fi wireless AP because the Discover Wi Fi module is running in AP mode by default Now Join the network 8 Page 4l 9 38AM COMMON SETTINGS COMPLETE SETTINGS WIRELESS amp NETWORKS 4 Airplane mode A Mobile networks Bluetooth eee More PERSONAL FP 9 42AM SELECT NEARBY WLAN Android Saved secured with WPA WPA2 DIRECT 3M Androic Secured with WPA2 protected network available EmbestWX Saved secured with WPA2 v Step3 Go to the mobile browser of your choice and visit SN8200 com 9 Page F a 9 46AM e ECKE sz E SN82xxDemo C Y E SN82xxDemo C AES mm WiFi STA status iFi dioi STA IP Config WiFi STA status WiFi scan and join STA IP Config an Available WiFi networks WiFi STA Status Please enter password and join a network Status MAC address SSID e In network 00B6C416C00 EmbestWX SSID Channel BSSID Signal dBm RUI Leave EmbestWX Get RSSI Android E FAEC380DAF88 i Join F4EC387BB7DC Join EmbestWX a 8C210AB236D2 E Join TP LINK_9DB6CA 0027199DB6CA Join c Market 8C2104B194B2 Join RUInew BCD1775F6B7C Join bes FAST 5744B6
7. Therefore extra precautions must be taken for ESD electrostatic discharge to make sure that there is no static interference when using this board Appropriate ESD protections must be taken and wearing electrostatic discharge protection equipment is recommended such as an anti Static wristband ESD damage can range from subtle performance degradation to complete device failure Precision IC s may be more susceptible to damage because very small parametric changes could cause the device to fail its defined specifications Warning This is a class B product this product may cause radio interference in which case users may be required to take adequate measures 45 Page Appendix Firmware Update 1 Hardware connection e Power on the STM32DISCOVERY board and DISCOVERY Wi Fi board using the same PC e Jumper settings open the STLINK jumpers on the STM32FDISCOVERY Board ST link connects the Wi Fi board JTAG surface 46 Page 2 Running STM32 ST LINK Utility e Install the STM32 ST LINK Utility_v2 4 0 has been tested on windows XP 32 bit PC WII Frs Utility v2 4 0 Em Setup Launcher e Open STM32 ST LINK Utility 47 Page 09 11 37 Internal command error 09 12 00 Old ST LINK firmware detected Please upgrade it from ST LINK Firmware update menu Connected via SWO Device ID 0x430 Device flash Size 768 Kbytes Device family STM32F 10x XL density Disconnected from device Connection to de
8. WIFI B iziond Project 15 KB v Now build the project by clicking the Build icon highlighted in the image below in IDE or by pressing the F7 function key MAY PETITES Ti FiiSoftware Discover wifi Project F1F1 Demo 27_ 1 701306701 Peg 3 5 BIER OH File Edit View Project Flash Debug roject Ex SIM3SZFA Discowery S User l m A mair c 2 delay c a 5N6200 E A sn8200_hal c LI sn8200_api c l a sno2U0 core c ELE SIM3ZF4dxx StdPeriph Driver ER Zlnise o I ley stmazfdxx gpia c ER Gi stmazf xx rcc c I Gi stmazf4xx_usart c Ca CMSIS L system stm32fixx c EE MDK ARM startup stmacfd0xx s Peripherals Tools SVCS Window Help Private functions fuer brief Main program Mparam Mone Mretwal None int mainivoid sSysTick Configuration DEGU Init l oaMez l API Initi 9z18500 printfi n VrHello Embedded Waorld n printi nier Wifi nisegMo Prince Aye v Make sure the project is built successfully without any errors 14 Page linking Program Size FromELF creating hex file Output DiscoverWIFIl axf O Error s Code 186z 0 RO data 652 RW data 1898z zI dara 3186865 O Warningizsl Once the build has completed successfully download the code into the board by clicking the Download icon highlighted in the image below and wait for the download to finish W G XDiscover Wi FiiSoftwareWiscover wifiiFro
9. bin File size 439297 Bytes Address OxOOO00000 0 2000D188 08000130 00000000 08000130 08000130 08000130 0801F185 08000130 1 f i Ce Size Ox 1000 Data Width 8 bits File SN8200 SNIC UART 02 31311 bin 4 08000151 08000130 00000000 00000000 08000130 08000130 O801F185 08000130 II 19 19 Old ST LINK firmware detected Please upgrade it from ST LINK gt Firmware update menu Connected via SWD Device ID 0x430 19 19 Device flash Size 768 Kbytes 1 19 19 Device family STM32F 10x XL density SN8200 SNIC LIART 02 31311 bin opened successfully 08000130 08000130 00000000 O800FAE9 08000130 08023FF9 0801F185 0801DCD1 Connected via SWD 0800FA05 0800FB25 08000130 0801F185 08000130 08000131 Device ID 0x430 Device Information Device STM32F 10x XL density Device ID 0x430 Revision ID Flash size e You must wait for the programming process to complete Download SN8200 SNIC UART 02 31311 bin Start address OxUS000000 File path E XLIsersszhongms sLresktap sS NBzZDU SMIDC Browse Flash Programming k 0 Reset after programming e The information highlighted below will be displayed upon successful completion of the process 50 Page Seo ei e Memory display Device Information Address Ox08000000 Size x6B401 Data Width 8 bits arget memory Address range 0x08000000 0x0806B40 1
10. h Fo Mi eum e e Ch WR b ds b CO ON b wel Cum Hi Then join it 2 WifiDisconn Enter SSID Murata W5 417F 04 Enter Security Mode e g 0 for open 2 for WPA TKIP 4 for WPA2 AES for WPA MIXED 0 Lr WifiJoin Network Down Network UP Join success 5nicInit SniclIPConfig IPConfig OF Get the EVK1 s IP address 33 Page 3 SniciInit Interface Type 0 SnicGetDhep IP assigned as 172 31 0 3 Then input f to test the http post JSON object Make sure STA is connected to SN8200 soft AP Enter server name CR to accept zn8Z2 00 com Input the server name sn8200 com when required Make sure STA is connected to SNS200 soft AP Enter server name CR to accept 3n6200 com an8200 com Enter URI after the server name CR to accept sws wifi stat Then input sws wifi stat when prompted Enter URI after the server name CR to accept sws wifi stat fsws witil stat Then input Params B 22if 22 3A 22S5ta 22 D amp callback jsonp136335995 0547 when asked you can copy and paste this into the terminal Enter content to POST CR to accept Params tiBt221ft22tsAte2zstate2ztiD amp callback j s0np13633599S0547 Params 7Rt2271ft22t3At225tate2 tT D icallback j s0npl3633599s0547T The information is then displayed as below HTTP RSP code 200 seq 13 Content Length 64 Type application json More data
11. server name for the peer testclient IP peer testclient should start TCP server on port 80 CR to accept 192 168 10 100 152 168 2 121 It will then display the server s content 37 Page HITP RSP code 0 seq HITP more RSP code 200 seq 26 Content Length 47 Type text html lt html gt lt body gt Hello from SN8200 O lt body gt lt html gt Accepted connection from 192 168 2 138 Connection socket 5 248 bytes received from socket 5 POST rest thermostatGetTime HITP 1 1 Host 192 168 2 148 Content Type application x uuu form urlencoded Transfer Encoding chunked Accept text html application xml Accept Lanquage en US LL Immcu serial number_hex 66112233445566778899AA pkt 3 134 bytes sent 46 bytes received from socket 5 28 i amp username Mullsername amp passuord MuPassuord S bytes received from socket 5 iH Socket 5 closed 38 Page 4 4 4 Https Server Client Firstly make the EVK1 and EVK2 join the same wireless network Emhest GHGC CMHCC AUTO GHGC RUTO JURMPI COM PUH CMCC GHGC RUTO TP LINK_3F25A8 INTEST Meeting Hoom HPYJ E WIFI ueichuang JUANPI COM HH j36H Z5846F 36H Z5 DAP J6H Z58 78 36H ZSBD5E CR wl w VW Wi C Q4 WW WW WW E C db db E W b 6 6 6 6 1 1 1 1 1 1 Enter SSID Embest Enter Security Mode Ce g H for open 2 For WPA TKIP 4 for WPAZ AES Z Enter Security Key embest Network UP Join success T
12. DHCP DNS and Web Server e Supports WPA WPA2 PSK security e Wi Fi chipset Broadcom BCM43362 e MCU ST Microelectronics STM32 ARM Cortex M3 e Host Interfaces UART SPI Interface amp Standalone e Other Interfaces GPIO ADC DAC I2C e JTAG Interface for Debugging e Power Options o 5V Power Jack o Mini USB Plug S TIA ZT OVDOD pe M97 c an J CH O1 0 ON Oe W p CO C T 3 GJ e gt a d A d o Z CO en qn E 3 a Figure 1 1 Discover Wi Fi 1 Page 1 2 STM32F4DISCOVERY Kit The STM32F4DISCOVERY is a low cost and easy to use development kit designed to allow quick evaluation and expediate development with an STM32F4 high performance microcontroller It is based on an STM32F407VGT6 and includes an ST LINK V2 embedded debug tool interface ST MEMS digital accelerometer ST MEMS digital microphone audio DAC with integrated class D speaker driver LEDs pushbuttons and a USB OTG micro AB connector For more information please refer to the STMicroelectronics official URL www st com stm32f4 discovery You can purchase this kit from elment14 Order Codes Farnell element14 2009276 Newark 87T3791 Features e STM32F407VGT6 microcontroller featuring 32 a Td ei GK qu bit ARM Cortex M4F core 1 MB Flash 192 KB jS dE D RAM in an LQFP100 package dech e TM e On board ST LINK V2 with selection mode CE ni t switch to use the kit as a standalone STLINK V2 with SWD connecto
13. M32F4DISCOVERY kit to the STM32F4 Discover Wi Fi module using the ST Murata SN8200 WIFI provided DuPont cables For this example we will be using the UART USB to Serial interface between the STM32F4Discovery kit and the Discover Wi Fi module Please refer to Figure 4 2 or refer to the schematic lt WI FI SN8200 schematic pdf PB6 PC10 PB7 PC11 v We also need a Hyper terminal connection between a PC and the STM32F4DISCOVERY kit using RS232 for which we will use a USB to serial converter or you need a TTL to RS232 logic converter if a USB to serial converter is not available Figure 4 1 Connection 12 Page Figure 4 2 Physical Connection USB to serial not included v Connect the USB end of the USB RS232 converter to the computer PC and see if it s installed and detected as a COM port on the computer PC as below the number following COM will vary according to your computer PC configuration here it s COM11 SC Silicon Labs CFP10x USE to UART Bridge CONZT v Now setup a Hyper terminal communication on your computer PC using the settings below Port COMx accordingly Bits 115200 Data bits 8 Parity Check none Stop 1 Data flow control none Note Recommended computer PC configuration 2 0GHz or higher CPU 512MB RAM USB interfaces A serial interface Windows XP or above operating system Pre installed KEIL IDEv4 70 or please follow the below steps to install KEIL IDE Install
14. Poonfig OK WiFi On Mac B6 6B 6C 41 7F 54 Joined SSID Embest 39 Page 1 WifisS5can Embezt CMCC AUTO JUANPI COM PUB Murata W5 4117F 04 CMCC CMCC AUTO CMCC AUTO weichuang huangteng 360 Z5D0AS9 1 D S A aA L H Ch M8 o WifiDisconn Enter SSID Embe st Enter Security Mode f e g 0 for open 2 for WPA TEIP 4 for WPA AES for WPA MIXED 4 Enter Security Fey embestagd WifiJoin 5 F Network Down Network UP Join success Snicinit 5niclIPConfig IPConfig OE https get This example shows how to send a HTTPS get request on a locally setup test HTTPS server In this example EVK2 is setup as a web server and it contains an index html file If you do not have EVK2 you can setup a local web server yourself The HTTPS server contains an index html file Press 3 to get its IP address Interface Type CA STA i AP H IP assigned as 192 168 2 121 Press v to configure the EVK1 as a HTTPS server 40 Page Enter server port number to set lt CR to accept 443 443 Socket 5 opened Turn to EVK2 and input e to connect to the server Input the server s IP address h Enter server name CR to accept 192 168 192 168 2 121ff h Enter server name CR to accept 152 168 192 168 2 121 URI after the server name CR to accept The terminal will then show the server s content HTTP RSP code 200 seq 16 Content Length 47 Type t
15. R CR EE 29 44 2 HTTP Post ei Ce E WEE 30 445 Leg Posty Atto Beie WEE 35 A AE TLS SEVRES an ann be ee nat at nn 39 Section 5 Webserver Customization sise 44 Section 6 Safety Instructions nsc 45 Appendix Firmware Update ss 46 1 Hardware connection EE 46 2 RUNNING STM32 ST LINK UUV EN 47 iil Page Section 1 Introduction The Discover Wi Fi is a low power self contained certified Wi Fi network controller module that provides simple serial to Wi Fi connectivity to the internet and enables wireless connectivity to the STM32F4DISCOVERY kit a very flexible development kit based on STM32F4 high performance microcontroller from STMicroelectronics The Discover Wi Fi board connects to the STM32F4DISCOVERY kit using a serial host interface UART OR SPI it can also be used as a standalone Wi Fi station or network controller It can be used to enable wireless connectivity to the simplest products with minimal engineering resources 1 1 Discover Wi Fi The Discover Wi Fi board a product designed by Embest is based on Muratas SN8200 Wi Fi Network Controller module The board design provides an easier connection to the STM32F4 Discovery kit and supports more overall software features through UART Software demos are provided including EZ Web Wizard solution to help give users a quick and easy transition to wireless connectivity Board Features e 2 4GHz IEEE 802 11b g n e Supports AP STA Dual mode e Built in TCP IP Stack HTTP
16. T 3M Androic Secured with WPA2 protected network available Bluetooth EmbestWX Saved secured with WPA2 More PERSONAL o Step3 Go to the mobile browser of your choice and visit SN8200 com 22 Page Aa 9 46AM 5 8 F a 9 46AM vy EEIsn82xxDemo C vy EEIsn82xxDemo C WiFi STA status iFi ioi STA IP Confi WiFi STA status WiFiscan and loin STAIP Config E Wiriscanand join LLL LLL Available WiFi networks WiFi STA Status Please enter password and join a network Status MAC address SSID In network 000B6C416C00 EmbestWX SSID Channel BSSID SignaldBm Password RUI Join 6 FAEC380DAF88 999 Leave EmbestWX Get RSSI Android 6 F4EC387BB7DC 999 Join EmbestWX 6 8C210AB236D2 999 Join 999 TP LINK 9DB6CA 11 0027199DB6CA Join Market 8C210AB194B2 Join RUInew BCD1775F6B7C Join ES _ FAST_5744B6 6 0C722C5744B6 4 9 46AM vy EISN82xx Demo C WiFi STA status WiFi scan and join STA IP Config DHCP Static IP Hostname no change erase Append last 3 bytes of MAC to hostname Configure IP Get IP info 23 Page UDP Testing STM32F4DISCOVERY Kit Discover Wi Fi Work as CLIENT COMDULGI PG EEE CE Work as SERVER v Make sure the Discover Wi Fi module is in AP mode now press 3 to get the assigned IP address v Connect the computer PC to the Murat
17. a Wi Fi AP and get the IP address 172 31 0 3 in this case soft Windows XP Ci 5 1 2600 cc gt EPT 1985 2081 Microsoft Corp C Documents and Settings abc gt ipconf ig Windows IP Configuration DE Ethernet adapter EN AX EXER Connection specific DHS Suffix IP Address e E sme Subnet Mask 255 255 686 868 Default Gateway 172 31 4 1 CC Documents and Settings abc v On the PC first run the testserver application Setup_server exe or testserver exe and setup the computer PC as a UDP SERVER by selecting option 3 from the menu 24 Page iG Discover Ui F1iSoftuaretestserver exe 172 431 8 3 2222 TCP client 1 TCP server 2 Send From sock 3 UDP server 4 UDP send to soft AP iq Quit G Program Files Murata testserver testserver exe 172 31 0 3 2222 A TCP client 1 TCP server 2 Send from sock 3 UDP server 4 UDP send to soft AP v Setup the STM32F4 Wi Fi as UDP CLIENT by selecting 9 from the main Menu on Hyper terminal you will be displayed with the SERVER IP address and port number Enter server IP to connect v After that the CLIENT will send 10 UDP packets to the SERVER 25 Page Send 10 ndpsendFromock ol udpsendFromsock 1 2 udpSendFromSeck d 3 udp5endFrom5ock C ME udp5SendFroms5ock r 5 ndpsSendFromsock ndpsendFromock T 6 ndpsendFromsock 8 9 ur udpSendFromsSeck
18. address Interface Type BH STA i P H IP assigned as 192 168 2 121 Press 5 and input the port number 80 Then EVK1 will be configured as an Http server Enter server port number to set CCR to accept 8H Hu Socket 4 opened Turn to EVK1 and input e to connect to the server Input the server s IP address 36 Page Enter server name CR to accept www murata ws 192 168 2 121 Enter server name CR to accept www murata ws 1927 168 2 121 Enter URI after the server name CR to accept Input abcd Enter server name CR to accept www mrata ws 1927 168 2 121 Enter URI after the server name CR to accept f Enter content to POST Then the terminal will show the server s content HTTP RSP code 200 seq 7 Content Length 47 Type text html More data no Content lt html gt lt body gt Hello from SN8200 O lt body gt lt html gt And the server EVK2 will display the client s information Accepted connection from 192 168 2 122 Connection socket 5 112 bytes received from socket 5 POST HIT Bet 7 Host 192 168 2 121 Content Length 4 Content Type text html Accept Language en US labcdpkt 24 134 bytes sent Http chunked post This example shows how to post bigger data with chunk encoding After you finished the Http Post you can Choose g on EVK2 to test the http chunked post and input the server s IP address q Enter
19. ect to the TCP server created on computer PC Please follow the below steps to setup the SERVER and the CLIENT o On the PC first run the testserver application testserver exe location Discover Wi Fi Software iG Discover Wi Fi Softuaretestserver exe 192 168 2 158 1234 H TCP client i TCP server 2 Send from sock 3 UDP server 4 UDF send to soft AP 1 TCP server 2 Send from sock 3 UDP server 4 UDP send to soft AP o Press 1 on the PC to set the PC as a TCP SERVER Trying to create a socket and accept incoming connections Socket listening on port Hxdd2 TGP client TCP server Send from sock UDP server UDP send to soft AP o Now on Hyper terminal set the STM32F4 WI FI module as a TCP CLIENT by pressing 4 from the main Menu Hyper terminal will display a message of opening Socket 4 Now enter the SERVER IP address computer PC and the SERVER port number E tcpcCreateSocket Socket 4 opened Enter server IP to connect 19 Page o Now the socket connection if UP o The PC test server will display a message as below Connection accepted Socket 1 will be used to send data o The connection has been created and we can now use Socket 1 to send data o On the STM32F4 Wi Fi module CLIENT press 6 Here we can set Socket 4 to send data o Choose the default 0 o 128bytes will be sent as default and the SERVER will display that the data has be
20. en received Recu 128 o Let s change the direction now the SERVER will send the data to the CLIENT o Press 2 on the SERVER window 20 Page Connection accepted Socket 1 will be used to send data Hecu 128 Trying to send 200 bytes from socket 1 Butes sent 26H ICF client TGP server Send from sock UDP server UDP send to soft AP o The SERVER has sent 200 bytes of data as default and the CLIENT displays a notice indicating that it has received the data 200 bytes received from socket 4 Note Similar steps can be done in the opposite direction 1 Create a TCP SERVER on the STM32 WI FI module 2 Create a TCP CLIENT on PC and connect to the TCP server on STM32 3 Send data back and forth 4 3 2 AP Test Functions Basic AP Function Y The Discover Wi Fi module is in AP mode as default but you can press 8 to change its state B8 AFP status AP is OFF 8 AP status AP is ON 21 Page v The ON OFF state of AP mode can be tested by using another Wi Fi device here we are using a smartphone to do so o Stepi Open your WLAN Settings o Step2 You ll find the Murata Wi Fi wireless AP because the Discover Wi Fi module is running in AP mode by default Now Join the network 3 EC 9 38AM Zn 5 fF 9 42AM COMMON SETTINGS COMPLETE SETTINGS WIRELESS amp NETWORKS SELECT NEARBY WLAN AX Airplane mode Android Saved secured with WPA WPA2 ei D Mobile networks DIREC
21. ext html More dat a nag Content lt html gt lt body gt Hello from SN8200 3 lt body gt lt html gt And the EVK2 will display the HTTPS client s information Accepted connection from 192 168 2 122 Connection socket 6 39 bytes received from socket 6 GET e HIT Bet 7 Host 192 168 2 121 pkt 4 134 bytes sent Socket 6 closed TLS client test This example shows how to create a TLS socket connect to a TLS server socket send and receive data When connecting to port 443 it is similar to the HTTPS get above An HTTPS server is running on EVK2 with index html contained Input i on EVK1 to connect to the HTTP server and choose port 443 i tepCreatesSocket socket 4 opened Enter server IP to connect 192 168 2 121 Enter server port number 443g Then the terminal will show the connect information 41 Page tepConnectToserver Socket connection UP sendFromsSock pkt 1 58 bytes sent 134 bytes received from socket 4 HITP 1 1 200 OK Content Type text html Connection close Content Length 47 xhtml body Hello from SN8200 4 lt body gt lt html gt clogsesocket Socket 4 closed Socket closed And the EVK2 will show the client s information Accepted connection from 172 168 2 122 Connection socket 6 58 bytes received from socket 6 GET HITP 1 1 Host 192 168 2 125 Accept text html mkt 5 134 bytes sent Socket 6 closed TLS server
22. ile Click the icon as shown in the following image and load the SN8200 SNIC UART 03 37191 bin file SS STM32 ST LINK Utility File View Target ST LINK Help Sad gi Memory display Device Information a eee eeng E uH Device STM32F 10x XL density ress OxO08000000 Size 0x 1000 Data Width 8 bits k Device ID 0x430 Revision ID Rev A Flash size Kbvtes 765 A 8 C ASCII Address 0 0x08000000 20003DC8 08000151 08000130 08000141 Q 0 A 0x08000010 08000130 08000130 08000130 00000000 10 0 0 0x08000020 00000000 00000000 00000000 08001931 1 0x08000050 08000130 00000000 08001A15 08001A51 0 Q 0x08000040 08000130 08000130 08000130 08000130 0 0 0 0 0x08000050 08000130 08000130 0800B 7D9 08000130 0 0 77 0 0x08000060 08000130 08000130 08000130 08000130 0 0 0 0 0x08000070 08000130 08000130 08000130 08000130 0 0 0 0 4 n fos 19 Old ST LINK firmware detected E Please upgrade it from ST LINK gt Firmware update menu e Once loading is complete you can program the device by clicking the icon 49 Page that is highlighted in the following image 8 STM32 ST LINK Utility File View Target ST LINK Help wii Memory display Address Ox08000000 Device Memory 0x08000000 5N8200 SNIC UART 02 31311
23. ject i iFi_Deso ERREUR gd 14 MAIER File Edit View Project Flash Debug 3 3 STNS2F4 Di sceovery ELE User RES main c i t delay c sHaz EI sn8200_hal c EI sn8200_api c sn core c SIM3ZFdxx StdPeriph Driver misc c t Br Peripherals Tools Window Help Private functions jue brief Main program Mparam None Mretval None ay int mainiwoid SysTick Configuration a stmi f4xx gpia c e stm3Zfdxx rec c aks stmazfixx usart c EE CMSIS SES system stm32fixx c EE MDK ARM startup ztm3zfd xx s DEGU Init a a 0 0 ee printf n rHello printf nye aWG200 API Init 921600 Embedded World n WifioOni sedgNocT printfi nWXr v Once the code is downloaded into the board it will be verified and you should see the below screen Load Gi Discover wifiiiProjectii WiFi Demo V2 1 20130620 MDE ARM Output DiscoverWIFI axt Erase Done Progranming Done Verify OR 4 3 Running Test Functions Note This demo demonstrates all the available testing functions so please follow as per the provided instructions below Once the sample code is downloaded into the board as described in Section 4 2 please RESET the STM32FADISCOVERY Kit Upon RESET you should see the below message on your Hyper Terminal screen zc CONI1 PuTTI 15 Page The compete testing process is divided into two sections STA and AP You can press m anytime t
24. no Content J5s0n0p1363359950547 A Ae 8 2 mac O00RB6C41TFO4 ssid FEmbest The response contains a JSON object showing EVK2 s STA interface is connected to an AP named Embest 34 Page 4 4 3 Http Post Http Chunked Post Http post If the network has internet access any valid domain name can be used In this example EVK2 is setup as a web server and it contains an index html file If you do not have EVK2 you can setup a local web server yourself Firstly make the EVK1 and EVK2 join the same wireless network Embest CACC GHGC RUTO GHGC RUTO JURMPI COM PUB GHGC GHGC RUTO TP LIMNK_3F25A8 INTEST Meeting Hoom HPY I S WIFI we ichuang JUANPI COM HH 36H Z5846F 36H Z5 DAP J6H Z58 78 36H ZSBD5E om s VW Vi C Q4 WW WW WW E C db d E W b 6 6 6 6 1 1 1 1 1 1 Enter SSID Embest Enter Security Mode Ce g H for open 2 For WPA TKIP 4 for WPAZ AES 4 Enter Security Key embest Netuork UP Join success TPGonfig OK WiFi On Mac BB IBR6C0 41 7F 64 Joined SSID Embest 35 Page 1 WifisS5can Embezt CMCC AUTO JUANPI COM PUB Murata W5 417F04 CMCC CMCC AUTO CMCC AUTO weichuang huangteng 360 Z5D0AS9 Enter SSID Embe st Enter Security Mode f e g 0 for open 2 for WPA TEIP 4 for WPAZ2 AES 6 for WPA MIXED 4 Enter Security Fey Join success 5nicInit 5niclIPConfig IPConfig OE On EVK2 press 3 to get its IP
25. o go back to the menu Get WiFi status Wifi Scan Wifi Join Get IP TCP client TCP sever send from sock WiFi Leave AP On Off UDP client UDP server Wifi Off Wifi On HTTP get reg HITP post req HIIP post Json req HTTP chunked post req HITPS get reg ILS client ILS server HIIBS server Show Menu Dress q to Quit On On b t hh oe OH Lu 4 3 1 STA Test Functions Basic Functions v First press 0 the STM32F4 will show its Wi Fi status on Hyper Terminal as below SG COM11 PaTIT Get WiFi status Wifi Scan Wifi Join Get IP TCP client ICP sever Send from sock WiFi Leave AP On Off UDP client UDP server Wifi Off Wifi On Show Menu press gq to Quit sel Cu CH ee L BO k CO gp Lo co m E GetStatus WiFi On Mac 00 0B 6C F4 10 E0 Not joined any network 16 Page GetStatus WiFi On Mac 00 0B 6C F4 10 E0 v Now by pressing 1 Wi Fi Scan you can scan all the available wireless networks The terminal will display the scanned wireless networks 1 Wifiscan liaops Embe st INTEST Meeting Room juanpi com hr CMCC CMCC AUTO juanpi com pro brainaire CMCC AUTO CMCC juanpi com pub Ca ee WOW Hs W ous CD WW e v Then pressing 2 Wi Fi Join to join the selected Wi Fi network here we will choose the Embest network and select between WPA or WPA 2 security by pressing 2 or 4 and then enter the security key to join the ne
26. ower e Operating Temperature 0 70 C e Power Consumption around 2 5 W 3 Page 2 3 Board Technical Description External interface CSC6C CBCIC3C4 AURATA RUE ue d m Jg JL JF JPRTIRSPTE Power module b R12RIIRS Main module SNE 200 Pda en Jos 84 ropuuDu y P Oo Ve c o Lal L d a o i ie P6 Ul Figure 2 2 Discover Wi Fi Hardware 2 3 1 Block Description Wi Fi Module SN8200 Wi Fi module Power Section J1 J4 The board is powered by Mini USB or 5V 2A DC Switch and LEDs One reset switch and two signal LEDs External Interface o JTAG interface J3 Standard 20 pin interface used for Module Firmware Loading o User interface J6 External interface for users 2 3 2 Wi Fi Module SN8200 Features 2 4GHz IEEE 802 11b g n Radio Technology Wi Fi Chip Broadcom BCM43362 MCU STM32 ARM Cortex M3 Dimensions 30 5 x 19 4 x 2 8 mm Package LGA On Board Antenna Max Receive Sensitivity 96dbm b mode 11Mbps Transmit Power 18 dBm Host Interfaces UART amp SPI Other Interfaces ADC DAC I2C GPIO Operating Temperature Range 309C to 85 C ROHS Compliant FCC IC certified CE compliant PN 88 00151 00 EVK SDK P N 88 00151 85 4 Page Competitive Advantages O O O O O 5 CE Certified TCXO XTAL that supports extended product life Wide Link Budget up to 113 dB Easy software integration AP STA dual mode Built in Wi Fi security s
27. p alive Accept L User Agent Mozilla 5 0 128 bytes received from GET favicon ico HITP 1 Host 192 168 2 122 Connection keep alive Accept User Agent Mozilla 5 0 Windows socket 5 1 Windows socket 5 1 Windows socket 5 1 Windows socket 5 1 Windows socket 5 1 Windows Ap sendFromSock Ap sendFromS5ock Ap sendFromSock Ap sendFromSock Ap sendFromsock Ap sendFromsock on EVK2 and input the server s IP address and port number Then the EVK1 will be configured as a TLS client 43 Page Section 5 Webserver Customization zap ZOU WiFi STA web server TCP IP WiFi n a I F control I F L GAN WEI IF Pe ripherals WiFi soft AP WiFi of Ethernet I F web server TCP IP WiFi hs HTTP client2 HTTP client J WIFII F to i Fi sot AP Network chent2 for peripheral control Network client1 for configuration and peripheral control Figure 4 4 EZ Web Wizzard Solution Developers can develop their own firmware including webserver contents based on Murata EZ Web Wizzard Solution Murata EZ Web Wizzard EWW software Supports easy custom web based control to save cost on additional host microcontrollers For more information please refer to the URL below http www murata ws com sn8200 htm 44 Page Section 6 Safety Instructions Please note that the Discover Wi Fi board is supplied without any casing box all the components are exposed
28. pen 2 for WPA TEIP 4 for WPA2 AES E for WPAZ MIXED 4 Enter Security Key embesrtagd WifiJoin Network Down Network UP Join success 5nicInit 5niclIPConfig IPConfig DF 29 Page Press d and input the server name You can input any server address here we have used www murata ws com as an example d Enter server name www murata ws com www Imurata waz com d Enter server name www murata ws com www muratna ws com Enter URI after the server name CR to accept d The terminal will then display the websites source code as below HTTP RSP code 400 seq 4 Content Length 332 Type text html charset a no Content X DOCTYPE HTML PUBLIC IETF DID HTML 2 0 EN lt html gt lt head gt lt tit title gt lt fhead gt lt body gt lt body gt lt html gt HITP RSP indication seq 6 content length 0 More data no Content 4 4 2 HTTP Post JSON Object This test is to demonstrate communication with a SN82xx soft AP via JSON object which requires two SN82xx EVKs EVK2 starts as a soft AP SSID Murata WS 417171 and EVK1 s STA interface joins the soft AP EVK1 then queries for EVK2 s STA status On EVK2 s host PC 1 Windows command prompt run following Testclient lt COM port gt In our case the command is Ge Program Files Murata Testclienttestclient exe 11 The following menu should be displayed 30 Page IG gt testclient exe 11 WiFi On Mac 68
29. r for nee E E ai eds programming and debugging NE fai e A dit Er e e Board power supply through USB bus or from delt E de 9 ras an external 5 V supply voltage External application power supply 3V amp 5V mi nenn eoo e LIS302DL ST MEMS motion sensor 3 axis KL EE EN Reger Bo digital output accelerometer B e MP45DTO2 ST MEMS audio sensor omni directional digital microphone SEA e CS43L22 audio DAC with integrated class D oyi ce d oe o i speaker driver Lie E at of e Eight LEDs UU rca gg o LD1 red green for USB communication LD2 red for 3 3 V power 4 user LEDs LD3 orange LD4 Figure 1 2 STM32F4DISCOVERY Kit green LD5 red and LD6 blue o 2 USB OTG LEDs LD7 green VBus and LD8 red over current wor UE EX LE E CES e T umi EE CH on Bai P mm ibit iti e Two push buttons user and reset e USB OTG FS with micro AB connector e Extension header for all LQFP100 I Os for quick connection to prototyping board and easy probing 2 Page Section 2 Hardware Features 2 1 Board Physical Dimensions 9 337 Imm 5C C7C8C1C3C4 MURATA SN8200 WIFI Embest y Ma Sel i R3 po 2222 J DNA CI R R R R R R L C12 C10 C14 Bee Klee Em 1 R12R1 i Figure 2 1 DISCOVER WI FI PCB e Size 69mmx44mm e Board layers 4 e Board thickness 1 6mm 2 2 Board Electrical Characteristics e Power 5V 2A or Mini USB p
30. test This example shows how to create a bound TLS socket and listen on a port When listening to port 443 it is actually a HTTPS server Press 3 to get the EVK1 s IP address Interface Type 0 STA 1 AP 0 SnicGetDhep IP assigned as 1927 1668 2 12 Wait Then press j to configure the EVK1 as a TLS server Set the port number as 443 j Enter server port number to set Enter server port number to set 443 tcpCreareSockert Socket 4 opened tepCreateConnection 42 Page Then test the TLS server WW Press 192 168 2 122 443 Enter server IF to connect Enter server port number lt CR to accept 172 168 18 181 gt CCR to accept 4435 Then the server will display the client s information Accepted connection from 192 168 Connection socket 5 128 bytes received from GET favicon ico HITP 1 Host 192 168 2 122 Connection keep alive Accept w User Agent Mozilla 5 0 128 bytes received from GET favicon ico HITP 1 Host 192 168 2 122 Connection keep alive Accept User Agent Mozilla s 0 128 bytes received from GET favicon ico HITP 1 Host 192 168 2 122 Connection keep alive Accept User Agent Mozilla 5 0 128 bytes received from GET favicon ico HIIP 1 Host 192 168 2 122 Connection keep alive Accept User Agent Mozilla 5 0 128 bytes received from GET favicon ico HITP 1 Host 192 168 2 122 Connection kee
31. the Setup server exe or testserver exe and the Setup client exe or testclient exe can be founder under Discover wifi V2 software EVK2 Setup You need to connect the PC and a second ST Murata Wi Fi module via UART refer to the schematic WI FI SN8200 schematic pdf or the footprint You need a TTL to RS232 transfer module and here we will use a USB to serial module to setup serial communication Connect the module to your PC using the USB to serial cable a serial port should be detected on your PC which can be checked under the PC s Device Manager COMxx as below here its detected as COM11 eye g tpm a vee E Silicon Labs CF210x USB to UART Bridge COM11 Tea dr rt ILL L Ven mm Then open your Hyper terminal on the PC and setup as per the below settings Port COMxx Bits 115200 Data bits 8 Parity Check None Stop 1 Data flow control None 13 Page 4 1 2 Turn the System Power ON Turn the system power ON for the STM32F4DISCOVERY kit and Discover Wi Fi board e STM32F4DISCOVERY Kit Connect the MicroUSB cable between STM32F4DISCOVERY Kit USB port CN5 and computer PC USB port e Discover Wi Fi Board You can use either MiniUSB cable or 5V 2A DC to power ON the Wi Fi module please refer to Section 3 1 4 2 Software Setup v First open the Sample Project in KEIL MDK ARM IDE location software ST Discovery Wifi Project WiFi_Demo_V2 2_20130620 MDK ARM Discover
32. twork 2 WifiDisconn Enter SSID Embest Enter Security Mode e g 0 for open 2 for WPA TEIP 4 for WPA2 AES 4 Enter Security Key v Once the network is joined terminal will display the successful network joined status WifiJoin Network UP Join success Snicinit 5niclIPConfig IPConfig OF 17 Page v Now you can again verify the Wi Fi connection status by pressing 0 It will show the joined wireless network 0 Get5tatus WiFi On Mac 00 0B 6C F4 10 E0 Joined SSID Embest v To discover the assigned IP address and STA mode press 3 the assigned IP address in this case is 192 168 2 125 3 SniciInit Interface Type 0 Interface Type 0 0 5nicGetDhcp IP assigned as 192 168 2 1 TCP Testing STM32F4DISCOVERY Kit gt gt Discover Wi Fi Works as a CLIENT COM DULG EE Works as a SERVER Y Connect your computer PC to the same wireless network Embest in this case and get your IP address 192 168 2 158 cy C FINDOTS systeas iced exe Microsoft Windows XP Rz 5 1 2600 CH ARAYA 1985 2001 Microsoft Corp C Documents and Settings abc gt ipconfig Windows IP Configuration Ethernet adapter LIRE Connection specific DNS Suffix IP Address KKK m bI Subnet Mask e E 255 255 255 H Default Gateway a a a xU C Documents and Settings abc gt 18 Page v Now setup a TCP client on the STM32F4 WI FI and conn
33. upport for WPA PSK WPA2 PSK Built in TCP IP stack Built in DHCP DNS Built in HTTP server for AP mode Simple integration interface Serial Network Interface SNIC support socket interface SN8200 Block Diagram SN8200 STA Mode Figure 2 4 SN8200 Diagram 5 Page 2 3 3 External Interface Pin Detail Table2 1 External Interface Pin Functions J3 J6 PINS 1 3 11 13 IK 17 19 11 13 15 17 19 Function VCC MCU SPI_MISO JRTST JTMS JTCK SPI_SCK JTDO RST_N_SW VCC MCU UART_RX UART_TX UART_RTX UART_CTS GND LED net RST_N_SW Interrupt WAKER UP PINS 2 14 16 18 20 10 12 14 16 18 20 Function VCC MCU GND GND GND GND GND GND GND GND GND VCC MCU SPI1 MOSI SPI1 SCK SPI1 NSS SPI1 MISO GND SPI3 SCK JTDO SPI3 MOSI LED ready SPI3 MISO JRTST SPI3 NSS JTDI 6 Page VCC MCU SEI MOSI SPII SCK SPI NSS SPI MISO GND SPI SCK JTDO SPI MOSI LED ready SPL MISO JRTST SPI NSS JTDI SPI SCKJTDO QUT JTAG Figure 2 3 External Interface Schematic 7 Page Section 3 Quick Start Standalone Mode 3 1 Powering ON The Discover Wi Fi board can be powered using a 5V 2A DC power adapter OR Mini USB power supply please set jumper J5 appropriately in accordance with the chosen power supply DC or USB Once the board is powered ON by default it will go into AP mode Figure 3 1
34. vice is lost e Connect the board Data Width 8bits i I Binary d memory SE range Toxoaon0000 0x0800 1000 137 Internal command error 00 Old ST LINK firmware detected Please upgrade it from ST LINK gt Firmware update menu 00 Connected via SWD 00 Device ID 0x430 100 Device flash Size 768 Kbytes D0 Device family STM32F 10x XL density Disconnected from device Connection to device is lost e Click the icon highlighted in the image above and if properly connected the following will be displayed 48 Page SS STM32 CT UNK Utility Ele View Target ST LINK Help Sad eu Memory display Address Ox08000000 w Size Device Memory 0x08000000 Address 0 20003DC8 08000130 08000130 08000130 08000130 08000130 08000130 4 08000151 08000130 00000000 00000000 08000130 08000130 08000130 08000130 n 09 12 00 Device family STM32F 10x XL density 109 12 15 Disconnected from device x1000 Device Data Width 8 bits Device ID 0x430 Revision ID Rev A Flash size Kbvtes 768 8 08000130 08000130 109 12 15 109 18 07 09 18 07 Connection to device is lost Old ST LINK firmware detected Please upgrade it from ST LINK gt Firmware update menu Connected via SWD 109 13 07 Device ID x430 09 18 07 Device flash Size 768 Kbytes 109 18 07 Device family STM32F 10x XL density i e Load the bin f

Download Pdf Manuals

image

Related Search

Related Contents

Sunwave Tech. Touch Screen Remote Control User's Manual  New Product Catalog 2012 June Edition  Toshiba Satellite C850-B732  取扱説明書 - TOEX  Philips Television Set & Remote Control User's Manual  Teka HI-435  Mode d`emploi GIGA X8c Professional  Manu al  Une expérience ultra-réaliste avec Samsung 3D  

Copyright © All rights reserved.
Failed to retrieve file