I have a Sim800 GSM module hooked up to pins 8 and 10 of the a PI B+ running the latest version of Jessie. I have configured Jessie so that nothing else is using the TXD0 and RXD0 pins. If I connect a pc up via a USB to TTL adapter to the pins I can see that whatever I type on the PC shows up on the PI and vice versa.
If I connect the pc via a USB to TTL adapter to the SIM800 it responds to my AT commands as I would expect.
BUT, If I connect the SIM800 up to the PI I can send AT commands to it but never get anything back. This is driving me nuts. I have definitely got my TX and RX the right way around.
The USB to TTL is configurable between 5v and 3.3v. I used it as 3.3v when connecting to the PI and 5v when connecting to the PC. The SIM800 is on a breakout board and accepts 5v which I am powering via a bench power supply. I am putting the TX from the SIM800 through a voltage divider to shift it back down to 3.3v before going back into the rx pin of the pi. The voltage divider consists of a 4.7K and 2.2K resistor. I suspect I dont need this as I think the logic level from the SIM800 is 3.3v but I need to check tomorrow.
I have tried with minicom and with a python script sending AT commands direct. I am using 9600, 8, N, 1 initially but have tried other baud rates as well.
The specific module I am using is the same as this one https://www.amazon.co.uk/MagiDeal-SIM800L-Module-QUAD-BAND-Arduino/dp/B01FK3OPQ6/ref=sr_1_2?ie=UTF8&qid=1492539878&sr=8-2&keywords=sim800l
The python script is simply
import serial ser = serial.Serial(port='/dev/ttyAMA0', baudrate=115200, timeout=1) cmd="AT+CFUN=0\r\n" ser.write(cmd.encode()) msg=ser.read(64) print(msg)
Which turns the GPRS off and I can see it works because the LED on the module starts flashing quickly.
UPDATE - Just tried to send a comand to turn off GPRS and that did work. I just don't get anything echoed back. Any reason why I wouldn't see characters coming back?
Any help appreciated thanks SOS