Android Question WiFi-Direct problems: Searching for devices

Rick Harris

Well-Known Member
Licensed User
Longtime User
When using the WiFi-Direct library I often encounter the problem that, after loosing the connection with another device, WiFi-Direct can no longer find the other device, despite the fact that it was re-activated. The message "Searching for devices" does not go away. This problem sometimes seems to resolve itself after retrying to connect about a quarter of an hour later.
It seems that the WiFi-Direct library (wrapper) definitely does not cause instant changes to WiFi-Direct itself.

Also my app (that contains WiFi-Direct) crashes after I have used the WiFi Direct Example. The Error is "Address already in use". Changing to another port number in my App does not solve this nor does calling "manager.stopdiscovery" or "manager.cancelconnections" in the Service1 module.

Overall I find WiFi-Direct rather unpredictable and unreliable. I am trying to use WiFi-Direct to send GPS data via Wifi from a mobile phone to an Android E-Reader (that does not have a GPS). It works, but sadly is unstable. Any ideas?

Update:
After removing If groupIP = "127.0.0.1 then "server.listen" in the Service1 module everything seems to work much better! No idea why.
 
Last edited:

Rick Harris

Well-Known Member
Licensed User
Longtime User
Thank you. Just to repeat that most of my problems are now solved by removing the: If groupIP = "127.0.0.1 then "server.listen" in the Service1 module.

How do I make a mobile hot spot without the use of Internet access? I want both devices to exchange data (in this case GPS data) without any mobile charges. Furthermore, the second device is the (wonderful) open Android E-Reader by Icarus, type Illumina HD which only has WiFi and no 2G/3G/4G.

Currently I am making a bicycle navigator which uses this E-reader. The main reason is that E-paper is ideal to read maps in bright sunlight (although not in colour).
 
Upvote 0

Rick Harris

Well-Known Member
Licensed User
Longtime User
Is there maybe some sample code available how to make a (Internet independent) WiFi hotspot?
If so, how can I access files on the device that hosts the hotspot?
What in fact I am asking for is an alternative for WiFi-Direct that would work on all devices, not just devices that support WiFi-Direct (many cheap devices don't support it).
 
Upvote 0

Rick Harris

Well-Known Member
Licensed User
Longtime User
Can that be done using WiFi without being connected to the Internet?
I want to send GPS data from a mobile phone to an E-reader (that has no GPS receiver).

I have got it working with WiFi Direct, but as you wrote, WiFi Direct has a lot of problems.
Making both devices talk to each other requires many attempts that often fail.
 
Upvote 0

agus mulyana

Member
Licensed User
Longtime User
Hi,
execuse me, i have been using wifi direct, on my device ASUS fonepad 7, but it does not working proeperly, what is tha problems ? anyone can help me ? thank you
 
Upvote 0
Top