Interfacing to NSLU2-slug running debian linux


I’m trying to interface an Arduino decimilla to an NSLU2 running Debian linux. I want to blink a light every time I get a serial character on the USB link to the arduino Here’s the code I’m running on the arduino

/* based on Arduino WebVisitors Blinker by */

int ledPin = 13;
int val = 0;

void setup() {
pinMode(ledPin, OUTPUT);

void loop () {

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

// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
for(int i=0; i<10; i++) {
digitalWrite(ledPin, LOW);


This works perfectly in the Arduino IDE… Ie. I can compile and upload, then go to the serial terminal, send a character and the main LED blinks as designed…

When I hook the arduino up to the NSLU2 the trouble starts… I am trying to send a simple char to the
arduino by doing

echo 1 > /dev/ttyUSB0

the communications lights on the arduino flicker… so I know i’m sending something… . but the main LED does not blink…

I’m trying to emulate what is suggested in ( I tried the above echo from php as in this article… same results as above)

I’ve also tried a variety of options on the echo including ‘echo -n’ sending newlines, etc… but still no luck .

In desperation, I hooked the same arduino board with the above code to a desktop system running ubuntu and had the same results (ie; blinking communications lights, but no blinking main LED) when I typed

echo 1 > /dev/ttyUSB0

The fact that I get this same behavior on the NSLU2 running Debian and the Desktop running Ubuntu seems to mean that it’s probably not anything unique in the NSLU2 setup that’s preventing the arduino from seeing the input.

I’m suspecting a data rate problem or something like that … I’ve experimented with the stty options as suggested here but that also doesn’t work…

Any ideas ?

Has anyone gotten an Arduino to talk to an NSLU2 ? If so… please let me know how you did it…

Thanks !