localhost:8080/connect api issue from iOS Device
debayanbhattacharya opened this issue · 4 comments
- I'm submitting a ...
- bug report
DESCRIPTION:
There is a bug in the localhost:8080/connect. I am calling the API http://192.168.27.1:8080/connect from my iOS app. The data is being sent exactly like how it's shown in the documentation. The raspberry pi connects to my home wifi however the api does not give any response. It times out.
ERROR: The API successfully connects the Raspberry pi to the wifi but I do not get any response from the api. Please help.
ENVIRONMENT:
- Device: iPhone 5s
- OS: iOS
When the pi connects to your home wifi it is likely you loose connection to the pi from your phone, even if momentarily, the caller does not realize the connection is gone and will continue to wait.
Running this on the localhost as this report is titled "localhost:8080/connect" should not timeout. At least this is not something I have experienced.
Sorry for the erroneous title. I meant to say that I connect to the Raspberry pi's wifi and hit the api. I'll do one thing. I'll forget the home wifi network in my iPhone and try it. Will let you know how it goes.
Hey @cjimti I have tried it with the android and the iOS app. I made sure the devices could only connect to Raspberry's wifi. I went ahead and disabled the mobile data in both the devices. Weirdly enough, the api did give me a successful response once but the remaining times I hit the request, it timed out.
When the pi connects to your home wifi it is likely you loose connection to the pi from your phone, even if momentarily, the caller does not realize the connection is gone and will continue to wait.
Running this on the localhost as this report is titled "localhost:8080/connect" should not timeout. At least this is not something I have experienced.
Hi @cjimti, first off thanks a lot for creating this project, it is exactly what I've been looking for to bootstrap wifi connections for raspberry PIs! I'm seeing the behavior referenced in your comment above (momentary disconnecting from the PI after calling connect and having the pi successfully connect to a network). I can likely work around the timeout by doing some sort of forced refresh in the browser (I've implemented a web portal on top of the iotwifi API) but I was curious to understand the root cause of this connectivity loss given it sounds like it is expected?