Raspberry Pi War Driving - Automated upload

The gear needed for wardriving

12 posts • Page 1 of 1
Hi all,
I'm new to the community (2 weeks old) so go easy on me.
As my first project I've written a guide on setting up a Raspberry Pi for War Driving. I've also written a script which automates the uploading to Wigle and any other FTP server you may have.
I've just published it, so there may be the odd typo so feedback welcome .

http://www.pi-resource.com/?page_id=378

Hope it helps!
Dusterz
Image
Hey dusterz! I loved your write up on the automated upload for raspberry pi war-driving.
I have all those parts and I am ready to build one myself. One question, slight tangent,
what do you use for your power source? I was thinking of installing one of these in my car
full time. Of course problem there is turning off the car, cutting the power to the pi. I think
your next project should be car-power with battery back-up and a switch that will send the
shutdown command to the pi. Something to think about anyway.

Keep up the great work!
Glad you like it :D

I've tested many supplies and I will be publishing a review on them shortly. I've basically made an adjustable load so I can test any power source from 0.5A to 10A and I've got a dozen or so power sources to review. As a sneak-peek, for an in car power source I can't recommend highly enough the:
- 45W 9A Hunda 5-Port https://www.amazon.co.uk/gp/product/B01 ... UTF8&psc=1
- TeckNet 4 Port PowerDash D2 9.6A/48W Rapid Travel USB Car Charger https://www.amazon.co.uk/gp/product/B00 ... UTF8&psc=1
They are both excellent. Good voltage output of 5.1v with a light load and they do not drop below 5.0v when supplying a full 2.5A on a single port. I've loaded them up to 9A (across the ports) and the lack of voltage drop was remarkable. (Surprisingly, for mains use, the official Raspberry Pi 2.5A PSU does not perform that well, dropping below 4.7v at full load! - more to come once I publish my results)

Another tip - don't skimp on the power lead. I was very surprised with my test results, but a 2m long good quality USB lead had hardly any negative effect on the supply voltage/current. I had bought some cheap leads of eBay that are only 15cm long thinking they would be better (shorter lead = less voltage drop), but once the load goes over 0.8A, the voltage drop was horrendous. I wonder how people have a good PSU, but then suffer power issues because they use an inferior cable!

Yet another tip - I also back power the Pi as the Raspberry Pi does introduce a voltage drop between it's supply and USB ports. Back powering helped immensely when powering power hungry USB devices.

As for the graceful shutdown in the car..... I'm on that to :) I have one made up and it's working lovely. I've designed a simple detection circuit which after 5 seconds sends a signal to the GPIO header on the Pi. A script then commences a graceful shutdown. In the interim super capacitors supply the Pi for up to 3 minutes to allow time for the Pi to do what it must. Doesn't cost much at all to assemble and the more capacitors you add the longer it will power the Pi - but I figure it just needs to be long enough to safely shut down. Once I'm done testing, I'll write and publish a guide on how to build one.

Good luck with your own installation. Cheers! Dusterz
Love this project! Keep up the good work!
Seems like the default action is for all my data files to be uploaded to your sever. Is that correct?

I'm not ok with that.
Could you expand on the idea of killing and restarting kismet every minute?

If I'm driving around, that doesn't seem like a good idea. I'd be losing packets while kismet is down. Maybe it's down for only a few seconds, but that could be a whole blocks worth of houses.
@clickwir.
Yes you are correct. If you want to stop future uploads to me then just change line 38 to: piResourceUpload=0
Currently my system deletes all data on a rolling 7 days anyway due to space limitations. It's in there because originally the script was designed for me and my friends to pool our own data for research purposes. I then tweaked it and published it for the wider community and hadn't really thought it would be an issue. When I next update my code I can set that feature to off by default as not to offend anyone.

If you want to PM me the MAC address of your Pi then I'll ensure anything you may have uploaded is deleted.

Apologies again - didn't mean to upset anyone, I just wanted to share what I had done.

Regards.
@Clickwir ref: killing kismet server.

Four reasons:

1st - when I ran kismet for a prolonged period of time I found that it crashed the Pi and I lost lots of potential AP data (I ended up wasting an entire day!). I therefore figured it better to reset kismet every 5 minutes or so. It restarts it as soon as the process is killed so in reality I thought the loss of 2 seconds worth of data every 5 or so minutes was worth it to ensure it would run for a prolong period of time. I've tested it and had mine running for 7 days straight without issue.

2nd - it forces kismet to write out its log file and terminate it nicely. If I didn't, I experienced issues with getting kismet to write the log file ensuring the XML was correctly terminated. Which then resulted in corrupt files being uploaded to Wigle.

3rd - it ensures the log files are not open for writing when the script attempts to copy them into an alternative directory for processing.

4th - If the Pi suddenly powers down un-gracefully. Then at most you've lost is 5 minutes worth, which will average out at 2.5 minutes worth. If Kismet had been running for an hour without stopping then you risk loosing the full hours worth.

You can change the length of time the script waits before restarting Kismet, line 29:
timerRepeat=xxx
Where xxx is the number of seconds, I.e. To wait an hour then use 3600.
@dusterz

Thanks for getting back about those. Uploading to your site for you and your friends is a great idea. However, when it's good enough to share with everyone (and it looks pretty nice and clean), yea it's a good idea to remove that part.

I think I might give it a try. Stability used to be an issue for me with kismet running for a long time, but I haven't seen it in a few years. If it doesn't feel like there's a big gap in use, it might not be so bad.

You should also check out this guys stuff: viewtopic.php?f=3&t=2419

That is also pretty slick and I'll be using parts of that in my setup as well. Particularly the udev rules for inserting a USB WiFi adapter after kismet is already started.
Hi all,

I've updated my project and added the following 'cool' feature :)

UPS :D No more abrupt shut downs :mrgreen: It allows the Pi ample time to upload all of your logs once you've parked up and turned the car off.

(1) I've added compatibility for the ModMyPi UPS - When the car is turned off the script detects the UPS is in Battery mode and then commences to try a limited (currently 10 attempts - but fully configurable) number of attempts to upload the data before then safely shutting down. If the power is restored in the mean time then it continues as normal.

(2) Updated so that your configuration file is separate - you no longer have to alter the main script and re-enter your config every time you download an updated version.

(3) Updated to works with Raspbian Stretch.

Enjoy!

Link to the UPS module - https://www.modmypi.com/raspberry-pi/po ... 1/ups-pico

Link to my blog with the project and the code - http://www.pi-resource.com/?page_id=378
Here is my Raspberry Pi war drive thingy:
viewtopic.php?f=3&t=1916&p=9677#p8882

Biggest problem was to make working browser gui for it.
Hi all,
I'm new to the community (2 weeks old) so go easy on me.
As my first project I've written a guide on setting up a Raspberry Pi for War Driving. I've also written a script which automates the uploading to Wigle and any other FTP server you may have.
I've just published it, so there may be the odd typo so feedback welcome .

http://www.pi-resource.com/?page_id=378

Hope it helps!
Dusterz
Image
automatic upload is exactly what i was searching for. thank you!

12 posts • Page 1 of 1

Return to “Net Hugging Hardware and Software”

Who is online

Users browsing this forum: No registered users and 3 guests