Pi-ratebox, wireless, ideas.

Posted by SuriRaven 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Pi-ratebox, wireless, ideas.
May 06, 2013 05:56PM
I'm working on putting together a piratebox on a Raspberry Pi. It's not gone too badly, but I've encountered a few problems:

1. The hostname 'piratebox.lan' - Android really doesn't like it at all. My tablet wouldn't even consider it a valid name. I changed a few things to go by IP instead, and it worked.

2. I'm using rt5370 USB adaptor and hostapd. It works. It's stable. It's also slow: Of my two cards, one doesn't want to go over 5.5Mb/s connection and the other will sometimes go higher, but doesn't seem to actually transfer data any faster. I'm ordering some alternatives to try off ebay, after a whole day of fiddling with hostapd.conf settings proved fruitless.

3. I put together a little program that randomises the wireless interface MAC address before hostapd starts. Sneaky. As some of the uses for pirateboxes may involve some covert operation, it seems a good idea: It'd make it harder to track which events a given device pops up at, and it makes pinning ownership on someone harder too.

4. The webpage and chat function seem a little script-heavy. I'm not sure what I can do about that, but I intend to have a go.
Re: Pi-ratebox, wireless, ideas.
May 06, 2013 06:53PM
>>>1. The hostname 'piratebox.lan' - Android really doesn't like it at all. My tablet wouldn't even consider it a valid name. I changed a few things to go by IP instead, and it worked.

Did you try to use a different hostname? Can you confirm that dnsmasq is working correctly?

>>>> 2. I'm using rt5370 USB adaptor and hostapd. It works. It's stable. It's also slow: Of my two cards, one doesn't want to go over 5.5Mb/s connection and the other will sometimes go higher, but doesn't seem to actually transfer data any faster. I'm ordering some alternatives to try off ebay, after a whole day of fiddling with hostapd.conf settings proved fruitless.

I believe that hostapd is not the problematic performance point... hostapd is only announcing the SSID .. I think that the most critical part is the driver & chipset of your wifi card.


>>>> 3. I put together a little program that randomises the wireless interface MAC address before hostapd starts. Sneaky. As some of the uses for pirateboxes may involve some covert operation, it seems a good idea: It'd make it harder to track which events a given device pops up at, and it makes pinning ownership on someone harder too.

What do you want to achieve.. can you exclude that your mac changer does not cause the transfer-speed problems?


>>> 4. The webpage and chat function seem a little script-heavy. I'm not sure what I can do about that, but I intend to have a go.
We know, that the webpage is not the nicest one. What do you mean with "script-heavy"? What do you want to change?
What don't you like (beside the design)?

Matthias
Re: Pi-ratebox, wireless, ideas.
May 06, 2013 08:45PM
After a good part of a day fiddling, I've worked out the problem with 2: A not-very-good rt5370 driver. Very CPU-intensive. The hint is in the kworker thread that starts taking all available cycles once you push any significent amount through the wireless interface. Some googling shows other pi-users have had the same issue, so just using another wireless adaptor type should do it.

The MAC-changer is useful if you're running the piratebox covertly, snuck into public events or distributing files your government disapproves of, as it provides some level of defence in two scenarios:
- It stops an investigator tying one box to multible events. If you get caught, the MAC could otherwise be used to prove you were also operating the box on previous occasions where it was noticed and logged. This way if you get caught, at least you only get caught for the one time.
- It makes proving ownership harder. Even if you encrypt the filesystem or wipe the SD when you get home, anyone who can sieze your wireless adaptor can just match MACs to prove you are the owner of a device previously recorded.

With MACs changing, any investigator couldn't even tell how many piratebox operators were active - it could be ten people, or just one traveling a lot. I've confirmed that changing MAC isn't responsible for the throughput issue - though I can only give this assurance for the rt5370 as of yet. I've ordered more adaptors to play with.

The webpage I can't comment on much yet, as I've still not gotten it to work. Once I've gotten my roll-your-own done, I'll grab the ready-made image and examine a properly-functional box.
Re: Pi-ratebox, wireless, ideas.
June 17, 2013 01:33PM
Could I please get a copy of the MAC script?