Posts

Showing posts from 2016

TOWL - Telemetry over Opportunistic WiFi Links

Image
Premise & Background: Can you build a "LoJack" style asset tracking capability using open WiFi hotspots? The proliferation of cheap, lightweight WiFi embedded ("IoT") devices made me wonder.  The WiFi association stack, DHCP client stack, et al. has to be incredibly lightweight and simple to fit in the firmware on, say, an ESP8266.  If you programmed one to scan, find an AP, associate, get an address, and send a single packet - would it be able to do it fast enough to report its location from a moving vehicle? [Aside: This is actually something I've wondered about for years, but the IoT chips offered a unique and low-cost way to try it.] "But wait," you say, "there really aren't that many open APs these days.  Most of them are captive or paywall portals, or at least make you agree to some goofy ToS." Right, but as has been pointed out multiple times by multiple people all the way back to Dan Kaminsky's DNS tunneling ta...

Script to toggle LEDs on the Netgear Nighthawk AC1900 / R7000

Image
I recently purchased the Netgear Nighthawk AC1900  dual-band router, to go along with my new faster Internet connection. First off, I'll say- I wasn't a fan of Netgear's past home routers, but this one is quite amazing!  Not only can it keep up with my 1Gbps fiber connection, it also seems to have massively improved the wireless situation in my home over my previous Linksys router. Anyway, enough of that.  One funny thing about this router, in addition to looking like a 1990s stealth aircraft, is that it's covered with SUPER HIGH INTENSITY WHITE LEDs.  They add to the sleek look, for sure, but you can practically read by them in a dark room.  (!)  Not so great if you happen to sleep in the same room with the router. Thankfully, the Advanced Setup UI provides a mode to turn off all the LEDs (save for the power LED, which I just stuck a piece of gaffers tape over.) I like  the status LEDs, though, so I thought - wouldn't it be nice to be able t...

Interactive Modemspeed - SSH like it's 1995.

Image
A couple of years ago I created a simple python program to simulate various modem speeds when you piped a command through it.  Easy, fun, but of limited use. So, I revisited it and made the read portion non-blocking so that it can be used interactively.  The aim is to have a script I can pipe SSH through to make the remote connection act like it's behind an oldschool modem. Voila:   interactive-modemspeed.py Usage: $ ssh remotehost | /path/ interactive-modemspeed.py speed Substitute /path/ with the location of the script. Substitute speed  with the speed (in bits per second) you want to experience.  If you omit  speed , you get 300 bits per second.    Did your friend leave a terminal unlocked?  Why not have some fun? $ function ssh() { /usr/bin/ssh "$@" | /path/ interactive-modemspeed 2400 ;} (Make sure to put the absolute path to the ssh binary so you don't create a bash fork loop.  :-P) N...

Generic $5 128x64 OLED SPI display with Arduino Pro Micro

Image
I bought a couple of ~$5 generic 128x64 graphic OLED displays on eBay to play with.  It took some trial and error to figure out how to get the Arduino Pro Micro to talk to them, and there's lots of different information on the net about doing so (probably owing to the wide variety of implementations of these displays and generic controller chips.) This particular one uses the SD1306 controller and is wired for a 4-wire SPI interface. I used the u8glib library to talk to it.  The "gallery" page on the library repo provides lots of examples of people's various combinations to make these work.  This particular one wasn't shown, but by perusing through the different examples I was able to find a combination that worked. Wiring: I'm using the SW SPI function of u8glib, so I don't have to use the ARM chip's native SCK or MOSI pins.  I found that this device will accept data without the CS pin connected (pulled low instead), so I left that out to s...