I have a logic level convertor from sparkfun. http://www.sparkfun.com/products/8745
I have a RS232 convertor from SF. SparkFun RS232 Shifter Board Kit - PRT-00133 - SparkFun Electronics
I have arduino duo 5v and a Buffalo router with serial pins that run at 3.3v.
Using a simple sketch to echo whatever the arduino receives over serial
/*
* Reflect serial input back.
*/
int ledPin = 13; // LED connected to digital pin 13
void setup()
{
Serial.begin(115200);
pinMode(ledPin, OUTPUT);
}
void loop()
{
digitalWrite(ledPin, LOW); // sets the LED on
while (Serial.available() > 0) {
Serial.write(Serial.read());
Serial.write("blah");
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000);
}
}
Using arduino connected via usb using serial monitor my LED lights up and whatever I type is echoed.
Arduino -> RS232 board -> PC via putty I can light the led and get the reply from arduino.
Buffalo -> RS232 board -> PC I cancat < /dev/tts/0 and read whatever I type in putty.
From an SSH console on the router I can
echo blah > /dev/tts/0 and read it via putty on the PC
If I setup a test sketch in arduino that just does a serial.write("blah") or serial.printline("blah")
Then arduino -> Logic convertor -> router
Via SSH I can see arduino blah blah blah.
However I can not get my light to light and arduino to echo FROM the router via the logic convertor.
I think I have ruled out the RX/TX on the router and arduino as being problems as both work perfectly via RS232 board.
Whats annoying is that Arduino -> router works fine.
Its only router -> arduino that does squat.
I checked the voltage on the logic level convertor.
Its a solid 3.3v on the LV side and 5v on the HV side.
I have it hooked up:
routerRX -> LogicLevelConvertorTX1 -> TX0 -> ArduinoTX(pin1)
routerTX -> LogicLevelConvertorRX0 -> RX1 -> ArduinoRX(pin0)
I also tried this because I read that the RX paths arent bidirectional.
routerTX -> LogicLevelConvertorTX1 -> TX0 -> ArduinoTX(pin1)
anyway sorry its long but Im hoping Im missing something dumb here.