1

I use a module same as here with my RPI 4B and there were difficulties in communication between them two since the start. The module worked fine with my Arduino. It is connected via Rxd-Txd pins, 5V, ground and an additional external power to the module.

I'm trying to make it make calls with the help of python, and for now after entering python -m serial.tools.miniterm /dev/ttyAMA0 115200 to the RPI terminal and typing in blindly "AT" I get a series of backslashes which after a closer look turned out to be this: "␄␐␁␀" (EOT DLE SOH NUL). Which happily already is a response, but it's still not an "OK" that's expected after such command.

How could I solve this? I've surfed many google search results for RPI and SIM900 but none of them worked.

UPD: *Serial is enabled, *Bluetooth disabled, *OS is Raspbian 10, *the module doesn't respond to any baudrate other than 115200 I'll try to get a level shifter and use it between RPi and module, the suggestion seems pretty logical and I wouldn't even think of devices using different voltages for UART. I'll post the results as soon as I get the shifter.

  • Comments are not for extended discussion; this conversation has been moved to chat. – goldilocks Nov 7 at 23:01
  • "It is connected via Rxd-Txd" -> If the breakout the SIM is on uses 5V logic, then you should use a level shifter in the middle, otherwise you may get false highs one way and false lows the other, which will amount to miscommunication... – goldilocks Nov 7 at 23:04
  • @goldilocks could you please explain further the use of a shifter? Do you mean that RPi uses 5V in the Rxd-Txd and the module uses 3.3V? – Oresto Nov 8 at 8:49
  • It is a secret known to few that the Raspberry Pi uses 3.3V logic! And even fewer: Most Arduinos are 5V logic! These are not the same. raspberrypi.stackexchange.com/a/49775/5538 – goldilocks Nov 8 at 13:47
  • @goldilocks I don't see how Arduino is relevant here. SIM900's are 3.3V devices, and so are Raspberries. The product description in the OP's link clearly states Interface logic voltage: 3.3V, so adding a level shifter will almost certainly not help. – Dmitry Grigoryev Nov 10 at 8:46
2

In addition to what Milliways said, you seem to use the wrong baudrate (115200 instead of 19200), unless of course you changed this too.

Edit: it appears that your module is configured to 115200. I would recommend you to get a USB to UART converter such as this one and make sure the module replies to the AT commands using a regular PC, to completely exclude RPi-related problems from the mix. If you can't get the module to work, it may simply be defective. It's not unheard of when ordering stuff on Aliexpress.

  • At the baudrate that you've proposed I get no answer. Actually the module didn't respond to any baudrate other than 115200 (which also was a recommended rate in the SIM900 RPi guides). I'm interested where did you even get such a number? – Oresto Nov 8 at 21:07
  • well the module clearly refuses to communicate at the baudrate you proposed – Oresto Nov 10 at 15:46
  • @Oresto I understand that, I just explained where I got the number from. – Dmitry Grigoryev Nov 10 at 16:48
1

This "Question" is lacking detail (OS, did you enable serial) BUT the fundamental problem is you are trying to use /dev/ttyAMA0 which is connected to Bluetooth (except in the unlikely circumstance that you changed this).

See How do I make serial work on the Raspberry Pi3 , Pi3B+, PiZeroW

  • I had added dtoverlay=pi3-disable-bt to the end of the config.txt in boot, so I guess yeah I've Bluetooth disabled – Oresto Nov 8 at 8:44
  • So I've got Raspbian 10 buster and serial is of course enabled – Oresto Nov 8 at 21:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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