Stefan Dilev
Stefan Dilev

Reputation: 11

Connect android 4.0.3 phone to Wifly

How do you connect an Android 4.0.3 phone to a Wifly module using level 14 API function wifi direct? I configured Wifly to work in adhoc mode, and wrote the Android app as shown in the Android.developer guide but I can not find the peer.

Upvotes: 0

Views: 2391

Answers (3)

Cesar
Cesar

Reputation: 1

Auto-connect: https://dl.dropboxusercontent.com/u/101922388/WiflySanUSB.zip .When only the green LED of the WiFly modem is blinking, the circuit and the program has been successfully implemented.

Upvotes: 0

user1742861
user1742861

Reputation: 56

Since Android 4.0, it is possible to connect an Android phone to a Wifly module in adhoc mode, without rooting, with the following technique:

  1. With a helper app (available on Google Play or develop your own), create an Access Point on the phone and inspect the SSID, passphrase and IP address.
  2. Configure the Wifly module with this info.
  3. In your working app, communicate with the Wifly module through standard socket programming.

These 3 steps are described in the following posts:

  1. http://sailboatinstruments.blogspot.ca/2012/10/talking-to-android-phone-through-wi-fi.html

  2. http://sailboatinstruments.blogspot.ca/2012/11/gps-data-from-wifly-to-android-phone.html

  3. http://sailboatinstruments.blogspot.ca/2012/11/gps-data-from-wifly-to-android-phone_28.html

The current limitation is that the SSID and passphrase are given non-editable random names, so that you have to reconfigure the Wifly when you create a new AP (but note the AP will live on the phone as long as Wifi is enabled, unless you remove it with the helper app). Let's hope that a future Android release will remove this limitation by allowing to keep a permanent SSID and passprase.

UPDATE: With Android 4.2.1, the above limitation seems to have disappeared! The SSID and passphrase remain the same when the access point is removed and recreated.

Upvotes: 2

Tuna Karakasoglu
Tuna Karakasoglu

Reputation: 1267

Its not possible to work with AdHoc mode devices via Android (in iOS you can) in normal ways.

Please read here: http://www.xda-developers.com/android/android-ad-hoc-wireless-network-support/

This link shows a way to work with AdHoc.

Upvotes: 0

Related Questions