3DR/pixhawk Parameters - reset on factory reset?

Joined
Apr 10, 2018
Messages
6
Reaction score
1
Age
32
Hi all,

I recently tried connecting a flytPi to the 3DR, and because of a message I received I updated the SERIAL2_PROTOCOL value to 1. (it was 0 before). Related thread: flytPi+ 3DR Solo Parameters

Since then (maybe a coincidence, maybe not), the drone doesn't connect to the remote anymore. I did multiple factory resets, but the behaviour is the same.

Below dropbox link are logs from the drone - taken via SFTP - IP 10.1.1.10, user: root, the default pass. I can also connect via SSH to the drone, but I can't figure out if that parameter was reset or not.

I believe running some python script from /usr/bin would print all the params, but I'm now sure which one (or if you have better idea).

Mission controller using UDP doesn't connect. - or I could have check from there.

3dr

What do you guys think? Are parameters reset when doing a factory reset of the drone?

Thanks.
 
Joined
Mar 10, 2016
Messages
348
Reaction score
131
Location
Plymouth, MN
No, it does not reset the parameters.

Can you connect with Tower? If so you should be looking to set SYSID_SW_MREV to 0 (zero) and after a reboot of Solo the parameters will be reset.
 
Joined
Apr 10, 2018
Messages
6
Reaction score
1
Age
32
Thanks for the reply. i cannot connect with tower - using UDP method. I tried.

I can connect to the drone directly via SSH. And I can run the python scripts onboard the drone in /usr/bin

There must be a way to set a parameter locally if you have SSH access right? (also SFTP access).

From the second log (3dr-telem) it seems like Mission Control should be able to connect right? (but it doesn't...). I will try to create my own wifi network - without the remote, and try like that.

In the drone logs (3dr-solo.log) I found this (then keeps repeating sending start packet forever...):

Apr 10 10:53:30 3dr_solo local1.info pair: network already up
Apr 10 10:53:30 3dr_solo local1.info pair: establishing connection...
Apr 10 10:53:30 3dr_solo local1.info pair: controller version "2.4.2"; firmware "1.2.11"
Apr 10 10:53:30 3dr_solo local1.info pair: switching to runlevel.READY
Apr 10 10:53:30 3dr_solo local1.info dl: dataflash_logger starting: built Sep 22 2016 15:30:50
Apr 10 10:53:30 3dr_solo local1.info dl: df-tfc: connecting to telem-forwarder at 10.1.1.10:14560
Apr 10 10:53:31 3dr_solo local1.info dl: mh-dfl: sending start packet to (0/0)
Apr 10 10:53:31 3dr_solo local1.info dl: mh-dfl: sending start packet to (0/0)
Apr 10 10:53:32 3dr_solo local1.info dl: mh-dfl: sending start packet to (0/0)

And in 3dr-telem.log:
Apr 10 10:53:30 3dr_solo local4.info +842 tlm: telem_forwarder starting: built Sep 22 2016 15:31:01
Apr 10 10:53:30 3dr_solo local4.info +846 tlm: serial port: /dev/ttymxc1
Apr 10 10:53:30 3dr_solo local4.info +847 tlm: serial baudrate: 115200
Apr 10 10:53:30 3dr_solo local4.info +847 tlm: serial hw flow: true
Apr 10 10:53:30 3dr_solo local4.info +852 tlm: UDP dest port: 14550
Apr 10 10:53:30 3dr_solo local4.info +852 tlm: use GPS time: true
Apr 10 10:53:30 3dr_solo local4.info +852 tlm: tos: 0x7f
Apr 10 10:53:30 3dr_solo local4.info +852 tlm: opened port 14560
Apr 10 10:53:30 3dr_solo local4.info +853 tlm: opened serial port /dev/ttymxc1
Apr 10 10:53:30 3dr_solo local4.err +955 tlm: poll returned zero
Apr 10 10:53:31 3dr_solo local4.info +088 tlm: adding new client 10.1.1.10:36521
Apr 10 10:53:31 3dr_solo local4.info +088 tlm: ARP: Seen (254/17) from 10.1.1.10:36521 client=0x7647cc44
Apr 10 10:53:31 3dr_solo local4.info +089 tlm: ARP: Seen (57/57) from 10.1.1.10:36521 client=0x7647cc44
Apr 10 10:53:33 3dr_solo local4.info +205 tlm: adding new client 127.0.0.1:35846
Apr 10 10:53:33 3dr_solo local4.info +205 tlm: ARP: Seen (255/0) from 127.0.0.1:35846 client=0x7647cc44
Apr 10 10:53:40 3dr_solo local4.info +859 tlm: down: 0 m/s, 16 b/s, 0%; up: 1 m/s, 31 b/s, 0%
Apr 10 10:53:50 3dr_solo local4.info +860 tlm: down: 0 m/s, 16 b/s, 0%; up: 2 m/s, 35 b/s, 0%
Apr 10 10:54:00 3dr_solo local4.info +860 tlm: down: 0 m/s, 16 b/s, 0%; up: 2 m/s, 35 b/s, 0%
 
Joined
Mar 10, 2016
Messages
348
Reaction score
131
Location
Plymouth, MN
Take a look at pixhawk.py:
OpenSolo/sololink

There is a function called resetParameters--that's the guy you want to execute. Then reboot the pixhawk (stop and start Solo).
 
Joined
Apr 10, 2018
Messages
6
Reaction score
1
Age
32
Take a look at pixhawk.py:
OpenSolo/sololink

There is a function called resetParameters--that's the guy you want to execute. Then reboot the pixhawk (stop and start Solo).
Thanks.

I can see in the logs this file is being executed (below logs)

I was thinking of editing it, and just before pixhawk.py finished, I could add a call to resetParameters. Then after a reboot, restore the original file.
I suppose that should work right? I have to wait until tomorrow as I don't have physical access to the drone right now.

Thanks for the suggestion, will let you know if it works. :)

Apr 10 10:53:02 3dr_solo local1.info pix: pixhawk.py starting
Apr 10 10:53:02 3dr_solo local1.info pix: checking baud...
Apr 10 10:53:05 3dr_solo local1.info pix: not at 115200
Apr 10 10:53:07 3dr_solo local1.info pix: not at 115200
Apr 10 10:53:10 3dr_solo local1.info pix: not at 921600
Apr 10 10:53:12 3dr_solo local1.info pix: not at 57600
Apr 10 10:53:15 3dr_solo local1.info pix: not at 230400
Apr 10 10:53:17 3dr_solo local1.info pix: not at 460800
Apr 10 10:53:20 3dr_solo local1.info pix: not at 1500000
Apr 10 10:53:20 3dr_solo local1.err pix: not detected at any baud
Apr 10 10:53:20 3dr_solo local1.err pix: finding baud
Apr 10 10:53:20 3dr_solo local1.err pix: pixhawk status: no response
Apr 10 10:53:20 3dr_solo local1.info pix: no new firmware file
Apr 10 10:53:22 3dr_solo local1.warn pix: no version hashes received
Apr 10 10:53:24 3dr_solo local1.warn pix: no build version received
Apr 10 10:53:24 3dr_solo local1.info pix: now running:
Apr 10 10:53:24 3dr_solo local1.info pix: build_version unknown
Apr 10 10:53:24 3dr_solo local1.info pix: ardupilot_git_hash unknown
Apr 10 10:53:24 3dr_solo local1.info pix: px4_git_hash unknown
Apr 10 10:53:24 3dr_solo local1.info pix: nuttx_git_hash unknown
Apr 10 10:53:24 3dr_solo local1.info pix: pixhawk.py finished
 
Joined
Apr 10, 2018
Messages
6
Reaction score
1
Age
32
Hi all,

Thanks for your help!!!

It worked - eventually - I ran into one more issue which is: during factory reset, the pixhawk.py file was replaced with a default one.
Without factory rest there was no connection to the pixhawk - so I did the factory reset - without the first flight update.

Then connected to the drone via SFTP, there was no pixhawk file then - so I pasted mine - along with some .pyc files it needed (which I saved before), and then via SSH I ran the pixhawk file with the -u option - check USB. And I also changed the code to reset parameters if verify_usb is true - which means it was able to connect to the pixhawk via a USB serial connection (internal to the drone).

That way the parameters were reset - I knew they were because gimbal was no longer level. After that I did a factory reset of the remote also, and the mandatory update via the phone app, and after compass + level calibration everything was fine again. :)

Thanks again and have a great day :)

More technical details below:
save all files from /usr/bin before starting.

Attaching used file if someone needs it someday (just remove the .txt extensions).

Do this at the point of all blue lights, after the disco lights - many colors. Wait for drone to connect to remote WiFi (or keep trying SFTP connection for about 1-2 minutes).

Connect to remote WiFi, then via a SFTP client (I used filezilla), use

ip: 10.1.1.10
username: root
password: TjSDBkAu

via SFTP:
Copy pixhawk.py to /usr/bin,
And all the .pyc files saved earlier

Then via SSH (same credentials),

cd /usr/bin, then run:
python pixhawk.py -u

At this point the parameters should be reset - after a restart (power off / on).
 

Attachments

Last edited:
  • Like
Reactions: carpy

New Threads

Forum statistics

Threads
12,500
Messages
144,272
Members
14,579
Latest member
litzer