Page 1 of 2

WiFi Connectivity Issues

Posted: Sat Jan 22, 2022 6:27 pm
by whoenig
We are using the new wifi streamer example (described in https://github.com/bitcraze/AIdeck_exam ... g_streamer), with a Crazyflie 2.1 and AI deck attached (no other decks). STM32, NINA, and GAP8 are flashed over JTAG using the provided instructions. We re-added the software access point mode (see https://github.com/IMRCLab/aideck-esp-f ... ree/softap) and connect a Laptop to that access point.

When running opencv-viewer.py, 9 out of 10 times we get stuck at "Socket connected.", i.e., we can connect to the NINA, however no packets can be received. The NINA blinks at that point fast, indicating that it believes that a connection was established.

We did have the same problem with the version from the master branch. I am wondering if anybody else has seen this and if there is some trick to connect more reliably.

Re: WiFi Connectivity Issues

Posted: Tue Jan 25, 2022 8:38 am
by kimberly
Hi Wolfgang!

That are indeed not very good stats... When we had this there was hardly any problem connecting to the viewer, so let's see what your conditions are:

- Was this with the program on RAM (make run) or flashed (make flash)?
- Did you in between those try to restart the aideck by powercycling the crazyflie? And perhaps also connecting and reconnecting the battery?
- The software access point, is there any security on that that might prevent the connection? We had to make a new wifi point especially for working with the nina.

Re: WiFi Connectivity Issues

Posted: Wed Jan 26, 2022 8:56 am
by whoenig
Thanks for your help - good to know that this is not normal!

- We flashed using the Olimex.
- Yes, we tried to restart the Crazyflie, both with the button and also by re-plugging the battery.
- By software access point I mean that the NINA is creating an access point (similar to a router), and we connect our Laptop to that (NINA) access point. For security reasons, we are not allowed to have our own router in the lab. This is essentially the same mode the AI decks ship with from the factory. (And we do have the same problem with the factory firmware.)

Re: WiFi Connectivity Issues

Posted: Thu Jan 27, 2022 9:12 am
by kimberly
Ah ok! Sorry, I misunderstood your explanation of the access point.

The reason why I asked if you tried on RAM flash (so that you see the debug logging through the olimex) or flash on RAM, is that we had some people before that mentioned that the wifi example with 'make run' did work but 'make flash' didn't, which perhaps indicates some kind of timing issue that prevents the Camera from starting or is causing problems with the SPI communication. If you do 'make run' as well, you can check if the camera is starting at all or not.

I'm a bit worried though that you mentioned that you have had the same with the factory setting... I assume you were using 'masters' viewer.py then and not the one from the special branch right? Have you also build the crazyflie firmware with the forced AIdeck driver?''

Currently I'm on my windows side of things so I won't be able to try it out yet, but I'll see if I can find some time this afternoon to switch OS and see if I am able to replicate it some how.

Re: WiFi Connectivity Issues

Posted: Thu Jan 27, 2022 4:07 pm
by kimberly
Just when I have time to look at this.... I discover I left my programmer at the office! And I will not come there before the weekend anymore. Sorry! I'll try it first thing Monday.

But at least you know know that there is something not quite right, and also the current state of the firmwares is a bit in Limbo right now... so we hope to resolve most of these problems in the coming weeks anyway with some well thought out code :) Do you by any chance have another AIdeck to just double check if it is perhaps an error in your AIdeck?

Re: WiFi Connectivity Issues

Posted: Fri Jan 28, 2022 1:49 pm
by whoenig
Thanks for checking! FYI, I tested with three brandnew AI decks with the stock GAP8/ESP32 firmwares and worked mostly fine. In one case, the connection was lost with the same symptoms, but could be revived with the 3 steps: turn off WiFi (PC), reboot CF, turn on WiFi (PC).

Re: WiFi Connectivity Issues

Posted: Mon Jan 31, 2022 2:01 pm
by kimberly
Ah oke perhaps it's a hardware problem after all! We should either send you a new one or refund you, so please send an email to use of what you would prefer :)

Re: WiFi Connectivity Issues

Posted: Tue Feb 01, 2022 11:51 am
by whoenig
Hi Kimberly,
Thanks for your generous offer! I debugged this further today (using the logging output over UART). The issue is that the GAP8 seems to stall everytime in

Code: Select all

open_pi_camera_himax
, independent of the AI deck I use. However, if I use `make run` it works fine. Thus, I don't think this is a hardware issue.

I am using https://github.com/bitcraze/AIdeck_exam ... 8-firmware with the provided docker container. I don't fully understand the statement in the README:
Note: Due to a bug in the Makefiles in the SDK you will need to use our toolbelt to build/flash the application, or fix the Makefiles as described in this issue.
* I didn't see any error message when flashing, and flashing generally seems to work (e.g., I am able to change the SSID/Password successfully).
* When you write "toolbelt", I assume you mean the provided docker container, i.e., when using the docker container, no further actions are needed?

Finally, this looks like some sort of race condition perhaps. Are you aware of any other problems where running works fine, but flashing doesn't? I can easily reproduce this using two different 1.1 AI decks, although the stalling within open_pi_camera_himax happens at slightly different places.

Re: WiFi Connectivity Issues

Posted: Tue Feb 01, 2022 12:41 pm
by whoenig
Small update: I see the same stall/hanging now (for trying to access the camera) when using `make run`. It just seems less likely to trigger this issue compared to executing from flash.

Re: WiFi Connectivity Issues

Posted: Wed Feb 02, 2022 8:48 am
by tobias
Hi Wolfgang!
This could be a reset issue of the camera. Please check this forum post. This post is also touching it. Also found a note in the jtag documentation. :D Let us know it that is the issue.