0%
树莓派安装gammu
发表于
本文字数:
112
阅读时长 ≈
1 分钟
树莓派EC20模块联网
发表于
更新于
本文字数:
441
阅读时长 ≈
1 分钟
一、EC20模块
模块有两个usb接口,其中靠近SIM卡的是电源接口,如果没有接独立供电接口的话,可能会导致板子发热,不稳定

二、连接模块
连接usb数据线、usb电源
执行lsusb
,可以看到已经连接成功

三、拨号联网
1.安装 wvdial
sudo apt-get install wvdial |
2. 配置
sudo vim /etc/wvdial.conf |
这里使用的是移动sim卡

3. 连接
sudo wvdial 4g |

4. 测试
再开一个终端,输入 ip router
查看当前ip路由

执行 sudo ip route add default via 10.64.64.64
, 将ppp0添加作默认路由

ping测试

四、发送短信
安装gammu
sudo apt-get install gammu |
配置
sudo gammu-config |
端口port设置为/dev/ttyUSB3

识别设备
sudo gammu identify |

发送
sudo gammu sendsms TEXT 手机号 -text "这是一条短信,from raspi" -unicode |
