Sending control message failed, Windows 10

Post here to get support
arnaud
Bitcraze
Posts: 1826
Joined: Tue Feb 06, 2007 12:36 pm

Re: Sending control message failed, Windows 10

Post by arnaud » Thu Feb 22, 2018 8:12 am

This is most likely a problem with access right. You can try to run your script with sudo, if it works with sudo there is access right problem.

You can create a udev rule file to solve the problem: https://github.com/bitcraze/crazyflie-l ... ermissions
After the udev rules file has been created, remove and re-insert the radio and you should be able to use it without sudo.

MBurdett
Beginner
Posts: 15
Joined: Mon Dec 18, 2017 8:52 pm

Re: Sending control message failed, Windows 10

Post by MBurdett » Sat Feb 24, 2018 2:48 pm

Hi,

I have just tried running a basic script using a sudo command and the same thing happens. I am not sure what to try next.

Is there anything different I need to do to get this working with a raspberry pi at all?

arnaud
Bitcraze
Posts: 1826
Joined: Tue Feb 06, 2007 12:36 pm

Re: Sending control message failed, Windows 10

Post by arnaud » Sun Feb 25, 2018 12:01 pm

Can you maybe describe a bit more what does not work. Ie. what are you running, what is the intended result and what is your observed result?

MBurdett
Beginner
Posts: 15
Joined: Mon Dec 18, 2017 8:52 pm

Re: Sending control message failed, Windows 10

Post by MBurdett » Mon Feb 26, 2018 9:56 pm

Certainly, the code I'm running is partly the test code you suggested. I then set the power output and tell the radio to produce a continuous wave:

Code: Select all

from crazyradio import Crazyradio
cr = Crazyradio()
cr.send_packet([0xff])
POWER_SETTING = 2
cr.set_power(POWER_SETTING)
cr.set_cont_carrier(True)
The error I am receiving is this:

Traceback (most recent call last):
File "piradiotest.py", line 3, in <module>
cr = Crazyradio()
File "/home/pi/crazyradio-firmware/lib/crazyradio.py", line 123, in __init__
raise Exception("Cannot find a Crazyradio Dongle")
Exception: Cannot find a Crazyradio Dongle
When I run this on Windows is runs fine, but this error keeps occurring on my Pi.

arnaud
Bitcraze
Posts: 1826
Joined: Tue Feb 06, 2007 12:36 pm

Re: Sending control message failed, Windows 10

Post by arnaud » Wed Feb 28, 2018 3:28 pm

Do you see the radio when typing "lsusb" and does the radio appear in "dmesg" just after inserting it in the Raspberry pi.

What happen if you are running this script with sudo?

MBurdett
Beginner
Posts: 15
Joined: Mon Dec 18, 2017 8:52 pm

Re: Sending control message failed, Windows 10

Post by MBurdett » Sat Mar 03, 2018 9:58 pm

Hi,

It is not listed when I run lsusb. The message I posted previously happens with and without the sudo command.

MBurdett
Beginner
Posts: 15
Joined: Mon Dec 18, 2017 8:52 pm

Re: Sending control message failed, Windows 10

Post by MBurdett » Sat Mar 03, 2018 10:28 pm

:mrgreen:

I have solved this! I had to change to use a USB power adapter to connect the radio to my Pi. I switched this back afterwards and I noticed that a Nordic Device was now showing in lsusb. I ran my code with sudo and this works perfectly the same as I had it on a Windows 10 machine. Thank you for your help!

:D :D

arnaud
Bitcraze
Posts: 1826
Joined: Tue Feb 06, 2007 12:36 pm

Re: Sending control message failed, Windows 10

Post by arnaud » Mon Mar 05, 2018 12:07 pm

Great! Glad that the problem is solved :).

Post Reply