Arduino + Fonera: SERIAL Port Problem

Hi There,

I connected a Fonera to my Arduino board through the serial COM port - RX/TX.

I connected the Arduino board to my computer -through USB. The problem is that I don't see any data from the Fonera displayed on the computer - I tried with serial.read and serial.print.

Does anybody here have a bi-directional COM program to be able to send / receive data to the serial port?

Thanks,
Franck

The RX/TX pins of the arduino (that you have connected to the fonera) are the same pins used to communicate with the computer via USB, so you can't have them both on the same pins at the same time...

Thanks westfw for your reply... In fact I did that for test purpose but in the end I want the arduino to send and receive data to the Fonera.

So do you mean that it should work without doing anything? I used both "screen" on my Mac and the Arduino software but nothing happens...

I don't remember but I think I saw somewhere that to do that test you have to remove the chip. Is that right?

Thanks,
Franck

Westfw there's something I don't understand... I used the program below; it there's data the led blinks... This works: when the fonera sends data, the led blinks and the data is displayed on the computer. If I comment the print line I don't see anything on the computer which is not what you were saying...

In the other direction it doesn't seem to work neither.

:frowning:

Please help!
Franck

#define ledPin 13
byte pinState = 0;
int readByte;

void setup() {
pinMode(ledPin, OUTPUT);
Serial.begin(115200); // open the serial port at 9600 bps:
}

void loop() {
if (Serial.available() > 0)
{
toggle(ledPin);
readByte = Serial.read();
// Serial.print(readByte, BYTE);
}
}

void toggle(int pinNum) {
digitalWrite(pinNum, pinState);
pinState = !pinState;
}