Jump to content

Crashing MR-3020


Recommended Posts

I've got several MR-3020's that I have flashed with OpenWRT and mounted a 16GB ext4 USB drive on it. Upon boot, a daemon shell script is started which does two things:

1) It constantly looks to see if my main program is running and if not starts up the python script

2) It compares the lasts heartbeat timestamp generated by my main program and if it is older than 10 minutes in the past kills the python process. #1 is then supposed to restart it.

Once running, my main script goes into monitor mode and collects packet information. It periodically stops sniffing, connects to the internet and uploads the data to my server, saves the heartbeat timestamp and then goes back into monitor mode.

This will run for a couple hours, days, or even a few weeks but always seems to die at some point. I've been having this issue for nearly 6 months (not exclusively) I've run out of ideas. I've got files for error, info and debug level logging on pretty much every line in the python script. The amount of memory used by the python process seems to hold steady. All network calls are encapsulated in try/catch statements. The daemon writes to logread. Even with all that logging, I can't seem to track down what the issue might be - the device just seems to freeze.

Any advice on how to further track this down?

Link to comment
Share on other sites

Could you elaborate on "crash"? Does your script die but if the device otherwise completely responsive, or did the device itself die along with it? How certain are you about the quality of the power delivery to the device? Might it be overheating? Does the device log suggest anything is amiss? Did you try running your python script from a looping bash script so that if it dies it instantly gets restarted and if so, does it successfully start immediately after dying or does it need a few more tries, suggesting that the radio ended up in some invalid internal state?

Link to comment
Share on other sites

I've got an MR3020 with an 8GB USB stick running AA 12.09 r36088. I mount the filesystem on it along with my program that I've written which is supposed to run indefinitely but stops after anything between a couple hours to a week. I've got ridiculous amounts of logging in my python script, and a daemon script that monitors for both when the process doesn't save to a heartbeat file for 10 minutes as well as if the process doesn't exist at all. But the logging doesn't show anything out of the ordinary and the daemon doesn't keep it going. As for power, I use the standard 5V powerpack that comes with the device.

I think the USB drive is somehow unmounting itself. If that were the case then both the main program and daemon wouldn't be loaded. The reason I think that is that I set the IP Address to but after the program it stops saving to my server I find that I can't SSH in using that address. I have found that I can SSH into the default and there are only 16MB mounted. If I restart the router then everything loads back up with the USB drive mounted and the IP Address back at 150.

I spent several hours reading https://forum.openwrt.org/viewtopic.php?id=39956. It seems similar to the issues I'm experiencing but I am pretty confident that my USB stick is not Low Speed. I've included the relevant dmesg output below.

Any thoughts on why the USB drive might be unmounting? Or is there something else that might be happening that I am not thinking of?


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...