PX4IO bootloader fail with new mixer

Dear all,
I am trying to use a motor model based mixer, I was able to load the new pre-computed mixing matrix (the one to be cast to the structure Rotor of the class MultirotorMixer) in the place of the nominal one corresponding to my drone configuration and I modified the function mix to correspond to the new mixing strategy (two steps: thrust distribution followed by the inverted motors model to find the corresponding throttle outputs), without overflowing the flash memory (which was quite challenging for me ^^).
Now when I flash this on my DroPix and reboot, the PX4IO does not like it at all.
The error log is below (looks pretty bad, it basically fails to update the PX4IO). I need some orientation to understand the causes of the problem and to start troubleshooting this mess… Thanks
px4io: check CRC failed: -22: Invalid argument
INFO default PWM output device
[PX4IO] using firmware from /etc/extras/px4io-v2.bin
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0x7f
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bad sync 0xff,0xff
[PX4IO] bootloader not responding
px4io: check CRC failed: -22: Invalid argument
[i] ERROR: PX4IO not found
[i] ERROR: PX4IO not found, disabling output
mavlink_if0: mode: 0, data rate: 80000 B/s on /dev/ttyS1 @ 921600B
adc init done
sensors: ERROR: no barometer found on /dev/baro0 (2)
sensors: ERROR: no barometer found on /dev/baro0 (2)
sensors: ERROR: no barometer found on /dev/baro0 (2)
ebgpio on I2C bus 1 at 0x38 (bus: 100 KHz, max: 100 KHz)
[i] MULTICOPTER
mixer: can’t open /dev/pwm_output0

mixer: failed to load mixer
[i] Error loading mixer: /etc/mixers/octo_cox.main.mix

Try to power it on with the safety button pressed down. This should force the IO board into bootloader mode.

Can you try to do px4io stop, then px4io update?

I cannot stop it tells me px4io is not started, and when I do update it gives the same errors

Could it be that the new code is too heavy to fit the PX4IO memory?

It could be that something goes wrong and the IO is now not responding so you are unable to command it to reboot into bootloader mode.

I think the only solution at this point is the safety button option. In theory you just need to short one of the pins, from looking at the the Dropix pinout my guess is that you need to short the outer two pins while powering it on.

I just checked the firmware I am using, the safety check is already forcedly bypassed (I have everywhere safety_off = true in the io_handle_status function of px4io.cpp)

I don’t think that matters to trigger the bootloader.

You are right I was able to trigger it using your trick! Now I still have the load mixer error, which I’ll try to debug by myself for now… Thank you Julian :slight_smile:

1 Like

Hi, Joheart

Do you have any findings about the mixer load error?

Hi, it was a hidden nasty bug in my code

1 Like

Hi, Joheart
do you fix it or not until now? I also meet same issue, it is really a big trouble, if you have any finding or solutions, would you please share it with me? Many thanks.