1

First my appologies about the title. Thats the best I could come up with.

The problem is like this

  1. 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.

  2. I then bought a waveshare 7.1 inch touch display and I integrated this to my Pi and alas! it worked great too

  3. 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

  4. 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.

  5. 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

  1. HDMI Pi3 to HDMI LCD (For display)
  2. Micro USB on LCD to USB on Pi-3. This is for touch interface
  3. GND pin of GPS/GPRS (SIM808) module to GND (Pin 6)
  4. 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

  1. Tx, RX and GND of SIM808 to Rx, Tx and GND of USB to TTL
  2. Plug in USB side of USB to ttl to Pi3 I used /dev/ttyUSB0 in my code
  • Meanwhile I tried introducing ser.flush() between my read and write and no luck yet. I already tried a delay of 0.5 sec!!! (:-() between commands and that too did not help!!! – shankar narayan Jul 07 '16 at 06:52
  • Your question is too vague, and you have provided insufficient detail. My first observation is that `/dev/ttyAMA0` is used by the Bluetooth on the Pi3 unless you have done something about this. I don't know why the touch screen would be using serial. Post details of the connections you have. – Milliways Jul 07 '16 at 07:28
  • @Milliways, thanks for the feedback. Am sorry on my question being vague. I promise to improve on that. My connections are as below 1. HDMI Pi3 to HDMI LCD (For display) 2. Micro USB on LCD to USB on Pi-3. This is for touch interface 3. GND pin of GPS/GPRS module to GND (Pin 6) 4. 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 1. Tx, RX and GND of SIM808 to Rx, Tx and GND of USB to TTL 2. Plug in USB side of USB to ttl to Pi3 I used /dev/ttyUSB0 in my code. – shankar narayan Jul 07 '16 at 09:39
  • DO NOT post detail into comments. Edit into your question. – Milliways Jul 07 '16 at 10:45
  • @Milliways, the details are updated in question. Meanwhile thanks for your input about the Bluetooth. I now see that the image in Pi3 that I used with monitor has the BT disabled and the one am using with display has BT enabled. I do not know how to disable the same yet But working on it. – shankar narayan Jul 07 '16 at 11:33

1 Answers1

0

Your question is still lacking in precision. However the following How-do-i-make-serial-work-on-the-raspberry-pi3 describes how to use the default serial port, and references to disabling serial to Bluetooth connection.

Milliways
  • 54,718
  • 26
  • 92
  • 182
  • Thanks for the answer. I see that the GPIO 14 and GPIO 15 is back to its functionality as serial ports after I followed the instruction. Thanks a lot for the answers and support – shankar narayan Jul 07 '16 at 16:27