hooded_warrior
-
Posts
4 -
Joined
-
Last visited
Posts posted by hooded_warrior
-
-
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?
-
Hi,
I'm wondering if anyone has seen tests that give a rough gauge as to how far a radius the wifi signal reaches on an MR-3020 at various txpower levels. I realize that the strength of the client device, as well as any physical obstructions, will create variance in this but I'm looking for general approximations.
-
Hi,
I've written a script in python to sniff packets on an MR-3020 running OpenWRT. Since there is only one radio I hop through channels 1 - 11 and then every 10 minutes get out of monitor mode, connect to the internet, and send the data up to my server.I can see lots of packets in the area, but when I filter for probe requests the amount of activity becomes MUCH more sparse. Every now and then I'll pick something up, but I'm sitting here with like 5 phones, an iPad, Sonos, a couple computers, etc. and would think that I should be picking up a probe request every couple seconds / minutes.
I'm wondering if I'm jumping channels or calling the sniff method too fast or slow and I'm just missing them all? Is there something else that I may be doing wrong? Thanks in advance!
class Main(): while run: logger.debug("Starting Sensor Run Loop.") sniffer.stop() hopper.stop() time.sleep(2) execute_command("wifi up") time.sleep(10) logger.debug("Do Internet Things.") try: logger.debug("Calling Saver.") Saver.save() logger.debug("Done with Saver.") except e: logger.error("There was a different error: %r" % e) pass start_monitor_mode() time.sleep(2) hopper_thread = Thread(target=hopper.start, name="hopper_thread") hopper_thread.start() sniffer_thread = Thread(target=sniffer.start, name="sniffer_thread") sniffer_thread.start() time.sleep(60*10)
class Sniffer(Thread): def start(self): self.run = True logger.info("Starting Sniffer Loop.") while self.run: try: sniff(iface=self.monitor, prn=self.process_packet, timeout=1) logger.debug("Sniffing") except: e = sys.exc_info()[0] logger.error(e) time.sleep(2) def process_packet(self, pkt): logger.debug(str(pkt.addr2)) if pkt.haslayer(Dot11ProbeReq): PacketQueue.add_packet(self._process_probe_request(pkt))
class Hopper(Thread): def start(self): logger.info("Starting Hopper Loop.") self.run = True max_channel = 11 while self.run: try: self.channel += 1 if self.channel > max_channel: self.channel = 1 self.execute_command('iw ' + self.monitor + ' set self.channel ' + str(self.channel)) logger.debug("Channel: " + str(self.channel)) time.sleep(1) except: e = sys.exc_info()[0] logger.error(e)
Crashing MR-3020
in Questions
Posted