ODIN-W2 series - Getting Started
UBX-15017452 - R02
Advance Information
Use case examples
Page 21 of 27
•
Wi-Fi setup
o
AT+UWSCA=0,4
Deactivate network id 0
o
AT+UWSC=0,0,1
Active on startup
o
AT+UWSC=0,2,"my Phone"
Set the Network SSID to connected to
o
AT+UWSC=0,5,2
Use WPA2 as authentication type
o
AT+UWSC=0,8,"my password"
The secret WPA2 Password
o
AT+UWSCA=0,3
Activate Wi-Fi configuration
ODIN-W2 will now try connect immediately
•
Wait for the Wi-Fi link and network to go up
o
+UUWLE:0,F2A637C90E9E,11
Mac address received and connected on Channel 11
o
+UUNU:0
Network is up, it is now possible to read the IP Address
•
Read IP address and gateway
o
AT+UNSTAT=0,101
o
+UNSTAT:0,101,172.20.10.2
ODIN has got the IP Address 172.20.10.2
o
AT+UNSTAT=0,103
o
+UNSTAT:0,103,172.20.10.1
the gateway on IP Address 172.20.10.1
Now start an app on the phone like a console program. Sample apps that work well are “TCP console” for iOS
and “TCP UDP Terminal” for Android, which supports both TCP client and server. Start a TCP Server on port
5003 on the phone.