Bad logging error

@HarrisAerial,

Thanks for the suggestion. Why would this work? Not questioning your suggestion, just wondering what this would change?

I am troubleshooting the same issue. Been chasing a bad logging message for
months.

How readily can you reproduce this issue?

card is formatted to FAT32

It’s been suggested that the filesystem may be having an effect. If you
can readily reproduce, please try vfat in place of fat32.

I have no idea what is causing the problem. Until I fixed it my drone is
unuseable. I need to log files to GEO tag images.

Consider using a small companion computer to keep you going;
dataflash-over-mavlink does work. You can run APSync on a RPi, taking up
minimal space.

Sucks

Agreed.

Yours,

Peter,
Thanks for the reply.

No luck replicating this. I can’t identify a discernible pattern, which is maddening.

Seems like if file formatting was a problem it wouldn’t log at all. In my case it logs for several minutes, then suddenly stops.

Really don’t want to add a companion computer to complicate my set up. Hoping to identify the underlying issue.

I’ll keep banging away. I am searching for clues in the tlogs right now. My most recent bad logging issue happened a few seconds after my gps status went from RTK fixed to DGPS. Don’t know if its a coincidence or not.

Thanks,

Dave

Don’t know. It worked for me in the past.

Hello Sir , can please clear meaning of deva ?

What will happen if we fly with Bad logging error ?

Nothhing, the drone will fly fine with bad logging. But you want have information to GEO Tag images or troubleshoot if you have any problems or crash

Heartily Thanks for your guideline . . . . Thanks

Sadly, I continue to lose the battle with logging. I’ve been chasing a bad logging error for months. Some flights are unaffected while others are. Yesterday, I flew and had no problems. Today I flew and got a bad logging error the moment I armed. Not sure what is causing this error. I’ve replaced the SD card numerous times and even swapped the pixhawk flight controller. So something in my set up must be causing the logging error. I am using Asterx as my primary GPS and backed up with a Usmile Beitian NEO-M8N GPS Module. I am sending a CORs correction to the gps board via mission planner using GPS inject. Same set up both days, one day no problem the next day, bad logging,

All the hardware, software and settings were identical. The only thing to change was the location (10miles) and the day.

Any ideas?

Thank you,

David

Sir,

Maybe this is hardware problem of flight control board, if you have any alternative flight control board than please test on that.

I was also faced many problems like you with my last Pixhawk, now I buyed new Pixhawk and everything is OK.

I tried swapping flight contoller. 3dr Pixhawk 1 for 3dr Pihawk 1. Unfortunately, that didn’t fix the problem. I suspect something in my set up, hardware or parameters, is causing the problem.

Thank you,

David

Was there ever a solution for this. I am running a GNSS v2 GPS and it was tossing a bad baro health at me so I backed down to 3.4.6. Now I get bad logging. So I replaced the card with a 4gb card and formatted to Fat16 and the logging error went away. But I also get no logging at all.

While I guess I can fly with out logging I don’t feel comfortable doing so as its a new build and logging helps to make sure I have it tweaked right.

Thoughts ayone

Hi folks - Hoping to hear of any new insights on this “bad logging” error.

Its been a year since the last post on this thread, and I’m seeing lots of other threads with the same or similar issues. Its been driving me nuts for months as I REALLY need logging to diagnose other issues. Its clearly very important if not critical to many others for troubleshooting and tagging/recording - so its kinda surprising everyone just seems to live with it.

Like others I have tried:

  • several different SD cards of various capacities, formatted in both FAT & FAT32
  • several different pixhawk-2.4.8 flight controllers
  • several different firmware versions (of Rover)
  • different values of LOG_BACKEND_TYPE & LOG_DISARMED param values

Like many others my results are highly intermittent and non-repeatable “bad logging” errors resulting in no flash log being produced.

Looking at discussions of micro SD card errors outside this community I see the following things to check:

-Unformatted or improperly formatted card
-Write protected card
-Malicious software/virus
-Bad sectors on card
-Bad contacts on card

The fact that all my cards are readable and writeable from 3 different PCs, pass chkdsk, etc, would seem to rule out all these possibilities, tho it does seem likely that the drivers and hardware in many pixhawks are not as robust as those in PCs, cameras, cell phones, etc.

To any developers reading this @rmackay9 : does the pixhawk SD driver return more information (e.g. on error sources above) that could be provided in the HUD beyond just “Bad Logging” ? That could be a huge help in narrowing down how to avoid it.

And if anyone has been able to correlate this error to anything else, please let us all know.

Regards, Tom

1 Like

@Tom_Freeman,

I’ll bring it up on the dev call tomorrow.

Personally I don’t see the issue much on my vehicles (using either Rover or Copter) but of course that doesn’t meant that there isn’t a problem. In recent versions we have added the ability to slow down writes to the SD cards (BRD_SD_SLOWDOWN parameter) and also made various other improvements to the drivers to improve reliability.

When I was going to print canon printer offline windows 10 was appearing everytime. I need this to be fixed as early as possible. Please help me with proper solution.

Could it be possible to restart the logging once a “bad logging” error has appeared?
I have had that issue on tens of cubes running 3.6.x. Some of them with BRD_SD_SLOWDOWN set to 8 and the issue comes rarely.

I have a hunch that certain frequency of vibration could make SD card pins to vibrate and cause power issues? With BRD_SD_SLOWDOWN on 8, the times that issue has appeared have been in extreme maneuvers which caused some excess vibrations (but no clipping).

Just complete restart for logging would be better than no logging at all.

I was having the same bad logging error after disconnecting the 915Mhz Mavlink transmitter until I changed LOG_BACKEND_TYPE from 3 to 1, then the Bad Logging message disappeared. I had no success deleting dataflash logs over usb Mavlink. What happens when the sd card is full?

This is the stock SD card? If not make sure you’re not using an SDXC micro sd… only SD HC will work.

Ben

This Pixhawk 2.1 Cube was recently supplied in exchange with ProfInc and has the card that was supplied in it. I have had no problem with logging, just the error on the flight data Mission Planner screen.

I seem to be slipping backwards. The logs show substantial size when Mission planner lists them, but when they are downloaded by usb Mavlink to the PC, they show filenames with 0 bytes in the PC directory. ???