嵌入式爱好者

4G&5G模块开机自启与自动重连

2024-5-31 16:04| 发布者: C.S151| 查看: 61| 评论: 0|原作者: C.S151

类目: RK3588系列产品  >  Ubuntu     文档编号: 1419

4G&5G模块开机自启与自动重连

目标平台:OK3588-C Ubuntu

修改目录:/etc/systemd/system/multi-user.target.wants/5G.service

​ /usr/bin/fltest_quectel.sh

​ /etc/profile.d/5G.sh

1.添加5G服务

 vi /etc/systemd/system/5G.service
[Unit]
Description=5G
After=network.target

[Service]
Type=**
PIDfile=/run/quectelCM.pid
ExecStart=/usr/bin/quectelCM
Restart=always
ExecStop=-/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/quectelCM.pid
TimeoutStartSec=10
RestartSec=3

[Install]
WantedBy=multi-user.target
:wq
systemctl enable 5G

2.重新拉起eth0和eth1


vi /etc/profile.d/5G.sh
ifconfig eth1 down && ifconfig eth0 down
sleep 1
ifconfig eth0 up
sleep 1
ifconfig eth1 up

3.重启查看效果


systemctl status 5G
ps -aux |grep quectelCM
#杀掉quectelCM进程后发现会再启一个


已解决

未解决

只是看看

最新评论

QQ|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )

GMT+8, 2024-9-17 02:57

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

返回顶部