Unable to use different radio address
Posted: Wed May 04, 2016 1:32 pm
I'm having problems with using different radio addresses for the Crazyflie. Using the Crazyflie Client, I'm able to set the radio channel and bitrate and this works fine. However, although I'm able to change the radio address as well, I seem to have problems with connecting to it.
For these tests, I'm using the basiclog.py example. I start with a "stock" Crazyflie with address set to the default "E7E7E7E7E7". I can connect to "radio://0/110/1M/E7E7E7E7E7" without problems. Then I try changing the address to "radio://0/110/1M/E7E7E7E701" using the client, rebooting the Crazyflie and connecting to that, but I just get "Connection to radio://1/110/1M/E7E7E7E701 failed: Too many packets lost". But now if I try connecting to E7E7E7E7E7 again, it works without problems. The same goes if I try to connect from the client, it only works if E7E7E7E7E7 is in the address field in the Connect dialog. So it looks like the address isn't being properly updated on the Crazyflie side and it keeps using the default value. However, according to the log the address seems to updated correctly.
This problem looks to be the same with all 6 Crazyflies I have, two were bought in November and four at the end of March. I'm using my own, heavily modified version of crazyflie-firmware forked sometime in January, but I also tried it with the newest official firmware and the problem stays exactly the same.
Does anyone know, what could be the problem? Why doesn't the Crazyflie use the configured address?
Adam
Extract from log while connecting and setting the address:
For these tests, I'm using the basiclog.py example. I start with a "stock" Crazyflie with address set to the default "E7E7E7E7E7". I can connect to "radio://0/110/1M/E7E7E7E7E7" without problems. Then I try changing the address to "radio://0/110/1M/E7E7E7E701" using the client, rebooting the Crazyflie and connecting to that, but I just get "Connection to radio://1/110/1M/E7E7E7E701 failed: Too many packets lost". But now if I try connecting to E7E7E7E7E7 again, it works without problems. The same goes if I try to connect from the client, it only works if E7E7E7E7E7 is in the address field in the Connect dialog. So it looks like the address isn't being properly updated on the Crazyflie side and it keeps using the default value. However, according to the log the address seems to updated correctly.
This problem looks to be the same with all 6 Crazyflies I have, two were bought in November and four at the end of March. I'm using my own, heavily modified version of crazyflie-firmware forked sometime in January, but I also tried it with the newest official firmware and the problem stays exactly the same.
Does anyone know, what could be the problem? Why doesn't the Crazyflie use the configured address?
Adam
Extract from log while connecting and setting the address:
Code: Select all
Setting address to 0xE7E7E7E701
INFO:cflib.crazyflie.mem:Writing new chunk of 21bytes at 0x0
INFO:cflib.crazyflie.mem:WRITE: Mem=0, addr=0x0, status=0x0
INFO:cflib.crazyflie.mem:This write request is done
INFO:cflib.crazyflie.mem:Updating content of memory 0
INFO:cflib.crazyflie.mem:Requesting new chunk of 16bytes at 0x0
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x0, status=0x0, data=(48, 120, 66, 67, 1, 105, 1, 0, 0, 0, 0, 0, 0, 0, 0, 231)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:Got new data: 0xBCi
INFO:cflib.crazyflie.mem:Requesting new chunk of 5bytes at 0x10
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x10, status=0x0, data=(1, 231, 231, 231, 53)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:{'roll_trim': 0.0, 'radio_speed': 1, 'radio_channel': 105, 'radio_address': 996028180225L, 'version': 1, 'pitch_trim': 0.0}
After rebooting the CF, connecting again
INFO:cflib.crazyflie.mem:Requesting number of memories
INFO:cflib.crazyflie.mem:2 memories found
INFO:cflib.crazyflie.mem:Requesting first id
INFO:cflib.crazyflie.mem:Requesting information about memory 1
INFO:cflib.crazyflie.mem:Memory: id=1, type=LED driver, size=24
INFO:cflib.crazyflie.mem:Done getting all the memories, start reading the OWs
INFO:cflib.crazyflie:Memories finished updating
INFO:cflib.crazyflie.mem:Writing new chunk of 24bytes at 0x0
INFO:cflib.crazyflie.mem:Updating content of memory 0
INFO:cflib.crazyflie.mem:Requesting new chunk of 16bytes at 0x0
INFO:cflib.crazyflie.mem:WRITE: Mem=1, addr=0x0, status=0x0
INFO:cflib.crazyflie.mem:This write request is done
INFO:cflib.crazyflie.mem:Write to LED driver done
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x0, status=0x0, data=(48, 120, 66, 67, 1, 105, 1, 0, 0, 0, 0, 0, 0, 0, 0, 231)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:Got new data: 0xBCi
INFO:cflib.crazyflie.mem:Requesting new chunk of 5bytes at 0x10
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x10, status=0x0, data=(1, 231, 231, 231, 53)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:{'roll_trim': 0.0, 'radio_speed': 1, 'radio_channel': 105, 'radio_address': 996028180225L, 'version': 1, 'pitch_trim': 0.0}
Setting address back to 0xE7E7E7E7E7
INFO:cflib.crazyflie.mem:Writing new chunk of 21bytes at 0x0
INFO:cflib.crazyflie.mem:WRITE: Mem=0, addr=0x0, status=0x0
INFO:cflib.crazyflie.mem:This write request is done
INFO:cflib.crazyflie.mem:Updating content of memory 0
INFO:cflib.crazyflie.mem:Requesting new chunk of 16bytes at 0x0
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x0, status=0x0, data=(48, 120, 66, 67, 1, 105, 1, 0, 0, 0, 0, 0, 0, 0, 0, 231)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:Got new data: 0xBCi
INFO:cflib.crazyflie.mem:Requesting new chunk of 5bytes at 0x10
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x10, status=0x0, data=(231, 231, 231, 231, 27)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:{'roll_trim': 0.0, 'radio_speed': 1, 'radio_channel': 105, 'radio_address': 996028180455L, 'version': 1, 'pitch_trim': 0.0}
Rebooting and connecting again
INFO:cflib.crazyflie.mem:Requesting number of memories
INFO:cflib.crazyflie.mem:2 memories found
INFO:cflib.crazyflie.mem:Requesting first id
INFO:cflib.crazyflie.mem:Requesting information about memory 1
INFO:cflib.crazyflie.mem:Memory: id=1, type=LED driver, size=24
INFO:cflib.crazyflie.mem:Done getting all the memories, start reading the OWs
INFO:cflib.crazyflie:Memories finished updating
INFO:cflib.crazyflie.mem:Writing new chunk of 24bytes at 0x0
INFO:cflib.crazyflie.mem:Updating content of memory 0
INFO:cflib.crazyflie.mem:Requesting new chunk of 16bytes at 0x0
INFO:cflib.crazyflie.mem:WRITE: Mem=1, addr=0x0, status=0x0
INFO:cflib.crazyflie.mem:This write request is done
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x0, status=0x0, data=(48, 120, 66, 67, 1, 105, 1, 0, 0, 0, 0, 0, 0, 0, 0, 231) INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:Got new data: 0xBC
INFO:cflib.crazyflie.mem:Requesting new chunk of 5bytes at 0x10
INFO:cflib.crazyflie.mem:READ: Mem=0, addr=0x10, status=0x0, data=(231, 231, 231, 231, 27)
INFO:cflib.crazyflie.mem:READING: We are still interested in request for mem 0
INFO:cflib.crazyflie.mem:{'roll_trim': 0.0, 'radio_speed': 1, 'radio_channel': 105, 'radio_address': 996028180455L, 'version': 1, 'pitch_trim': 0.0}