Router controlling choo-choos over the CAN bus

 

This setup is used to control a model railroad. Well, not entirely this setup. [Gerhard Bertelsmann] already has a proper railroad controller, and it just happens to offer CAN bus communications. He’s using OpenWRT and a cheap router to connect the bus to the network.

Originally he wanted to use a Raspberry Pi board for the project, but the incredible backorder  situation with that hardware led him to grab an old router. After loading OpenWRT he started working out how to connect a couple of ICs (MCP2515 and MCP2551) that will take care of the CAN bus communications. The hardware connections end up being pretty simple, with five data lines (and their pull-up resistors) connecting to the router’s serial header. From there it was a matter of mapping the device in software so that the hardware can be controlled over the network.

We like this example since CAN is used is a lot of other applications.

Nah, you don’t need an Ethernet module for your Arduino

[Andy] needed a cheap Internet connection between a data-gathering Arduino and his home server. An Ethernet shield would suffice, but he couldn’t run CAT5 to the Arduino’s location. Wireless shields are hideously expensive, and after looking over the popular Zigbee modules, [Andy] had a few concerns about range and build complexity.

The obvious solution to this problem was getting a cheap WiFi router, flashing OpenWRT firmware on the device, and piping sensor data through the Arduino’s USB port, through the router, and over a WiFi connection to the server.

[Andy] used a TP-Link TL-WR703N wireless ‘travel router’ available on eBay £15 (~$30 USD when we checked). After flashing the router with OpenWRT, [Andy] had a wireless connection from a remote data-collecting Arduino directly to his server.

Attentive Hack a Day readers will note this is the third ‘wireless router + OpenWRT as a dev board’ build this week (first one, second one) . No, we don’t know what’s going on, or why the collective unconscious of makers around the globe decided to latch onto this type of build so suddenly. OpenWRT is available for hundreds of different routers, and anything that keeps disused routers out of the landfill (with the bonus of doing something useful) is alright in our book, so if you have another similar build, send it in and we’ll get around to it sometime.

Adding a router and wireless camera to a remote controlled helicopter

Last Christmas, [bonafide] received a WiFi enabled remote control helicopter from his employer. The heli is an interesting bit of kit, able to be controlled with an Android or iDevice. Being the good tinkerer he is, [bonafide] took a screwdriver to his Wi-Fli Bladerunner Helicopter and reengineered the toy to use an off-the-shelf wireless router.

The protocol used by the Wi-Fli helicopter is closed source, but a few people have had their hand at reverse engineering this cool toy. Instead of simply controlling the helicopter over WiFi, [bonafide] wanted to add a few unsupported features like sending images from a webcam. This isn’t supported in the toy’s firmware, so after a valiant attempt at flashing new firmware, [bonafide] decided to replace the electronics with a WiFi router.

In the stock configuration, the helicopter receives commands from an RT5350F-based WiFi module. This module communicates to the servos and motors with a serial connection. [bonafide] replaced the WiFi module with a very small router capable of running OpenWRT. The new router was easily configured to send commands to the motors, and allowed [bonafide] to add a small keychain webcam to stream video back to his desktop.

Interestingly, the makers of the WiFli helicopter, Interactive Toy Concepts, are putting out a streaming-video version of this toy next fall. The current version of the WiFli helicopter may hit the Toys ‘r Us clearance bin before that, so if you’d like your own unmanned aerial drone [bonafide]‘s may be worth looking over.

Special thanks to [MS3FGX] for sending this one in. Also, the non-coral cache version of [bonafide]‘s site is here, but try not to turn his server into a pile of molten slag.

Complete guide to compiling OpenWRT

Regular reader [MS3FGX] recently wrote a guide to compiling OpenWRT from source. You may be wondering why directions for compiling an open source program warrant this kind of attention. The size and scope of the package make it difficult to traverse the options available to you at each point in the process, but [MS3FGX] adds clarity by discussion as much as possible along the way.

OpenWRT is an open source alternative firmware package that runs on may routers. It started as a way to unlock the potential of the Linksys WRT54G. But the versatility of the user interface, and the accessibility of the Linux kernel made it a must-have for any router. This is part of what has complicated the build process. There are many different architectures supported and you’ve got to configure the package to build for your specific hardware (or risk a bad firmware flash!).

You’ll need some hefty hardware to ease the processing time. The source package is about 300 MB but after compilation the disk usage will reach into the Gigabyte range. [MS3FGX] used a 6-core processor for compilation and it still took over 20 minutes for a bare-bones distribution. No wonder pre-built binaries are the only thing we’ve ever tried. But this is a good way to introduce yourself to the inner workings of the package and might make for a frustrating fun weekend project.

Cheap WiFi bridge for pen testing or otherwise

Twenty three dollars. That’s all this tiny pen-testing device will set you back. And there really isn’t much to it. [Kevin Bong] came up with the idea to use a Wifi router as a bridge to test a wired network’s security remotely. He grabbed a TP-Link TL-WR703N router, a low-profile thumb drive, and a cellphone backup battery; all cheaply available products.

No hardware hacking is necessary to connect the three components. The only other preparation needed is to reflash the router firmware with OpenWRT and load it up with common pen-testing software packages like Netcrack and Airhack.

[Kevin] calls this a drop box, because you find an Ethernet jack, plug it in, and drop it there. You can then connect to the router via Wifi and begin testing the wired network security measures. We’re sure images of espionage pop into your head from that description, but we’re certain this can be useful in other ways as well. If you ever find yourself with an Ethernet connection but no access to Wifi this is a quick way to setup an AP.

Extend your personal weather station’s reporting capabilities

This Nexus wireless weather station has an array of weather sensors that you mount outside and monitor on the LCD screen. It also has the ability to stream the data over USB, but that feature is only supported in Windows and the companion software leaves a lot to be desired. Here’s a technique that will let you unlock the potential of the data by streaming it to your Linux box or directly to the Internet.

It turns out that grabbing the data via Linux has been made quite easy thanks to a package called TE923 (translated). With the base unit connected via USB, the software will pull down a string of colon-separated data which will be easy to parse using your favorite scripting language. But what if you don’t want to tether this to a computer?

The project goes one step further by using a Carambola board. This is a WiFi board with a USB port on it. It runs OpenWRT so getting TE923 going is as simple as building the package. The best part is, any wireless router that runs OpenWRT (or DD-WRT, etc.) and has a USB port can substitute for this board. With the module connected to the station, data is pushed to the Pachube website to serve as a custom web readout.

[Thanks Saulius]

RAM upgrade for WRT300N router

[Heli] had a WRT300N wireless router sitting around collecting dust. He decided to squeeze at bit more entertainment value out of it by seeing if he could pull off a RAM upgrade. He managed to double the router’s RAM and posted a walk through (translated) to help you do the same.

Swapping out surface mount RAM chips isn’t the easiest thing in the world and you must wondering what prompted this. It seems he wanted to run the LuCI package on the router but it was slow (or even incapable) of booting with the stock hardware’s 16 Mb. He first sourced some pin-compatible replacement chips from an old Pentium III computer. While his soldering iron was hot, he also wired up a JTAG header, which connects via the red wires just visible to the left. When he first fired up the unit he was happy that it was able to boot, but it still only detected 16 Mb.

It turns out you’re going to need to roll your own kernel to get it to take advantage of the upgrade. Source code for OpenWRT is easy to find and there’s plenty of guides for compiling it. If you try this, make sure to read [Heli's] post carefully as he’s got some important configuration information that will help you to avoid bricking your router.