Jump to content

hooded_warrior

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by hooded_warrior

  1. 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 192.168.1.150 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 192.168.1.1 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? Thanks!
  2. 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?
  3. 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.
  4. 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)
×
×
  • Create New...