2
votes

I'm trying to use 'AI A6 GSM SIM900' module with Raspberry Pi 3. I did following steps but I'm not able to get serial connection.

Connected Raspberry Pi 3 and GSM Module:

GPIO 14 (UART - TXD) pin to GSM U_RXD
GPIO 15 (UART - RXD) pin to GSM U_TXD
GPIO GND pin to GSM GND
GSM PWR pin to GSM VCC_IN pin

Disabled Bluetooth to use ttyAMA0 for GSM

Adding following line in /boot/config.txt
dtoverlay=uart1
dtoverlay=pi3-miniuart-bt,pi3-disable-bt

Disabled serial console.

a) sudo nano /boot/cmdline.txt
removed the word pharse "console=serial0,115200" or "console=ttyAMA0,115200"  

When I start putty with serial line '/dev/ttyAMA0' and speed 9600 or 115200, i get nothing. Blank screen appears and hangs.

Debugging information:

pi@raspberrypi:~ $ sudo dmesg | grep tty

[    0.000000] Kernel command line: 8250.nr_uarts=1 8250.nr_uarts=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa02082 bcm2709.serial=0x73d75e58 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:D7:5E:58 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
[    0.001356] console [tty1] enabled
[    0.381803] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550
[    1.007616] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2

pi@raspberrypi:~ $ sudo dmesg | grep uart

[    0.000000] Kernel command line: 8250.nr_uarts=1 8250.nr_uarts=1 bcm2708_fb.fbwidth=1920 bcm2708_fb.fbheight=1200 bcm2708_fb.fbswap=1 dma.dmachans=0x7f35 bcm2709.boardrev=0xa02082 bcm2709.serial=0x73d75e58 bcm2709.uart_clock=48000000 smsc95xx.macaddr=B8:27:EB:D7:5E:58 vc_mem.mem_base=0x3dc00000 vc_mem.mem_size=0x3f000000  dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait fbcon=map:10 fbcon=font:ProFont6x11 logo.nologo
[    0.082259] uart-pl011 3f201000.uart: could not find pctldev for node /soc/gpio@7e200000/uart0_pins, deferring probe
[    0.381803] 3f215040.uart: ttyS0 at MMIO 0x3f215040 (irq = 59, base_baud = 50000000) is a 16550
[    1.007616] 3f201000.uart: ttyAMA0 at MMIO 0x3f201000 (irq = 87, base_baud = 0) is a PL011 rev2
[  370.599029] uart-pl011 3f201000.uart: no DMA platform data

pi@raspberrypi:~ $ sudo stty -F /dev/ttyAMA0

speed 9600 baud; line = 0;
min = 1; time = 0;
ignbrk -brkint -icrnl -imaxbel
-opost -onlcr
-isig -icanon -iexten -echo -echoe -echok

pi@raspberrypi:~ $ sudo stty -F /dev/ttyS0

speed 9600 baud; line = 0;
-brkint -imaxbel

Please provide your thoughts/suggestions.

Thanks,

Gaurav

1
Did you try a loopback test with the RPi's serial port? Do you have a 'scope? Do you have some other TTL UART that you can test the RPi's port with? Did you power the module with a 5V supply?sawdust
Yes. I tried loopback and it works fine. I don't have TTL or UART but I will get it and test. Yes I powered with 5V.Gaurav
Do we need driver for gsm modem?Gaurav

1 Answers

0
votes

I had this same problem today, I wanted to activate the Serial Port on a RPi 3b and at the same time I was not interested to keep the Bluetooth functionality.

After lots of attempts I went into the docs (https://www.raspberrypi.org/documentation/configuration/uart.md) and from there came to the conclusion of modifying the /boot/config.txt to include just these lines

enable_uart=1
dtoverlay=pi3-disable-bt

Additionaly I also followed your instructions to remove any uart text from /boot/cmdline.txt. In my case

kgdboc=ttyAMA0,115200

Best!