diff --git a/luci-app-cpe/root/etc/init.d/modem b/luci-app-cpe/root/etc/init.d/modem index 03c4507..dffe31c 100644 --- a/luci-app-cpe/root/etc/init.d/modem +++ b/luci-app-cpe/root/etc/init.d/modem @@ -4,19 +4,19 @@ START=16 STOP=16 USE_PROCD=1 -#使用procd启动 +#浣跨敤procd鍚姩 -# start启动服务 -# stop停止服务 -# restart重新启动服务 -# reload重新加载配置文件(如果服务未实现重新加载,则重新启动) -# enable启用服务自动启动 -# disable禁用服务自动启动 -# enabled检查服务是否在启动时启动 -# 正在运行检查服务是否正在运行 -# status服务状态 -# trace从系统调用跟踪开始 +# start鍚姩鏈嶅姟 +# stop鍋滄鏈嶅姟 +# restart閲嶆柊鍚姩鏈嶅姟 +# reload閲嶆柊鍔犺浇閰嶇疆鏂囦欢锛堝鏋滄湇鍔℃湭瀹炵幇閲嶆柊鍔犺浇锛屽垯閲嶆柊鍚姩锛 +# enable鍚敤鏈嶅姟鑷姩鍚姩 +# disable绂佺敤鏈嶅姟鑷姩鍚姩 +# enabled妫鏌ユ湇鍔℃槸鍚﹀湪鍚姩鏃跺惎鍔 +# 姝e湪杩愯妫鏌ユ湇鍔℃槸鍚︽鍦ㄨ繍琛 +# status鏈嶅姟鐘舵 +# trace浠庣郴缁熻皟鐢ㄨ窡韪紑濮 runModem() { @@ -61,8 +61,8 @@ runModem() procd_open_instance - #创建一个实例, 在procd看来一个应用程序可以多个实\E4\BE? - #ubus call service list 可以查看实例 + #鍒涘缓涓涓疄渚嬶紝 鍦╬rocd鐪嬫潵涓涓簲鐢ㄧ▼搴忓彲浠ュ涓疄\E4\BE? + #ubus call service list 鍙互鏌ョ湅瀹炰緥 procd_set_param command $tool -i $ifname -s $apn $pdptype if [ "$password" != "" ];then procd_append_param command $user $password $auth @@ -74,7 +74,7 @@ runModem() procd_set_param respawn echo "quectel-CM has started." procd_close_instance - #关闭实例 + #鍏抽棴瀹炰緥 fi diff --git a/luci-app-modem b/luci-app-modem new file mode 160000 index 0000000..64fc354 --- /dev/null +++ b/luci-app-modem @@ -0,0 +1 @@ +Subproject commit 64fc3549eb3cfbaf12dacce8ac415ffd01f0ac0a diff --git a/sms-tool/Makefile b/sms-tool/Makefile new file mode 100644 index 0000000..faf3913 --- /dev/null +++ b/sms-tool/Makefile @@ -0,0 +1,29 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=sms-tool +PKG_RELEASE:=1 + +PKG_SOURCE_URL:=https://github.com/obsy/sms_tool +PKG_SOURCE_PROTO:=git +PKG_SOURCE_DATE:=2021-08-24 +PKG_SOURCE_VERSION:=57a68d07c3d38fd8766d2705fd2a2c1ae01ee004 + +include $(INCLUDE_DIR)/package.mk + +define Package/sms-tool + SECTION:=utils + CATEGORY:=Utilities + TITLE:=sms tool + URL:=https://github.com/obsy/sms_tool +endef + +define Package/sms-tool/description + SMS Tool for 3G/4G modem +endef + +define Package/sms-tool/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/sms_tool $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,sms-tool)) diff --git a/sms-tool/patches/0001-Update-sms_main.c.patch b/sms-tool/patches/0001-Update-sms_main.c.patch new file mode 100644 index 0000000..709359e --- /dev/null +++ b/sms-tool/patches/0001-Update-sms_main.c.patch @@ -0,0 +1,29 @@ +From e59637cdf9d29e23639e7ca4530a4cc9d613ded0 Mon Sep 17 00:00:00 2001 +From: dwj0 <45187345+dwj0@users.noreply.github.com> +Date: Thu, 14 Oct 2021 12:40:03 +0800 +Subject: [PATCH] Update sms_main.c +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +淇涓枃缂栫爜棣栧瓧鑺傚ぇ浜0x80鏃舵樉绀洪敊璇 +--- + sms_main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sms_main.c b/sms_main.c +index 2eb4f5d..f591f6a 100644 +--- a/sms_main.c ++++ b/sms_main.c +@@ -155,7 +155,7 @@ static void print_json_escape_char(char c1, char c2) + else if(c2 < ' ') printf("\\u00%02x", c2); + else printf("%c", c2); + } else { +- printf("\\u%02x%02x", c1, c2); ++ printf("\\u%02x%02x", (unsigned char)c1, (unsigned char)c2); + } + } + +-- +2.25.1 +