This app note demonstrates how to connect the WiSnap RS-232 dongle via Wi-Fi to an Android AP (access point) that is connected to the internet via a 3G/4G cellular network. To clarify, we are going to set up the Android device (with access to a cellular network) as a Wi-Fi access point, then configure the WiSnap (via RS-232 connection and terminal application) to connect to the Android’s Wi-Fi access point. This way, the WiSnap will be able to connect to the Internet through the Android’s cellular network.
Set up the Wi-Fi access point (AP) on the Android device
1. Launch the Settings application on your Android device.
2. Tap on Connections.
3. Tap on Mobile Hotspot and Tethering.
4. Enable Mobile Hotspot.
5. Tap on Mobile Hotspot (not the slider).
You may receive a popup dialog asking you if you want to enable Wi-Fi sharing. Tap on Cancel.
6. Take note of the access point name (by default it is “AndroidAP”) and the access point password (automatically generated).
For this demonstration, the access point password is hpqq8932.
Configure the WiSnap to Connect to AndroidAP
1. Connect the WiSnap to a computer via an RS-232 to USB adapter cable.
2. Launch JavaTerm (or another terminal emulator) andconfigure it for communication with the WiSnap.
3. Enter command (CMD) mode.
4. Send the following commands to the WiSnap via the terminal. Text in red may vary depending on your configuration for the Android Wi-Fi AP.
set wlan ssid AndroidAP
Sets the SSID to the Android’s access point SSID.
set wlan phrase hpqq8932
Sets the SSID password to the password for the Android’s access point.
set wlan auth 3
Sets the authentication mode.
set ip dhcp 1
Sets the WiSnap to use the network’s DHCP to assign an IP address.
set wlan join 1
Sets the WiSnap to auto-connect to stored wlan settings on boot.
set wlan chan 0
Sets the WiSnap to scan all available channels.
Saves the configuration.
Reboots the WiSnap.
5. Once the WiSnap finishes rebooting, enter command mode again.
6. Check the settings by sending the following commands.
Displays wlan and related settings to console.
Displays IP address and related settings to console.
7. Check your Android device to make sure that the WiSnap is connected to the access point. You should see WiSnap-xxxx beneath CONNECTED DEVICES.