Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fmu_v5 NSH some commands force an instant reboot #9532

Closed
ryanjAA opened this issue May 26, 2018 · 17 comments · Fixed by #9589
Closed

fmu_v5 NSH some commands force an instant reboot #9532

ryanjAA opened this issue May 26, 2018 · 17 comments · Fixed by #9589
Assignees
Labels
Board: Pixhawk fmu-v5 FMU-v5 including pixhawk 4, pixhack v5, etc bug

Comments

@ryanjAA
Copy link
Contributor

ryanjAA commented May 26, 2018

Certain NSH commands via QGC on Master and Beta send it to an instant reboot.

For instance ver all works fine, tests all, etc but any of the airspeed commands send it to a reboot. Plugged in directly via usb only and only one airspeed (sdp3x) at a time plugged in (to i2c a). Even with no airspeed plugged in it does the same thing, reboots.

@dagar
Copy link
Member

dagar commented May 26, 2018

@DanielePettenuzzo any ideas? All currently supported differential pressure sensors (airspeed) are i2c.

@dagar dagar added bug Board: Pixhawk fmu-v5 FMU-v5 including pixhawk 4, pixhack v5, etc labels May 26, 2018
@DanielePettenuzzo
Copy link
Contributor

DanielePettenuzzo commented May 26, 2018

@ryanjAA how do you start the driver?
I start it like this:
sdp3x_airspeed start -b [bus-number]
for i2c-a the bus number should be 4.

@dagar some drivers don't have the argc check so if you just write the driver's name with no arguments there is a reboot.

@DanielePettenuzzo
Copy link
Contributor

I got ms4525 working on i2c-a on friday.

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 26, 2018

@DanielePettenuzzo That does it. Its the argc check. Using sdp3x_airspeed start -b works. Using sdp3x_airspeed start -b works, sdp3x_airspeed help works but just sdp3x_airspeed reboots it.

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 26, 2018

I guess that means a separate issue. That command doesnt reboot it but it also wont let the sdp3x start.

@DanielePettenuzzo
Copy link
Contributor

@ryanjAA if you connect the sensor to i2c-a and start the driver what message do you get on the console?
sdp3x_airspeed start -b 4

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 26, 2018

Two firmware flashs and all set. Maybe something lingering from whatever firmware was sent over on it? I was playing with some can units but it’s working now. If it happens again I won’t reflash. I’ll keeep it and figure out why if it sticks but so far have several airspeed units working.

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 26, 2018

So I guess to close this then it’s the argc checks. Maybe we should get that in the docs or add them to all commands.

@DanielePettenuzzo
Copy link
Contributor

@ryanjAA for the px4 firmware are you using latest master?

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 27, 2018

@DanielePettenuzzo Yes. Latest master.

@LorenzMeier
Copy link
Member

@bkueng Sounds like argc handling needs an audit.

@dagar
Copy link
Member

dagar commented May 27, 2018

@bkueng Sounds like argc handling needs an audit.

The driver boilerplate is all copypasta and would greatly benefit from ModuleBase or similar.

EDIT: one reason we haven't already started using ModuleBase for drivers is that we need to be able to start multiple instances. #9143

@bkueng
Copy link
Member

bkueng commented May 30, 2018

@ryanjAA can you write down the affected commands so that we can fix them up quickly?
In the long run we'll need a ModuleBase for multi instances, but I have not come up with a good solution yet.

@ryanjAA
Copy link
Contributor Author

ryanjAA commented May 30, 2018

@bkueng I am out of the office for at least another week (no Pix 4 with me either) but so far the airspeed tests with no arguments were doing it. The ver command did not but it probably just needs someone to go through each one with out an argument to see what happens if no other way to check. I’m happy to do so but it won’t be possible for a week or so.

@bkueng
Copy link
Member

bkueng commented Jun 4, 2018

@ryanjAA I went through all commands and fixed the ones affected in #9589.

@garfieldG
Copy link
Contributor

Hi,

seems like there are some untouched places where the issue isn't handled, such as https://github.com/PX4/Firmware/blob/27e75920bd560b7d8de295db45aba8cf036cd98d/src/drivers/imu/l3gd20/l3gd20.cpp#L1358

@bkueng
Copy link
Member

bkueng commented Jun 12, 2018

@garfieldG right, this driver is not enabled on Pixhawk 4. Fixed in #9647

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Board: Pixhawk fmu-v5 FMU-v5 including pixhawk 4, pixhack v5, etc bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants