7 ms·
Ambient bus arrival monitor from hacked Linksys WRT54GL
- dfc 15y agohttp://blog.jgc.org.nyud.net/2012/03/ambient-bus-arrival-monitor-from-hacked.html http://blog.jgc.org.nyud.net/2012/03/ambient-bus-arrival-mon... In case its not up...
- jgrahamc 15y agoIt'll be up... it's managed by CloudFlare.
- dfc 15y agoThe first time I tried it was down. I got some error, maybe its because it was looking for the mobile theme. FYI, I just received the following: ERROR The requested URL could not be retrieved Sorry, we can't open the web page that you requested because the server hosting the web page might be unavailable. Possible solutions: - Try again later. - Contact the web page administrator. Error Code: 10005
- eliben 15y agoCool hack, nicely done!
- darklajid 15y agoAmazing. Unfortunately it makes me sad to see so nice ways of using the public transport data - and having it not available everywhere where I'd care. In Cologne/DE I actually sent mails and calls to a bunch of contact addresses (both technical and marketing/customer service) and tried to get access to similar data for the bus and subway lines. They .. don't get it. Open data seems to be scary.. Well done, this project is technically interesting and looks decent enough to sit in a room that is partially controlled by my SO _and_ it's useful. Full points.
- Ecio78 15y agoSame here in Italy. They're just starting now to understand that OpenData is the way to go, but it's a looong road. I know that there's also a European multi year program, I hope something will happen.. ps Great hack John!
- pmjordan 15y agoSimilar problem in Vienna/Austria. They actually used to make their data available upon request, which meant proper Google Maps integration, etc. Via some backroom deal, the data is now only available to one company which has done a terrible job of putting user interfaces (mobile apps, web site) on it.
- VMG 15y agoHave a look at the Öffi Android app: http://oeffi.schildbach.de/ http://oeffi.schildbach.de/ That guy somehow figured out how to get the data for a lot of cities, Cologne being one of them. Maybe he knows how to get it.
- derwildemomo 15y agoActually, fyi, the company that is responsible for most of the schedules and time tables is hacon, and the system they offer is called hafas. If you search for the term, you'll find that many, if not most, european transportation providers rely on them for their services. That's why I can search for a train in suburban france using my deutsche bahn-iphone app. it would only be a matter of understanding that one api and the data would be open ( without any screen-scraping or other hacks involved ).
- derda 15y agoA friend of mine started to reverse engineer the API, that the DB-Navigator App uses, as it covers pretty much every public transport in Germany and at least trains (and sometimes trams and buses) in all of Europe. It can even give you a route to Pjönyang, North Korea. I don't know how successful he has, though.
- 15y ago
- danielharan 15y agoA small ISP could copy this and turn it into a great publicity hack. Imagine a display that is pre-configured with their router for your address. That definitely would get press coverage.
- StavrosK 15y agoThat's a fantastic hack! I have just one question, how did you use stty to talk to the serial port with Lua? I have a LEGO Mindstorms set I want to program, and I flashed pbLua on it and am building a little framework to talk to it, but it's having trouble sending lots of text to the serial port (the brick freezes). What I'm doing is similar to what you are (as far as I know, anyway, I'm pretty new to Lua), which is just opening and writing to the socket. I can get/send text, but I'm wondering if there's some other mysterious setting I need to change for it to work. Also, since this is serial over USB, I'm not sure if it's the same thing at all, actually...
- rogerbinns 15y ago> how did you use stty to talk to the serial port with Lua The stty being used is the command line program. You can find it on any regular Unix box. It is used to set baud rate, stop bits and similar details, not to do the actual communication which should work just fine once the parameters have been set correctly.
- StavrosK 15y agoNo, I understand that. I'm just unsure whether there's a parameter that can make my terminal hang or whether it's completely irrelevant due to the USB connection. In my Lua code, for example, I have to pause a bit every line, otherwise it hangs. I'm wondering if that's normal.
- drsim 15y agoTotally awesome! I live in London and use the TFL website every day, but had no idea the live bus departures thing existed.
- peteri 15y agom.countdown.tfl.gov.uk is the mobile version which last time I looked wasn't obvious from the website.
- drewda 15y agoFrom the headline, I was hoping that this would somehow use the hacked access point to listen for some sort of WiFi signal from the busses and be able to measure when they are nearby (rather than fetch that information from a Web service).
- nabilt 15y agoGreat hack. For the Canadian folks here is the open data initiative with similar APIs http://toronto.ca/open http://toronto.ca/open. Likes for Ottawa, Edmonton and Vancouver are on the right. [Edit] Direct link for North America http://www.nextbus.com/predictor/agencySelector.jsp http://www.nextbus.com/predictor/agencySelector.jsp
- bretthopper 15y agoHacker News often leaves me jealous of someone's programming skills, but this has made me realize that electrical engineering feats more often lead me to say "I wish I could do that".
- joshu 15y agoStart by not being afraid. This stuff is pretty accessible these days.
- nivertech 15y agoAnybody has a reference for the JSON API referenced in the article?
- mattmillr 15y agoHe links to the site that uses it. It's not hard at all to use your browser's developer tools to inspect the requests that site is making and find the one that returns a JSON list of all the busses for a given stop. Give it a shot, no reference needed.
- djb_hackernews 15y agoNice, never thought of using a stereo head phone jack as a serial adapter. Does Lua really have no way to put the current thread to sleep? does that busy loop affect the routers capabilities to route?
- justincormack 15y agoLua can sleep no problem.
- stephengillie 15y agoThe apk you are looking for is One Bus Away. It does this for Seattle only.
- ktizo 15y agoCould you use this data feed to enable ferrying little autonomous quadcopters around london on the roofs of buses and just get them to make short hops from bus to bus to save on power when getting about?
- joshu 15y agoI wish there was stuff like wrt54gl with just a bit more hardware IO and ram/storage. RaspberryPinis halfway there but it is more of a conventional PC. Maybe something like a beaglebone with half the MHz would be good. I've been using TP-link 703n for projects - wifi, USB, Ethernet, and about 2x the storage of a wrt54gl. Different archtecture so half the packages under openwrt are missing.
- Ecio78 15y agoI was just doing some research in the past days for linux/bsd based router (I need it for OpenVPN), and i found: - some lowcost TP-link wifi routers that can use openwrt / ddwrt like the one you used [1] - a Buffalo router that seems to ship already with ddwrt, and of course you can upgrade it too to newer versions [2] - the Miktrotik Routerboard devices, really lowcost but runs a modified linux os so I dont think they're ok for you (afaik you can just do some scripting) [3] - many appliances that can run pfsense but are not so cheap[4] I'm still tryin to understand, if I choose a wrt solution, what's best between openwrt and ddwrt (it seems there are sometimes problem with wifi not working etc..) [1] http://www.tp-link.com/en/products/details/?model=TL-WR1043ND http://www.tp-link.com/en/products/details/?model=TL-WR1043N... [2] http://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-G300NH http://www.dd-wrt.com/wiki/index.php/Buffalo_WZR-HP-G300NH [3] http://routerboard.com/ http://routerboard.com/ [4] http://www.applianceshop.eu/index.php/firewalls/opnsense/opnsense-wl-pfsense-appliance.html http://www.applianceshop.eu/index.php/firewalls/opnsense/opn...
- joshu 15y agoMain difference is cli vs web, really. What are you tying to build? You might try a routerstation (pretty buff for a router) or even PCEngines Alix (which is x86 geode based and has a LOT more ram and uses CF for storage.)
- Ecio78 15y agoI need a VPN endpoint for a small office (max 3 users), unfortunately I must put it behind another router that allows only tcp/udp port forwarding, so I cant use pptp or ipsec. I'm thinkin about using one of the above solution as an OpenVPN appliance.
- peterhajas 15y agoSounds really interesting, but I was unable to read the post at much length. The mobile version of your site (reading from iPhone) seems to want to activate strange gestures half the time when I scroll.
- SkyMarshal 15y agoGreat hack. Slight diversion but I just bought that router a few weeks ago, flashed it with Tomato Speedmod firmware [2], and love it. First router I've owned in years that is fast, has no lag, no drops, no hangups, and is completely trouble free. Plus, Linux (ssh, etc). I think that's due to the combination of stable, reliable hardware and continually evolving OSS firmware [1][2][3][4] It also occurs to me the extent to which software can squeeze every ounce of power and performance out of even old hardware, but requires time to evolve and optimize (the last 20% of performance/reliability requires 80% of the work, but makes a big difference). Hence, this 2004 router is better than any other router I've owned since then. And I'm not alone in that assessment, as positive reviews are still rolling in weekly [5][6]. In Bill Gate's day, 640k was enough for any good programmer. Eg, systems were hardware bound. But now that appears reversed, and in many cases systems don't reach the hardware's limits simply because the software isn't given enough time to evolve and optimize. By the time the software gets to, say, 80% of the hardware capability, the model is discontinued for a shiny new one, but with software that's starting over again on a new platform. Thankfully that's not always the case, as with this router, or all of Apple's products for instance. 1. Tomato: http://www.polarcloud.com/tomato http://www.polarcloud.com/tomato 2. Tomato speedmod: http://touristinparadise.blogspot.com/2008/04/linksys-wrt54gl-routers-improving.html http://touristinparadise.blogspot.com/2008/04/linksys-wrt54g... 3. OpenWRT: http://openwrt.org/ http://openwrt.org/ 4. DD-WRT: http://www.dd-wrt.com/ http://www.dd-wrt.com/ 5. http://www.newegg.com/Product/Product.aspx?Item=N82E16833124190 http://www.newegg.com/Product/Product.aspx?Item=N82E16833124... 6. http://www.amazon.com/Cisco-Linksys-WRT54GL-Wireless-G-Broadband-Router/dp/B000BTL0OA/ http://www.amazon.com/Cisco-Linksys-WRT54GL-Wireless-G-Broad...
- swah 15y agoI bought a "Linksys by Cisco" router thinking "no more generic china routers, this thing will work so well out of the box yay" and it was crap (WRT160N). I also had to install DD-WRT in it (because it would slow down after a while), but most people will just live with a slow router.
- SkyMarshal 15y agoI considered that one also, but its Amazon and Newegg reviews made it clear that despite the fact that the WRT160N is positioned as the successor the WRT54GL, WRT54GL > WRT160N.
- cpeterso 15y agoI thought this article was going to be about how he hid a Linksys WRT54GL on the actual buses to gather the real-time bus data himself! <:) One could hide Raspberry Pi devices on the buses that are programmed to geolocate using Wi-Fi networks along the bus route and then opportunistically use any open Wi-Fi networks to upload their current position.
- icebraining 15y agoConnecting to Wi-Fi on the run is probably not feasible most of the time. DHCP is slow on most residential routers. Maybe it could work by cheating (e.g. sending UDP packets to multiple common IPs of routers, like 192.168.{0,1,2,3}.1, without waiting for DHCP), but the auth frame exchange alone would probably take too much time.
- pflanze 15y agoI haven't tried these tips myself but they are supposedly making access to wifis from a bus a real possibility: http://syn.theti.ca/2008/10/25/wifi-roaming-on-the-move/ http://syn.theti.ca/2008/10/25/wifi-roaming-on-the-move/ .
- matthewowen 15y agoVery nice! I've been very interested in mobile bus times, so I built better mobile sites for live bus times from: Oxford - http://www.oxbus.co.uk http://www.oxbus.co.uk and London - http://londonb.us http://londonb.us They both harvest live bus arrivals data from the relevant providers, then send it out based on the user's location - basically, it's a really quick and easy user experience when you're out and about and want to know how long until the next bus at a nearby stop.