Last version of firmware that reboot.py works?

Discussions about all things Bitcraze
Post Reply
cafeciaojoe
Member
Posts: 83
Joined: Mon Jun 18, 2018 2:37 am

Last version of firmware that reboot.py works?

Post by cafeciaojoe »

Hi,

I am trying to get the PowerSwitch Module to work. I am using cflib 0.1.12.1 and the 2020.09 firmware.
I have modified the line from reboot.py slightly, see below:

Code: Select all

uri = 'radio://0/80/2M/E7E7E7E7E7'
PowerSwitch(uri).stm_power_cycle()
I get the same attribute error as user aqqz in the thread below.

Code: Select all

AttributeError: 'NoneType' object has no attribute 'ack'
In the thread (viewtopic.php?f=2&t=4552) it was stated that:
kimberly wrote: Tue Dec 01, 2020 3:23 pm
So I tried it with firmware 2019.01 and cflib version 0.1.11 (which is the last version feature will work on). It works fine for me.
I attempted to try this with a cf on the 2019.01 firmware but could not seem to even get the firmware to compile? cloned folder to the same directory level as cflib and the client

Code: Select all

git clone --recursive https://github.com/bitcraze/crazyflie-firmware.git --branch 2019.01 "crazyflie-firmware-2019.01"
only to get the following message when running 'make all'

Code: Select all

make: python2: No such file or directory
make: *** [check_submodules] Error 1
PhD Student
RMIT University
School of Design
http://www.cafeciaojoe.com
Image
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Last version of firmware that reboot.py works?

Post by kimberly »

Hi!

The cflib has removed all instances of python2 in the latest releases, and Ubuntu 20.04 doesnt have python2 anymore. But when I tried the old versions, that was just to indicate the oldest version that this will work on, not as an instruction that you should downgrade it.

I think you first need to make an instance of the powerswitch class and then use that. Like this:

Code: Select all

ps = PowerSwitch(uri)
ps.stm_power_cycle()
Let us know if this works and if not, I'll try it myself too.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Last version of firmware that reboot.py works?

Post by kimberly »

Just an update on this, I seem to have recreated the error too:

Code: Select all

python3 reboot.py radio://0/10/2M/E7E7E7E7E7
with error:

Code: Select all

Traceback (most recent call last):
  File "reboot.py", line 33, in <module>
    PowerSwitch(sys.argv[1]).stm_power_cycle()
  File "/home/kimberly/Development/Bitcraze/Python/crazyflie-lib-python/cflib/utils/power_switch.py", line 63, in stm_power_cycle
    self.stm_power_down()
  File "/home/kimberly/Development/Bitcraze/Python/crazyflie-lib-python/cflib/utils/power_switch.py", line 54, in stm_power_down
    self._send(self.BOOTLOADER_CMD_SYSOFF)
  File "/home/kimberly/Development/Bitcraze/Python/crazyflie-lib-python/cflib/utils/power_switch.py", line 79, in _send
    if res.ack:
AttributeError: 'NoneType' object has no attribute 'ack'
This worked for me before so we will check out how can be fixed. We are planning a release this week so try again once it is available.
cafeciaojoe
Member
Posts: 83
Joined: Mon Jun 18, 2018 2:37 am

Re: Last version of firmware that reboot.py works?

Post by cafeciaojoe »

No problem, will wait for the release, and report back here, thanks for updating!
PhD Student
RMIT University
School of Design
http://www.cafeciaojoe.com
Image
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: Last version of firmware that reboot.py works?

Post by kimberly »

The release is out! So it should be fixed now. Can you try again?
cafeciaojoe
Member
Posts: 83
Joined: Mon Jun 18, 2018 2:37 am

[solved] Last version of firmware that reboot.py works?

Post by cafeciaojoe »

this works great thanks!
PhD Student
RMIT University
School of Design
http://www.cafeciaojoe.com
Image
Post Reply