I've got a Teensy 2.0 with simple AltSoftSerial as displayed on image:

Code with serial communication

As you can see, when I send a command (or any other input via serial) the SIM800L module sends me the same input. I tried to switch the TX and RX wires on the module (in case I misconnected them), but then it returns nothing. When I connect the TX and RX wires directly to each other I've got the exact same result as if they are connected to the module.

The whole thing is connected in this way - computer is connected via USB to teensy, the SIM800L and Teensy are connected via software serial (RX to TX and TX to RX), the SIM800L module is powered from an external battery (it requires specific voltage between 3v4 and 4v4).

Is the module bad, or is it a wrong wiring? Why is the module not communicating and just returning what I sent to it?


I'm not particularly looking for mistakes in code, the code is most likely correct. I think the problem is probably somewhere around the SIM800L module.

The module shouldn't just repeat what it got, but it should replay with something like OK, or other answers.

  • 1
    It appears to be doing what you told it to do – James Waldby - jwpat7 Oct 8 '16 at 0:46
  • You could probably learn a lot by looking at existing code for this or similar modules - for example the Adafruit FONA test sketch. Also keep in mind the moderately extreme power requirements. – Chris Stratton Oct 8 '16 at 6:17
  • Send command ATE0 to turn off echo. – Flanker Dec 8 '16 at 13:05
  • Was there ever a solution to this? We have the exact same problem occurring here. We have attempted this with multiple boards, measured voltages on the o-scope, etc. We have removed the processor and we send commands straight from Docklight Serial Editor. The command is received, and the response is the same as what was sent. We are sending commands such as AT+E<CR> as the AT command manual prescribes. We've read several articles from other authors, and this is the only forum we have been able to find where the problem is identified exactly. Thank you for any help anyone can prescribe. Serial – Steigz Nov 15 '18 at 4:49

You are asking it to repeat the data you sent. It working AS you wanted it to work in your program.

You asked it to see if there is anything sent and if there was, then print it. That's whats it's doing.

  • I don't think so.. That would be the case only if the TX and RX wire would be physically connected. When you use .write() on one serial end, you can receive it by .read() only on the other end of wire, not on the same. Or is there something that I'm missing? – Patrik Šimunič Oct 8 '16 at 11:51
  • Well I see your code as doing what it is suppose to do. what do you want it to do anyways? Describe it in detail. – Dat Ha Oct 8 '16 at 12:03
  • Well, I need the teensy to just receive command from computer and forward it to the sim800l and when sim800l sends response teensy should forward it to computer. That's all, just forwarding data from one serial to another and vice versa. – Patrik Šimunič Oct 8 '16 at 12:08

The USB serial connection is the same as the TX and RX pins on the arduino. You have to connect your sim800 on another serial port by using SoftwareSerialport, see examples here : https://www.arduino.cc/en/Tutorial/SoftwareSerialExample

  • 1
    That is true of a common ATmega328p-based Arduino like an Uno, but this question is explicitly about a Teensy 2.0. Like the Arduino Leonardo, the Teensy 2.0 uses an ATmega32u4 where the USB feeds directly into the main processor, and the hardware UART is not involved in the program/debug flow and so remains available for other uses. Most later ARM based boards including in the Teensy family have this property as well. Also, even if the question were about an Uno, the sketch is already using a software serial solution (though unnecessarily, given the previous). – Chris Stratton Jan 6 '17 at 17:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.