Home | pfodApps/pfodDevices | WebStringTemplates | Java/J2EE | Unix | Torches | Superannuation | | About Us
 

Forward Logo (image)      

Simple Configuration of pfodWifiConfig Wifi devices
using Telnet on Android

by Matthew Ford 27th March 2015 (original posted 13th February 2015)
© Forward Computing and Control Pty. Ltd. NSW Australia
All rights reserved.

Using Android Telnet to configure
your WiFi device
using pfodWifiConfig Version 1

Introduction

This page describes how users can configure their pfodWifiConfig equipped device using a telnet app on their Android mobile. There is an Android app, pfodWifiConfigV1, that automates these steps. So use that if you can.

Outline of using Telnet on an Android mobile to Configure your Wifi Device equipped with pfodWifiConfigV1

First an outline of the steps you need to follow to use a Telnet app on your Android mobile to configure your pfodWifiConfig equipped device to connect to your network and to set it other settings.

  1. Scan the QR code attached to the Wi-Fi device using one of the scanning apps available for your mobile

  2. Configure a temporary Access Point using the settings just scanned.

  3. Turn the Wi-Fi device off and then turn it on in configuration mode.

  4. Find the IP address of the device on the temporary network.

  5. Open a telnet app on you mobile and connect to the device using the IP address just found and the portNo from the scanned data.

  6. The telnet window will display the Features of your device. Enter the configuration set command to set the configuration for your network and device.

  7. The device responds with a completion message, or an error is there was problem with the command format.

Details of Configuration via Telnet on an Android mobile

Scan the QR code attached to the Wi-Fi device using one of the scanning apps available for your mobile

Turn off the device you want to configure and download a QR scanning app to your Android mobile. Two common ones are QR Droid and Barcode Scanner (which also scans QR codes). The pfodWifiConfigV1 Android app makes use of the Barcode Scanner but for manual cut and paste I prefer QR Droid

You also need a telnet app on your mobile, so you should download one now also. Here I am using Telnet by ClockworkMod

Find the QR code on your device and scan it. Here is a sample QR code

When you scan your devices code you will get something like this


Only the password will be different. There will be a special password for your device.

Configure a temporary Access Point using the settings just scanned.

Copy the scanned date to somewhere you can edit it. In QR Droid you can just click Edit, for Barcode Scanner copy it to a blank email. Then setup your mobiles tethering wifi hotspot using pfodWifiConfigV1 as the name, WPA2-PSK as the security and the password from your scan. Copy and paste the data so you don't make any typing errors.


Save the settings and make sure the wifi hotspot has turned on.

Turn the Wi-Fi device off and then turn it on in configuration mode.

Turn off the device you are configuring and wait 20 secs to let the power supply discharge. Then holding down the configuration button, turn the device back on. A configuration LED will light up (if there is one).

When started in configuration mode the device will try and connect to an Access Point using the setting in the QR code. Check your access points “Connected Users” and when something connectes open the “Details” to find its IP address.


In this case the IP address of the device on the temporary pfodWifiConfig network, is 192.168.43.78

Open a telnet app on you mobile and connect to the device using the IP address just found and the portNo from the scanned data.

One the telnet app you have previously installed and type in the IP address you have just found for your connected device. The standard port number for Telnet is portNo: 23. From the QR code scan you can see this is the PortNo your device is listening on for its configuration.



Connect to your device. If you get a blank screen just hit the enter key let the device know you are here. The device will respond with its Features message.

In this example the device will be running as a Server and can only use WPA2 to connect to your real wifi network and will get its IP address on your real network using DHCP.


Enter the
{set command with you real wifi access point name, the security (WPA2) and your networks access password. Finally configure the port number that the device's Sever will listen on. In this case the device is being configured to listen on port 80, the standard http web port. Press enter to send the set command.

The format of the {set command depends on what features your device has. See pfodWifiConfigV1 protocol definition for the details. There is also a special form of the command to handle SSID or passwords that contain spaces or the '}' character.

The device responds with a completion message, or an error is there was problem with the command format.

The device responds with a completion message.




That's it finished. Turn your device off for 20 secs and then turn it on normally and it will connect to your real network and setup its Server listening on port 80.



pfodWifiConfig and pfodQRpskare trademarks of Forward Computing and Control Pty. Ltd.
AndroidTM is a trademark of Google Inc. For use of the Arduino name see http://arduino.cc/en/Main/FAQ


The General Purpose Android/Arduino Control App.
pfodDevice™ and pfodApp™ are trade marks of Forward Computing and Control Pty. Ltd.


Forward home page link (image)

Contact Forward Computing and Control by
©Copyright 1996-2020 Forward Computing and Control Pty. Ltd. ACN 003 669 994