查看树莓派实战GPRS的源代码
←
树莓派实战GPRS
跳转到:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您刚才请求的操作只有这个用户组中的用户才能使用:
用户
您可以查看并复制此页面的源代码:
==使用systemd服务自动拨号 == Linux下又很多种方式自动拨号. 比较常见的是设置系统的interfaces, 自动拨号. 另外也可采用systemd管理的系统服务来实现启动自动拨号. systemd需要写一个简单的服务配置文件放在/etc/systemd/system下, 然后使能并启动服务, 过程如下 <source lange=bash> #构建服务描述 cat /etc/systemd/system/simp800-ppp.service [Unit] Description=SIM800 PPP Service [Service] ExecStart=/usr/bin/pon gprs StandardOutput=null Restart=always #WorkingDirectory=/home/pi/ # we don't need working at a specific directory [Install] WantedBy=multi-user.target Alias=sim800-ppp.service #使能并启动服务 systemctl enable sim800-ppp systemctl start sim800-ppp </source 另外start-stop-daemon/setsid 皆可可以用于临时测试启动一个daemon程序, 例如: <source lang="bash"> #Start daemon sudo start-stop-daemon --start -b --pidfile /run/ppp --startas /usr/bin/pon gprs #More easy and dirty way sudo setsid /usr/bin/pon gprs > /dev/null 2>&1 < /dev/null & </source>
返回到
树莓派实战GPRS
。
个人工具
登录
名字空间
页面
讨论
变换
查看
阅读
查看源代码
查看历史
操作
搜索
导航
首页
社区专页
新闻动态
最近更改
随机页面
帮助
工具箱
链入页面
相关更改
特殊页面