Cannot connect crazyflie

Discussions about the AI-deck
1pi
Member
Posts: 49
Joined: Mon Nov 23, 2020 1:28 am

Cannot connect crazyflie

Post by 1pi »

Hi
I am having a problem after running tb make menuconfig I set ssid and password save it and reflashed the Crazyflie, but the wifi streaming example does not appear on my wifi, so I cannot connect. I am using the latest information and have done all the required steps. Could you let me know what the problem could be.
Thank you
Rodrigo
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot connect crazyflie

Post by marcus »

Could you connect to the Crazyflie using the Crazyradio PA and copy/paste the console text from the application?
1pi
Member
Posts: 49
Joined: Mon Nov 23, 2020 1:28 am

Re: Cannot connect crazyflie

Post by 1pi »

hi marcus
here is the output from consle

SYS: Crazyflie 2.0 is up and running!
SYS: Build 38:2a282b575c25 (2022.03 +38) CLEAN
SYS: I am 0x313139313535511300360046 and I have 1024KB of flash!
CFGBLK: v1, verification [OK]
DECK_CORE: 1 deck(s) found
DECK_CORE: Calling INIT on driver bcAI for deck 0
AIDECK-ROUTER: AI-deck will become access point
MPU9250 I2C connection [OK].
AK8963 I2C connection [OK].
LPS25H I2C connection [OK].
ESTIMATOR: Using Complementary (1) estimator
CONTROLLER: Using PID (1) controller
MTR-DRV: Using brushed motor driver
SYS: About to run tests in system.c.
SYS: NRF51 version: 2022.03 +
EEPROM: I2C connection [OK].
STORAGE: Storage check [OK].
AK8963: Self test [OK].
DECK_CORE: Deck 0 test [OK].
SYS: Self test passed!
STAB: Wait for sensor calibration...
SYS: Free heap: 16656 bytes
STAB: Ready to fly.
STAB: WARNING: stabilizer loop rate is off (900)
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot connect crazyflie

Post by marcus »

Could you try to configure the access point without a password to see if this makes any differance?
1pi
Member
Posts: 49
Joined: Mon Nov 23, 2020 1:28 am

Re: Cannot connect crazyflie

Post by 1pi »

Hello
I did what you suggested and I am getting same results, I have to turn wifi off and on, still not connecting as it did before, I don’t know if it is my router or the aideck. What else can you suggest?
I tried to flash the esp firmware with cfloader but I get this error:
could not save cache, no writable directory
could not save cache, no writable directory
Exception while doing callback on port [4]



logger .error(‘Version’ + version + ‘ not supported’)
TypeError : must be str, not int
Regards
Rodrigo
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot connect crazyflie

Post by marcus »

For using the flashing via the cfloader you need to update to the latest version of the crazyflie-lib-python and install it from source (link to instructions, it should be installed in editable mode). Note that you will probably have to uninstall the previous version of cflib with pip uninstall cflib first.

From the printouts it looks like you're configuring the AI-deck as an access point, so it should not connect to your WiFi but instead you need to connect to the new access point (it will be named "WiFi streaming example"). Could you please verify that you're not seeing this access point?
1pi
Member
Posts: 49
Joined: Mon Nov 23, 2020 1:28 am

Re: Cannot connect crazyflie

Post by 1pi »

Hello Marcus
Thank you for your reply, maybe I wasn’t clear in my last reply, I do connect to the WiFi streaming example, the issue is that I find it takes too long to establish a connection, and I have noticed how the red led on the right hand side of camera flashes very bright and fast when it connects to wifi, is that normal?
Also can you let me know how to save images from the streaming example.
Regards
Rodrigo
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot connect crazyflie

Post by marcus »

Does the LED blink faster when you connect to the WiFi access point? If so then this sounds like the old example and this will not work anymore.

Is the example you're working with located in aideck-gap8-examples/examples/other/wifi-img-streamer?

So you're able to connect to the WiFi access point but when you run the opencv-viewer.py it doesn't show any images? Could you copy paste the console output from when you run the streamer?
1pi
Member
Posts: 49
Joined: Mon Nov 23, 2020 1:28 am

Re: Cannot connect crazyflie

Post by 1pi »

Hi
Yes the led blinks fast about 5 times per second then it briefly stops and blinks again and so on.
Yes I am using the aideck-gap8-examples/examples/other/wifi-img-streamer.
Yes I am able to connect and run opencv-viewer.py and the window opens and I can see the images, this part works fine.
What I want to know is if the led blinking fast is normal and why does it take longer to connect to wifi access point.
Also could you let me know how to save images from the streaming example.
Regards
marcus
Bitcraze
Posts: 659
Joined: Mon Jan 28, 2013 7:02 pm
Location: Sweden
Contact:

Re: Cannot connect crazyflie

Post by marcus »

Not sure why it takes longer to connect. How much longer does it take to connect to the AI deck AP compared to when the AI deck is connecting to an AP?

Yes, the LED blinking is fine.

You can save the images by running the opencv-viewer.py with the argument --save. This will place images in a directory named stream_out:

Code: Select all

python opencv-viewer.py -n 192.168.4.1 --save
Post Reply