WiFi Manager Extension and ESP8266 AP connection problem

662 views
Skip to first unread message

mar_st

unread,
Feb 26, 2017, 3:13:49 AM2/26/17
to MIT App Inventor Forum
Hi,

first thanks for WIFI extension!

I made ESP8266 configured as access point. If I use my phone and select connect to this AP everything is ok (select from phone settings).

I try WiFi Test.aia file and have strange situation

In aplication first pick "get available SSIDs" and when get list of available SSID, select my ESP8266 AP, then enter a password, and click connect. 
After that my existing wifi connection (my home network) is disconect and try to connect to selected WIFIAP. In most situation connection is not realized 
and back to connect to my home network. If I try connect 3-4-5 times connection to AP is successfully.

If I made connection from aplication and try to connect again to same AP  from aplication everything is ok (first disconect and than successfully connect to AP).
Also, If I made connection from phone settings to AP, and than try connect from aplication everything is ok (disconnect an correct connect to AP) .

I try 3 smartphone and all times situation is same.

Ghica

unread,
Feb 26, 2017, 9:24:05 AM2/26/17
to MIT App Inventor Forum

mar_st

unread,
Feb 26, 2017, 10:31:14 AM2/26/17
to MIT App Inventor Forum
Thanks for answer but this is not same.

I make stanalone AP (not via existing home network; c/p randomnerd code (wifi.setmode(wifi.STATION)
  wifi.sta.config("YOUR_NETWORK_NAME","YOUR_NETWORK_PASSWORD")

I need to "force"  connect to my AP trough aplication.
Any idea?

Taifun

unread,
Feb 26, 2017, 10:48:12 AM2/26/17
to MIT App Inventor Forum
I don't know, why this happens...

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

Taifun

Trying to push the limits of App Inventor! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun. 


Ghica

unread,
Feb 26, 2017, 11:02:23 AM2/26/17
to MIT App Inventor Forum
And, there are many more tutorials for the ESP8266 at the Random Nerd site. Maybe you can find something there.
Cheers, Ghica.

mar_st

unread,
Mar 2, 2017, 7:20:41 AM3/2/17
to MIT App Inventor Forum
Hi,

I use original WiFi Test without any modufication!!! 

Taifun

unread,
Mar 2, 2017, 8:47:06 AM3/2/17
to MIT App Inventor Forum
probably you can find something in logcat, why it does not connect the first time...

I normally use Eclipse and Logcat there, but if you have installed the App Inventor Software (see also http://appinventor.mit.edu/explore/ai2/setup-emulator.html), you already have everything you need to use logcat...

How to use Logcat
  1. connect your device using USB with your computer
  2. in File Manager go to the App Inventor directory, which is  C:\Program Files\App Inventor or similar
  3. press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu
  4. select "open command window here" and you will get a command window of that subdirectory
  5. enter adb logcat and the logcat will start running
  6. start your app to elicit the error
  7. copy the log (see below)
To copy your log, right click, click "select all" and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.
Reply all
Reply to author
Forward
0 new messages