Level calibration not working, terminal is garbage

I’m running Copter 3.4.6 on a PX4Lite. This board previously worked with Copter 3.3, in a Cheerson CX-20 that I crashed, now I’m reusing it on an S500 frame. The main issue I’m having is a roll on takeoff. When I look at the HUD in Mission Planner, it’s obviously off even when level, and status was saying roughly 2.5 deg roll and 12.5 deg pitch. Multiple accelerometer calibrations have not changed it. I read somewhere that it may be an issue with Mission Planner not calibrating correctly, and that I should run the calibration through the CLI, so I tried to connect:

It just continues spewing characters, with lots of 'Q’s, forever. I reflashed the latest firmware, cleared my params, and I’m still getting the same thing. I can connect to nsh, but I don’t see any way to calibrate level from there. I also rolled back to AC 3.3.3, and I’m getting similar behavior both in level calibration and the terminal. I also have replicated this both on my desktop and laptop PCs, both running Windows 10, and over both USB and Bluetooth.

I took apart the FC, and found the IMU is connected to the main board by a flat flex cable. The IMU board was stuck to a piece of plastic the width of the FC and length of the IMU, with soft foam on either side that’s supposed to keep it centered in the case and vibration dampened. The plastic is folded and melted in the middle, it looks like someone got too close with a soldering iron, so the whole piece is curved and deformed, and the foam on one side of the IMU is full of whatever adhesive they used to attach it to the plastic. I made a new IMU mount using HK orange latex foam (probably a bit too stiff, but it’s what I had), the top of a pringles can, and double sided tape. The IMU seems like it’s now sitting very close to level, Mission planner now reports about 1.2 degrees of roll and .8 degrees of pitch. Recalibrating still doesn’t get rid of that last bit of roll/pitch, and I’d like to get this right before trying to fly again.

You do realize that the CLI was deprecated some time ago, right? Most ops are now done via the GUI.

Here’s the relevant section of the wiki that talks about this:


I’d seen that, I just interpreted “being phased out” as “still works for now”. I could have sworn it worked last year with 3.3.3. So what do you do when the GUI doesn’t work?

I’m not sure where you read that using the CLI was a good idea, but it isn’t. If it isn’t working in MP, there is 95% chance it won’t work with the CLI.

In any case, have you looked at trimming?

I’ve been trying to use the 1-axis accel trim, that’s what doesn’t seem to be working. I thought at first maybe it didn’t work because the IMU was so far off level, which is why I re-mounted it, but it still doesn’t seem to be making any difference.

EDIT: I didn’t actually find the info to recalibrate the accel with the CLI, it was my brother, and I’m not sure where he found it. I did want to run an accelerometer test through it. I found the CLI_ENABLE parameter a couple minutes ago, and CLI is now working fine.