当前位置: 首页 > article >正文

RM500U-CN模组

APN

配置了APN时的查询命令:

admin@OpenWrt:/etc/rc.d# busybox microcom /dev/ttyUSB3

+CME ERROR: 4
at+qicsgp=1
+QICSGP: 1,"juantest","test_user","test_pass",0

OK
AT+CGPADDR=1
+CGPADDR: 1,"10.1.208.223"

OK

不配置APN时查询信息:

admin@OpenWrt:/etc/rc.d# busybox microcom /dev/ttyUSB3
at+qicsgp=1
+CME ERROR: 4
at+qicsgp=1
+QICSGP: 3,"","","",0

OK
at+qicsgp=1
+QICSGP: 3,"","","",0

OK
AT+CGPADDR=1
+CGPADDR: 1,"100.112.153.45","240e:0471:08a0:3209:1806:d622:252b:1fdf"

OK

锁小区

锁5G小区

频点627264,小区69,查询结果为:

admin@OpenWrt:/usr/bin# busybox microcom /dev/ttyUSB3
at+qnwlock="common/lte"
+QNWLOCK: "common/lte"

OK
at+qnwlock="common/5g"
+QNWLOCK: "common/5g",627264,69

OK


at+QNWLOCKFREQ="common/lte"
+QNWLOCKFREQ: "common/lte"

OK
at+QNWLOCKFREQ="common/5g"
+QNWLOCKFREQ: "common/5g",627264,69

OK

不锁小区和频点

查询信息如下:

at+QNWLOCKFREQ="common/5g"
+QNWLOCKFREQ: "common/5g"

OK
at+QNWLOCKFREQ="common/lte"
+QNWLOCKFREQ: "common/lte"

OK
at+qnwlock="common/5g"
+QNWLOCK: "common/5g"

OK
at+qnwlock="common/lte"
+QNWLOCK: "common/lte"

OK

锁4G小区

查询信息如下(频点100,小区412):

at+qnwlock="common/lte"
+QNWLOCK: "common/lte",100,412

OK
at+qnwlock="common/5g"
+QNWLOCK: "common/5g"

OK
at+QNWLOCKFREQ="common/5g"
+QNWLOCKFREQ: "common/5g"

OK
at+QNWLOCKFREQ="common/lte"
+QNWLOCKFREQ: "common/lte",100,412

OK

锁4G频点

锁定到频点100

at+QNWLOCKFREQ="common/lte"
+QNWLOCKFREQ: "common/lte",100

OK
at+QNWLOCKFREQ="common/5g"
+QNWLOCKFREQ: "common/5g"

OK
at+qnwlock="common/5g"
+QNWLOCK: "common/5g"

OK
at+qnwlock="common/lte"
+QNWLOCK: "common/lte"

OK

锁5G频点

锁频到627264

at+QNWLOCKFREQ="common/lte"
+QNWLOCKFREQ: "common/lte"

OK
at+QNWLOCKFREQ="common/5g"
+QNWLOCKFREQ: "common/5g",627264

OK
at+qnwlock="common/5g"
+QNWLOCK: "common/5g"

OK
at+qnwlock="common/lte"
+QNWLOCK: "common/lte"

OK

拨号流程优化

优化前

2024-11-12 13:47:20.908825完成AT端口初始化;

2024-11-12 13:48:39.865242拿到IP地址;

一套完整的注网日志

	Line 1: 2024-11-12 13:59:30.954370 [NR] [info]: ctx->sock.fd: 7
	Line 10: 2024-11-12 13:59:30.991779 [NR] [info]: nr_read_uci_apn_config:begin
	Line 10: 2024-11-12 13:59:30.991779 [NR] [info]: nr_read_uci_apn_config:begin
	Line 11: 2024-11-12 13:59:30.995508 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 11: 2024-11-12 13:59:30.995508 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 12: 2024-11-12 13:59:30.995878 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 12: 2024-11-12 13:59:30.995878 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 13: 2024-11-12 13:59:30.999669 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 13: 2024-11-12 13:59:30.999669 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 14: 2024-11-12 13:59:31.721456 [MONITOR] [info]: delete host route: wan_monitor_ip:,nr_monitor_ip: 
	Line 23: 2024-11-12 13:59:36.117541 [NR] [info]: mobile_ctx->sock.fd: 7
	Line 88: 2024-11-12 14:02:10.035655 [NR] [info]: nr_read_uci_apn_config:begin
	Line 88: 2024-11-12 14:02:10.035655 [NR] [info]: nr_read_uci_apn_config:begin
	Line 89: 2024-11-12 14:02:10.037692 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 89: 2024-11-12 14:02:10.037692 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 90: 2024-11-12 14:02:10.037893 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 90: 2024-11-12 14:02:10.037893 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 91: 2024-11-12 14:02:10.040353 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 91: 2024-11-12 14:02:10.040353 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 94: 2024-11-12 14:02:15.517086 [NR] [info]: nr_read_uci_apn_config:begin
	Line 94: 2024-11-12 14:02:15.517086 [NR] [info]: nr_read_uci_apn_config:begin
	Line 95: 2024-11-12 14:02:15.519114 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 95: 2024-11-12 14:02:15.519114 [NR] [info]: nr_read_uci_apn_config:apn_enable2=0
	Line 96: 2024-11-12 14:02:15.519321 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 96: 2024-11-12 14:02:15.519321 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 97: 2024-11-12 14:02:15.521780 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 97: 2024-11-12 14:02:15.521780 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 106: 2024-11-12 14:02:36.717373 [NR] [info]: switch to SA network mode
	Line 107: 2024-11-12 14:02:36.717753 [NR] [info]: switch from the 4G freqlock to new 4G frqlock,  =====> 0
	Line 108: 2024-11-12 14:02:36.718053 [NR] [info]: switch from the 5G freqlock to new 5G frqlock,  =====> 1
	Line 117: 2024-11-12 14:02:49.203875 [NR] [debug]: send at: AT+QURCCFG="urcport","uart1"
	Line 118: 2024-11-12 14:02:50.213912 [NR] [debug]: get at resp: AT+QURCCFG="urcport","uart1"
	Line 122: 2024-11-12 14:02:51.433879 [NR] [debug]: send at: AT+QCFG="usbnet"
	Line 124: 2024-11-12 14:02:52.443923 [NR] [debug]: get at resp: AT+QCFG="usbnet"
	Line 132: 2024-11-12 14:02:53.663894 [NR] [debug]: send at: AT+QCFG="5glan",1,0
	Line 134: 2024-11-12 14:02:54.673922 [NR] [debug]: get at resp: AT+QCFG="5glan",1,0
	Line 138: 2024-11-12 14:02:55.893957 [NR] [debug]: send at: ATE0
	Line 140: 2024-11-12 14:02:56.903904 [NR] [debug]: get at resp: ATE0
	Line 144: 2024-11-12 14:02:56.910334 [NR] [warning]: 0. mod AT port init success
	Line 147: 2024-11-12 14:02:59.013880 [NR] [debug]: send at: AT+QCFG="ims",0
	Line 149: 2024-11-12 14:03:00.023920 [NR] [debug]: get at resp: 
	Line 152: 2024-11-12 14:03:01.243869 [NR] [debug]: send at: AT+QINDCFG="all",0,1
	Line 154: 2024-11-12 14:03:02.253911 [NR] [debug]: get at resp: 
	Line 157: 2024-11-12 14:03:02.254240 [NR] [warning]: 1. close mod ims  success
	Line 160: 2024-11-12 14:03:04.353870 [NR] [debug]: send at: at+qicsgp=1
	Line 162: 2024-11-12 14:03:05.363907 [NR] [debug]: get at resp: 
	Line 167: 2024-11-12 14:03:05.364286 [NR] [debug]: apn not change
	Line 168: 2024-11-12 14:03:05.364450 [NR] [warning]: 2. set apn information success
	Line 169: 2024-11-12 14:03:07.453871 [NR] [debug]: send at: AT+QNWPREFCFG="mode_pref",NR5G-SA
	Line 169: 2024-11-12 14:03:07.453871 [NR] [debug]: send at: AT+QNWPREFCFG="mode_pref",NR5G-SA
	Line 174: 2024-11-12 14:03:10.483906 [NR] [debug]: get at resp: OK
	Line 177: 2024-11-12 14:03:10.484436 [NR] [warning]: 3. mod set network type success
	Line 178: 2024-11-12 14:03:11.367186 [NR] [warning]: 4. mod set nr sa/nsa ability success
	Line 178: 2024-11-12 14:03:11.367186 [NR] [warning]: 4. mod set nr sa/nsa ability success
	Line 181: 2024-11-12 14:03:13.463871 [NR] [debug]: send at: at+qnwlock="common/lte",0
	Line 183: 2024-11-12 14:03:15.483903 [NR] [debug]: get at resp: 
	Line 186: 2024-11-12 14:03:15.484220 [NR] [info]: 5. lte pci unlock success
	Line 187: 2024-11-12 14:03:16.703871 [NR] [debug]: send at: AT+QNWLOCKFREQ="common/lte",0
	Line 191: 2024-11-12 14:03:18.723913 [NR] [debug]: get at resp: 
	Line 194: 2024-11-12 14:03:18.724211 [NR] [info]: 5. lte arfcn unlock success
	Line 195: 2024-11-12 14:03:19.943876 [NR] [debug]: send at: at+qnwlock="common/5g",0
	Line 197: 2024-11-12 14:03:21.963905 [NR] [debug]: get at resp: 
	Line 200: 2024-11-12 14:03:21.964224 [NR] [info]: 5. 5g pci unlock success
	Line 201: 2024-11-12 14:03:23.183888 [NR] [debug]: send at: AT+QNWLOCKFREQ="common/5g",0
	Line 205: 2024-11-12 14:03:25.203904 [NR] [debug]: get at resp: 
	Line 208: 2024-11-12 14:03:25.204230 [NR] [info]: 5. 5g arfcn unlock success
	Line 209: 2024-11-12 14:03:26.423874 [NR] [debug]: send at: AT+QNWLOCKFREQ="common/5g",1,627264
	Line 213: 2024-11-12 14:03:28.443930 [NR] [debug]: get at resp: 
	Line 216: 2024-11-12 14:03:28.444172 [NR] [info]: 5. 5g arfch lock success
	Line 217: 2024-11-12 14:03:29.663887 [NR] [debug]: send at: at+QNWLOCKFREQ="common/5g"
	Line 219: 2024-11-12 14:03:30.673913 [NR] [debug]: get at resp: 
	Line 224: 2024-11-12 14:03:30.674260 [NR] [info]: 5. check 5g arfcn lock success
	Line 225: 2024-11-12 14:03:30.674426 [NR] [warning]: 5. arfcn/pci success
	Line 226: 2024-11-12 14:03:31.893873 [NR] [debug]: send at: AT+CCID
	Line 228: 2024-11-12 14:03:32.903917 [NR] [debug]: get at resp: 
	Line 235: 2024-11-12 14:03:34.123876 [NR] [debug]: send at: AT+CGSN
	Line 237: 2024-11-12 14:03:35.133905 [NR] [debug]: get at resp: 
	Line 242: 2024-11-12 14:03:36.353868 [NR] [debug]: send at: AT+CIMI
	Line 244: 2024-11-12 14:03:37.363910 [NR] [debug]: get at resp: 
	Line 251: 2024-11-12 14:03:39.593871 [NR] [debug]: send at: ATI
	Line 253: 2024-11-12 14:03:40.603906 [NR] [debug]: get at resp: 
	Line 255: \nRM500U-CN
	Line 256: \nRevision: RM500UCNCBR03A02M2G
	Line 260: 2024-11-12 14:03:41.823868 [NR] [debug]: send at: AT+COPS?
	Line 262: 2024-11-12 14:03:42.833905 [NR] [debug]: get at resp: 
	Line 269: 2024-11-12 14:03:44.053872 [NR] [debug]: send at: AT+CPIN?
	Line 271: 2024-11-12 14:03:45.063908 [NR] [debug]: get at resp: 
	Line 276: 2024-11-12 14:03:47.153870 [NR] [debug]: send at: at+c5greg?
	Line 278: 2024-11-12 14:03:48.163915 [NR] [debug]: get at resp: 
	Line 283: 2024-11-12 14:03:48.164273 [NR] [warning]: 6. mod resident network success
	Line 286: 2024-11-12 14:03:49.383870 [NR] [debug]: send at: AT+COPS?
	Line 288: 2024-11-12 14:03:50.393941 [NR] [debug]: get at resp: 
	Line 293: 2024-11-12 14:03:52.533869 [NR] [debug]: send at: AT+QCFG="staticarp",usb0,EA:44:BA:80:2E:B4
	Line 297: 2024-11-12 14:03:53.543930 [NR] [debug]: get at resp: 
	Line 302: 2024-11-12 14:03:59.773878 [NR] [debug]: send at: AT+QNETDEVCTL=1,1,1
	Line 304: 2024-11-12 14:04:00.783905 [NR] [debug]: get at resp: 
	Line 312: 2024-11-12 14:04:07.013871 [NR] [debug]: send at: AT+QNETDEVSTATUS=1
	Line 314: 2024-11-12 14:04:08.023918 [NR] [debug]: get at resp: 
	Line 321: 2024-11-12 14:04:12.113981 [NR] [warning]: 7. mod dial success
	Line 326: 2024-11-12 14:04:14.051674 [NR] [warning]: 8. get ip 10.54.19.25 success

at库中增加日志如下:

    while(1)
    {
        delay_msec(200);
        ret = uart_read(fd, at_recv_buf+len, sizeof(at_recv_buf)-len);
        if (ret > 0)
        {
            len += ret;
            if ((NULL != strstr(at_recv_buf, expected_recv)) 
            || (NULL != strstr(at_recv_buf, "error")) 
            || (NULL != strstr(at_recv_buf, "ERROR")))
            {
                if (rmsg){
                    strncpy(rmsg, at_recv_buf, msgsize);
                    UART_LOG_ERROR("uart_read ok, read_cnt:%d", read_cnt);
                }
                return 0;
            }
            else
            {
                UART_LOG_ERROR("uart_read data:%s, read_cnt:%d", at_recv_buf, read_cnt);
            }
        }
        else if (ret < 0)
        {
            UART_LOG_ERROR("uart_read error(%d): %s, ret:%d, data:%s", errno, strerror(errno), ret, at_recv_buf);
        }
        read_cnt++;
        if(read_cnt == timeout)
        {
            UART_LOG_ERROR("uart_read timeout, data:%s read_cnt:%d", at_recv_buf, read_cnt);
            read_cnt = 0;
            break;
        }

发现调试日志如下:

	Line 119: \n, read_cnt:4
	Line 122: \n read_cnt:10
	Line 129: 2024-11-13 09:59:27.684316 [UART] [error]: uart_read ok, read_cnt:0
	Line 136: 2024-11-13 09:59:27.894295 [UART] [error]: uart_read ok, read_cnt:0
	Line 147: \n, read_cnt:0
	Line 148: 2024-11-13 09:59:28.314304 [UART] [error]: uart_read ok, read_cnt:1
	Line 155: 2024-11-13 09:59:28.524302 [UART] [error]: uart_read ok, read_cnt:0
	Line 167: 2024-11-13 09:59:29.754296 [UART] [error]: uart_read ok, read_cnt:0
	Line 173: 2024-11-13 09:59:29.964291 [UART] [error]: uart_read ok, read_cnt:0
	Line 180: 2024-11-13 09:59:31.124400 [UART] [error]: uart_read ok, read_cnt:0
	Line 191: \n, read_cnt:0
	Line 194: 2024-11-13 09:59:34.184320 [UART] [error]: uart_read ok, read_cnt:9
	Line 203: \n, read_cnt:0
	Line 204: 2024-11-13 09:59:37.744296 [UART] [error]: uart_read ok, read_cnt:7
	Line 212: \n, read_cnt:0
	Line 216: \n read_cnt:10
	Line 223: 2024-11-13 09:59:42.874290 [UART] [error]: uart_read timeout, data: read_cnt:10
	Line 232: 2024-11-13 09:59:44.254296 [UART] [error]: uart_read ok, read_cnt:1
	Line 239: 2024-11-13 09:59:45.514294 [UART] [error]: uart_read ok, read_cnt:5
	Line 245: 2024-11-13 09:59:46.984313 [UART] [error]: uart_read ok, read_cnt:6
	Line 252: 2024-11-13 09:59:48.454308 [UART] [error]: uart_read ok, read_cnt:6
	Line 260: 2024-11-13 09:59:49.714302 [UART] [error]: uart_read ok, read_cnt:5
	Line 268: \n, read_cnt:6
	Line 270: \n read_cnt:10
	Line 277: 2024-11-13 09:59:52.964302 [UART] [error]: uart_read ok, read_cnt:0
	Line 290: 2024-11-13 09:59:54.224286 [UART] [error]: uart_read ok, read_cnt:5
	Line 297: 2024-11-13 09:59:55.694293 [UART] [error]: uart_read ok, read_cnt:6
	Line 304: 2024-11-13 09:59:57.164298 [UART] [error]: uart_read ok, read_cnt:6
	Line 311: 2024-11-13 09:59:58.424294 [UART] [error]: uart_read ok, read_cnt:5
	Line 320: 2024-11-13 09:59:59.894317 [UART] [error]: uart_read ok, read_cnt:6
	Line 331: 2024-11-13 10:00:00.104298 [UART] [error]: uart_read ok, read_cnt:0
	Line 339: 2024-11-13 10:00:00.314290 [UART] [error]: uart_read ok, read_cnt:0
	Line 347: 2024-11-13 10:00:00.524299 [UART] [error]: uart_read ok, read_cnt:0

进程启动延迟

测试过程中发现,系统启动后,jet_5g进程很久都没有运行

为什么从进程启动到

在主循环中的每个函数之前添加打印:

	Line 41: 2024-11-13 14:38:20.253910 [NR] [warning]: jet_5g start
	Line 42: 2024-11-13 14:38:20.280326 [NR] [warning]: before nr_read_uci_config
	Line 43: 2024-11-13 14:38:20.287120 [NR] [warning]: nr_read_uci_apn_config:apn_enable2=0
	Line 44: 2024-11-13 14:38:20.287475 [NR] [info]: nr_read_uci_apn_config: apn1 is enable, apn2 is disable
	Line 45: 2024-11-13 14:38:20.291646 [NR] [info]: nr_read_uci_apn_config: apn_conf[0].enable:1,pro:IP addr:juantest
	Line 46: 2024-11-13 14:38:20.299068 [NR] [warning]: before nr_check_5g_enable
	Line 47: 2024-11-13 14:38:20.299390 [NR] [warning]: before nr_check_mod_connect_state
	Line 56: 2024-11-13 14:38:37.498089 [NR] [warning]: before nr_check_net_type
	Line 57: 2024-11-13 14:38:37.498473 [NR] [warning]: before nr_check_freqlock_enable
	Line 58: 2024-11-13 14:38:37.498729 [NR] [warning]: before nr_load_mod_dial_drv
	Line 59: 2024-11-13 14:38:38.966133 [NR] [warning]: before nr_load_mod_dial_drv
	Line 62: 2024-11-13 14:38:38.967675 [NR] [debug]: send at: AT+QURCCFG="urcport","uart1"

 发现nr_check_mod_connect_state中停留了17秒。

    Line 47: 2024-11-13 14:38:20.299390 [NR] [warning]: before nr_check_mod_connect_state
    Line 56: 2024-11-13 14:38:37.498089 [NR] [warning]: before nr_check_net_type

加调试信息发现,是因为lsusb还没有识别到模组导致在nr_check_mod_connect_state挂起。

开启后路由模式AT

AT+QROUTINGBH =1 : 开始后路由模式

AT+QROUTINGBH =1 :关闭后路由模式

发射功率控制

AT+SP5GCMDS=”set nr power_control”,0,x  ps:x表示降功率的值,x=0是恢复  试试吧


http://www.kler.cn/a/512699.html

相关文章:

  • systemverilog中的force,release和assign
  • 游戏AI,让AI 玩游戏有什么作用?
  • C# 的 NLog 库高级进阶
  • AI 编程工具—Cursor AI 对话模式详解 内嵌对话模式
  • MATLAB中characterListPattern函数用法
  • 力扣动态规划-5【算法学习day.99】
  • Vue2+OpenLayers添加缩放、滑块缩放、拾取坐标、鹰眼、全屏控件(提供Gitee源码)
  • 从密码学原理与应用新方向到移动身份认证与实践
  • 【三国游戏——贪心、排序】
  • 国自然面上项目|基于组合机器学习算法的病理性近视眼底多模态影像资料自动化定量分析研究|基金申请·25-01-18
  • 04、Redis从入门到放弃 之 数据持久化RDB和AOF
  • 相机成像及参数原理入门
  • python转转商超书籍信息爬虫
  • B站评论系统的多级存储架构
  • STM32补充——FLASH
  • Qt之文件系统操作和读写
  • 基于海思soc的智能产品开发(视频的后续开发)
  • 什么宠物最好养?
  • PhyCAGE:符合物理规律的图像到 3D 生成
  • 思维的进化:从链式推理到元链式推理的算法探秘
  • go语言两个协程goroutine交替打印1-100
  • 解决用 rm 报bash: /usr/bin/rm: Argument list too long错
  • Javascript 将页面缓存存储到 IndexedDB
  • BH1750使用程序
  • 基于SpringBoot和PostGIS的各国及所属机场信息检索及可视化实现
  • Debian常用命令