GPRS模塊RaspberryPi之間無通信零串行GPIO端口


2

我正在嘗試使用我的RaspberryPi Zero與A6 GPRS模塊(http://www.inkocean.in/gprs-a6-module-sms-board-gsm-gprs-wireless-data-transmission-over-sim900a)通信

物理連接圖:

Drawing of physical connections

已採取的步驟:

  • 將模塊的U_TDX引腳連接到PiZero的TXD0(GPIO14)
  • 將模塊的U_RDX引腳連接到PiZero的RXD0(GPIO15)
  • 將模塊的GND引腳連接到PiZero的地面
  • 使用micro-usb打開pi
  • 使用其自己的微型USB端口打開模塊
  • 使用raspi-config禁用串行端口getty / logging
  • 重啟
  • 將linux用戶添加到組撥出
  • 命令:ls -l /dev/ttyAMA0輸出:crw-rw---- 1 root dialout 204, 64 Oct 19 10:17 /dev/ttyAMA0

現在,我應該能夠與模塊通信並使用串行監視器監視串行端口了,我已經嘗試使用屏幕進行此操作:

screen /dev/ttyAMA0 115200

但是我得到了黑屏,沒有錯誤。

根據使用類似模塊的此博客(https://learn.adafruit.com/fona-tethering-to-raspberry-pi-or-beaglebone-black/setup),我應該能夠鍵入" AT" + enter(看不到所鍵入字符的反饋),並且我應該收到"確定",但我沒有。

潛在問題:

  • 該模塊無聊(似乎不是;引導後,我得到一個穩定的紅色指示燈,藍色指示燈閃爍幾次,我認為它已連接到sim的網絡)
  • 接線不正確,也許在模塊上使用了不同的引腳?
  • 我尚未正確配置串行監視器屏幕或使用了錯誤的波特率?

我嘗試過的事情:

  • 將零位的串行端口連接至模塊的R232_RXD和R232_TXD端口
  • 使用minicom作為串行監視器
  • 使用PySerial向/從模塊發送/讀取數據

我沒有嘗試過的事情:

  • 將零的串行端口連接到模塊的H_RXD和H_TXD端口,因為我認為這些不是我需要的端口

任何幫助解決甚至只是調試此問題的工作都將不勝感激,因為我真的很困惑。謝謝。

1

If you have already connected the Pi Zero TX/RX pins to the GPSs RS232 TX/RX, then you may have a 'problem'. Voltages for RS232 communication can be anything from -15v to +15v, and the Pi Zero is expecting +3.3v and 0v... you may have killed those pins.

It seems (from the page you linked to) that the U_TXD and U_RXD pins on the GPS use TTL levels (+5v and 0v), so those are not safe to use either unless you have a level shifter...

My first step would be to check that the Pi Zero TX/RX pins are still working - link them to another Pi (if you have one), open a terminal on each and make sure you can Tx/Rx both ways. You might also be able to simply link Tx to Rx on the Pi Zero, open a terminal and see the sent data reflected back to you...


0

I eventually found the problem, which was alot more basic than I thought.

The problem was the wiring of the module to the pi. The wiring of the pins should look like this:

enter image description here

So that:

  • The module's trasmitter pin (U_TXD) connects to the Pi's receiver pin (RXD0)
  • The module's receiver pin (U_RXD) connects to the Pi's transmitter pin (TXD0)

As shown by this image:

enter image description here

Which makes a whole lot of sense. I hope this helps other people that might be stuck on the same (basic) issue!