【问题标题】:Raspberry Pi 3 with A6 GSM/GPRS module not working带有 A6 GSM/GPRS 模块的 Raspberry Pi 3 无法正常工作
【发布时间】:2017-08-24 07:56:23
【问题描述】:

我正在尝试将“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 启动 putty 时,我什么也得不到。出现空白屏幕并挂起。

调试信息:

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 的串行端口进行环回测试?你有'范围?你有其他的 TTL UART 可以用来测试 RPi 的端口吗?您是否使用 5V 电源为模块供电?
  • 是的。我尝试了环回,它工作正常。我没有 TTL 或 UART,但我会得到它并进行测试。是的,我用 5V 供电。
  • 我们需要gsm调制解调器的驱动程序吗?

标签: gsm raspberry-pi3 uart gpio sim900


【解决方案1】:

我今天遇到了同样的问题,我想激活 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

最好的!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-06-18
    • 2018-12-08
    • 1970-01-01
    • 1970-01-01
    • 2016-12-13
    • 2017-10-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多