Buffer Error when make cload

Post Reply
Posts: 13
Joined: Thu Jun 28, 2018 12:00 am

Buffer Error when make cload

Post by snyderthorst » Thu Aug 08, 2019 7:47 pm


I sometimes get the error:

Code: Select all

make cload
python3 -m cfloader -w radio://0/100/2M/E7E7E7E727 flash  cf2.bin stm32-fw
Reset to bootloader mode ...
Traceback (most recent call last):
  File "/home/thomas/Desktop/crazyflie-clients-python/src/cfloader/__init__.py", line 139, in main
    if bl.start_bootloader(warm_boot=True):
  File "/usr/local/lib/python3.6/dist-packages/cflib/bootloader/__init__.py", line 89, in start_bootloader
    started = self._cload.reset_to_bootloader(TargetTypes.NRF51)
  File "/usr/local/lib/python3.6/dist-packages/cflib/bootloader/cloader.py", line 105, in reset_to_bootloader
    struct.unpack('<BB', pk.data[0:2]) != (target_id, 0xFF)
struct.error: unpack requires a buffer of 2 bytes
unpack requires a buffer of 2 bytes
when I try to flash the CF with a new firmware. make and make clean work fine, only when I try to make cload and at that only sometimes. It used to flash every time and I haven't changed anything except for values in pid.h and crtp_commander_rpyt.c

Posts: 107
Joined: Fri Jul 06, 2018 11:13 am

Re: Buffer Error when make cload

Post by kimberly » Fri Aug 09, 2019 11:46 am


Could you let us know how you have installed the cflib and the cfclient? The cfloader is part of the crazyflie-client-python, but we need to know how old the version is that you are using.

Post Reply