First my appologies about the title. Thats the best I could come up with.
The problem is like this
I integrated a SIM 808 module with Raspberry Pi3 and implemented a simple GPS get command to retrive my address and it worked fine. At this point, I was working on my monitor.
I then bought a waveshare 7.1 inch touch display and I integrated this to my Pi and alas! it worked great too
Now came my first issue when I put them together. I realized that the touch feature on LCD was already using the /dev/ttyAMA0 port and now I could not connect the GPS module to my UART
I then purcahed a USB to TTL converter module and I was excited to see that it gave me a /dev/ttyUSB0 port to connect my SIM808 I thought I had got it.
My next problem started when the sequence of AT commands to send my co-ordinates to google failed and at irregular places. I printed the whole response on screen but to my shock I found the results were NULL strings.
Something seriously wrong with communication using the USB to ttl moudule. Am opening the port with baud of 9600kbps and here are sequence of commands that I execute
AT+HTTPSSL = 1 AT+HTTPPARA="CID",1 AT+HTTPPARA="URL", AT+HTTPACTION=0
all necessary initialization has been done prior to this
all these commands are sent using pyserial lib apis
ser.write(), ser.read() and port /tty/USB0 is open at 9600kbps
(it is still working but very inconsistent. earlier when I used UART pins on pi, it was working like gem!)
My connections are as detailed below
- HDMI Pi3 to HDMI LCD (For display)
- Micro USB on LCD to USB on Pi-3. This is for touch interface
- GND pin of GPS/GPRS (SIM808) module to GND (Pin 6)
- Tx and Rx of SIM808 to RX and Tx of Pi3 (Pin 8 and Pin 10).
For this, connection it deos not work as /dev/ttyAMA0 is already open Now I changed it as
- Tx, RX and GND of SIM808 to Rx, Tx and GND of USB to TTL
- Plug in USB side of USB to ttl to Pi3 I used /dev/ttyUSB0 in my code