robagar / tello-asyncio

A library for controlling and interacting with the Tello EDU drone using modern asynchronous Python.
GNU Lesser General Public License v2.1
29 stars 6 forks source link

wifi detection logic not working on Mac with Tello TT network -- version 2.1.0 #7

Closed jsolderitsch closed 3 years ago

jsolderitsch commented 3 years ago

Sorry to report this after your recent work.

I upgraded to the latest release.

I am using the Tello TT with the LED add-on attached. My network SSID does not begin with TELLO.

I see:

jjsretina:examples jjs$ python battery.py 
waiting for WiFi (TELLO)...
Current Wi-Fi Network: RMTT-9B02B6

Current Wi-Fi Network: RMTT-9B02B6

This repeats indefinitely.

I will try with the LED attachment removed and comment here.

jsolderitsch commented 3 years ago

With the LED attachment removed, the the SSID does start with TELLO and then the Mac connection works.

I check on linux next.

jsolderitsch commented 3 years ago

On linux, with the RMTT network SSID, the wifi check just hangs with no repeated lines:

pi@raspberry:~/tello/tello-asyncio/examples $ python3 battery.py 
waiting for WiFi (TELLO)...
^CTraceback (most recent call last):
  File "battery.py", line 19, in <module>
    loop.run_until_complete(main())
  File "/usr/lib/python3.7/asyncio/base_events.py", line 571, in run_until_complete
    self.run_forever()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 539, in run_forever
    self._run_once()
  File "/usr/lib/python3.7/asyncio/base_events.py", line 1739, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/lib/python3.7/selectors.py", line 468, in select
    fd_event_list = self._selector.poll(timeout, max_ev)
KeyboardInterrupt

until I Ctrl-C out.

So, should I be seeing the expected prefix of RMTT in the startup line instead of TELLO.

jsolderitsch commented 3 years ago

And if I remove the attached LED device and the network SSID starts with TELLo again on Linux, then the connection check works as expected.

robagar commented 3 years ago

You have to pass "RMTT" to wifi_wait_for_network, unless you've already connected (somehow!) and queried the hardware

Shouldn't be getting any error output though, that's a bug...

robagar commented 3 years ago

Ah that's from the ctrl-c

jsolderitsch commented 3 years ago

OK, thanks for checking. I see that the use of "RMTT" in the wait_for_network call does work on the Mac.

So I guess this issue can be closed since supplying the prefix in any example python should work in general.

robagar commented 3 years ago

OK, made it so that the examples ask the user to enter the WiFi prefix if not "TELLO"