Go Down

Topic: ARDUINO & DD-WRT (Read 4990 times) previous topic - next topic

Operation BC

I know there are many threads on this but I am very confused so if someone can help me out I will really appreciate it because nothing seems to work.

I wired a DD-WRT router (e1000) to arduino via serial and I want to pass data( like packages TX/RX) from the router to the arduino. Where shall I start? What is the logical sequence because for example when I login via the terminal (mac) to my router and try to echo to arduino nothing happens.

please help. thanks

Operation BC

ok I did the following:

I run this in arduino:
Code: [Select]
void setup(){
Serial.write("Hi, I am alive!");
void loop(){

and then I SSH to my Router and type in:

Code: [Select]
cat < /dev/cua/1  and I get :
Code: [Select]
-sh: can't open /dev/cua/1: no such file

and also tried this:

Code: [Select]
cat < /dev/tty.usbserial-A9007VSI and I get :
Code: [Select]
-sh: can't open /dev/tty.usbserial-A9007VSI: no such file

I saw this post here which was helpful but still I can't tx-rx between arduino and my router:
can somebody please explain. Thanks!

Operation BC

a bit of progress; with this code I am able to read and write from/to my terminal:

arduino code:

Code: [Select]
int incomingByte = 0;   // for incoming serial data
void setup() {
        Serial.begin(115200);     // opens serial port, sets data rate to 9600 bps
        Serial.write("Hi, I am alive!");

void loop() {

        if (Serial.available() > 0) {
                // read the incoming byte:
                incomingByte = Serial.read();

                Serial.print("I received: ");
                Serial.println(incomingByte, DEC);

by using these commands on my terminal

to write:
Code: [Select]
echo "Here I am" > /dev/tty.usbserial-A9007VSI 115200
to read:
Code: [Select]
screen  /dev/tty.usbserial-A9007VSI 115200

but when I SSH login to my router the above commands do not work,
when I try this command:

Code: [Select]
echo "Here I am" > /dev/tty.usbserial-A9007VSI 115200

I get this message:

-sh: can't create /dev/tty.usbserial-A9007VSI: Permission denied

any hint how to write to serial from within my dd-wrt SSH login much appreciated

Operation BC

when I SSH login in my router and I execute this command (in purple):
root@DD-WRT:~# ls /dev/tts/*
I get this:
/dev/tts/0  /dev/tts/1  /dev/tts/2  /dev/tts/3

are these the ports?

I tried all of the following from my router's login but I don't get anything on the arduino serial monitor:
echo "Here I am" > /dev/tts/0 115200
echo "Here I am" > /dev/tts/1 115200
echo "Here I am" > /dev/tts/2 115200
echo "Here I am" > /dev/tts/3 115200

any help appreciated


Jun 25, 2013, 08:45 pm Last Edit: Jun 25, 2013, 09:07 pm by sonnyyu Reason: 1
Do the popularity search at Google

"dd-wrt arduino"  About 47,500 results

"open-wrt arduino"  About 150,000 results

open-wrt arduino is three time more popular than dd-wrt arduino.

reflash e1000 to open-wrt and start over.


E1000 has Broadcom 47162@300MHz use 3.3V TTL level, the level converter might needed.

Plan A~E


The serial pins are labeled JP12 thru JP16.

VCC   JP12
TX   JP13
RX   JP14
Gnd   JP16

Operation BC

thanks a lot for the response and the hints. do you see anything wrong with the wiring in the attached image. any suggestions on the 'echo' command or how else can I verify that my serial works?
I am using this level converter:


Jun 26, 2013, 02:56 pm Last Edit: Jun 26, 2013, 02:59 pm by sonnyyu Reason: 1
The wire look OK to me.

The op is right. DD-WRT has got several negative points, and this one is just one in a series. For starters, you can see that its not really an open source solution, even at the filesystem level, not even ipkg works as in open distros. I have spent by now several months trying to make a fon both, a wireless client bridge and being able to unbind the serial console without success. I have flashed several diferent distros but none of them allowed for both.

OpenWRT failed on the client bridge, whereas dd-wrt fails on the most basic thing, which is to allow for the console to be unbound.


I use all three major open source router OS;- dd-wrt, open-wrt, tomato.

tomato for dual wan (more than one internet service provider).

dd-wrt for home basic router.

open-wrt for Arduino.

It is just matter of mouse click to change OS, why not?

Operation BC

Jun 26, 2013, 03:27 pm Last Edit: Jun 26, 2013, 03:38 pm by operation B C Reason: 1
thanks for the response. It is def a good option but I have a lot of code from other projects running on dd-wrt/e1000 which I guess I will have to modify for the open-wrt. If I won't find a solution with the dd-wrt, I will try open-wrt. I am just not that familiar with linux so the syntax might be wrong?thanks for any hints.

Operation BC

Jun 26, 2013, 04:02 pm Last Edit: Jun 26, 2013, 04:11 pm by operation B C Reason: 1
additionally to the commands I wrote above here is what I am using(in red) from my SSH login but I still can't 'echo':

root@DD-WRT:~# stty -F /dev/tts/0 raw
root@DD-WRT:~# stty -F /dev/tts/0 -echo -echoe -echok
root@DD-WRT:~# stty -F /dev/tts/0

and I get:

speed 115200 baud; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-brkint -icrnl -imaxbel
-isig -icanon -echo -echoe -echok

and then:

root@DD-WRT:~# echo "Here I am" > /dev/tts/0 115200

I get nothing on the arduino serial monitor


Your system has 3 blocks;-

  • e1000

  • level converter

  • Arduino

Switch to open-wrt to test, if it work at least you have 2 out of 3 blocks, then switch back to dd-wrt.

My standard procedure is;-

  • Replace software or OS

  • Replace hardware

  • Replace myself, let somebody else to do

Operation BC

lol I wish I could do this: 'Replace myself, let somebody else to do' but then explain to me howto.

I will give open-wrt a try. thanks!

Go Up