带有A6 GSM / GPRS模块的Raspberry Pi 3无法正常工作



我正在尝试将"AI A6 GSM SIM900"模块与Raspberry Pi 3一起使用。我做了以下步骤,但我无法获得串行连接。

连接的树莓派 3 和 GSM 模块:

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

禁用蓝牙以将 ttyAMA0 用于 GSM

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

已禁用串行控制台。

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

当我用串行行"/dev/ttyAMA0"和速度 9600 或 115200 启动腻子时,我一无所获。出现并挂起空白屏幕。

调试信息:

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

请提供您的想法/建议。

谢谢

高拉夫

我今天遇到了同样的问题,我想激活RPi 3b上的串行端口,同时我对保留蓝牙功能不感兴趣。

经过多次尝试,我进入了文档(https://www.raspberrypi.org/documentation/configuration/uart.md(,并从那里得出修改/boot/config.txt 以仅包含这些行

的结论
enable_uart=1
dtoverlay=pi3-disable-bt

此外,我还按照您的指示从/boot/cmdline.txt 中删除任何 uart 文本。就我而言

kgdboc=ttyAMA0,115200

最好!

相关内容

  • 没有找到相关文章

最新更新