How to write DD-WRT C app?

3.1k Views Asked by At

I want to write a small proxy as a user-level program for the DD-WRT environment.

The proxy will read/write between a USB HID device (Arduino) attached to the DD-WRT box and a specific web server. The USB device will use an AT-style code. The web server uses HTTP.

I'm new to the DD-WRT environment.

Pointers to useful sample apps, GIT repos, blog posts, etc would be appreciated. Anything about getting started writing a DD-WRT app.

Googling has not been successful.

3

There are 3 best solutions below

1
On

http://www.dd-wrt.com/wiki/index.php/Development

If you want to write a kernel module for DD-WRT, this seems like a good start.

0
On

More Googling and reading has led me to:

  • Apparently, OpenWRT packages can be loaded onto DD-WRT systems. "Note that you can install any OpenWRT package, using ipkg." -- from a DD-WRT page
  • An intro to writing an OpenWRT package.
1
On

DD-WRT has packages for many useful things. Python and pyserial struck my attention.

It is trivially easy to write a HTTP server in python. It is equally easy to interface with a serial port in python.

Load kernel drivers for the USB serial emulator chip on your Arduino (mine has a FTDI chip). It will manifest itself as /dev/ttyUSB0 or something. Do everything else in python.