好了,前面那个可能确实没有用线程 。 这里是老师说的,有线网络连接 和 4G网络线程 跑在他们各自的一套逻辑中(好像是线程?) 当web界面选择他时,他才有用,大概是 ifconfig可以看到,其他模块也会使用这个网络, 我下面给出的调试信息是有线模式切换4G模式的,帮我分析有没有线程的事情/? 或者说是怎么切换的,。 [2025-09-28 14:27:30] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:31] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0
[2025-09-28 14:27:31] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:31] [ERROR] rtmp_reload():1213 - [RTMP]rtmp reload
[2025-09-28 14:27:31] [ERROR] rtmp_reconnect():1182 - [RTMP]stop stream flag:0 pClient->lte_stop_flag:0
[2025-09-28 14:27:31]lte_reload():12064 - [LTE]lte_reload
[2025-09-28 14:27:31]lte_reload():12304 - [LTE]reload: internet 4G enable.
[2025-09-28 14:27:31]update_led_state():11558 - [LTE]LED send led event 20
[2025-09-28 14:27:31] [ERROR] onvif_cfg_monitor_reload():111 - [ONVIF]config /protocol/wan changed
[2025-09-28 14:27:31] [ERROR] ping_start():508 - [DIAGNOSE]start ping:8.8.8.8
[2025-09-28 14:27:31] [ERROR] ping_start():508 - [DIAGNOSE]start ping:www.google.com
[2025-09-28 14:27:32] [ERROR] lte_start_main_loop():6527 - [LTE]LTE internet configuration has changed, restart the RF of the 4G module
[2025-09-28 14:27:32]time_for_reset_4g_rf():4979 - [LTE]*** tigger reset 4g device rf cost = 0
[2025-09-28 14:27:32] [ERROR] readport():446 - [LTE]urc 0x10000019 have no proc fun, [+CTZV: "+32"
]
[2025-09-28 14:27:32] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: SMS DONE
]
[2025-09-28 14:27:32] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: PB DONE
]
[2025-09-28 14:27:32] cloud_com_record_error_to_log():159 - [Exception][Network][Cloud]server(0):-90100 cloudCom dns error 1006
[2025-09-28 14:27:35]lte_start_main_loop():6643 - [LTE]Main loop init 4G ...
[2025-09-28 14:27:35]clearProfileForESM():3557 - [LTE]clear Profile For default success!
[2025-09-28 14:27:35] [ERROR] context_check_timer():553 - [HTTPD]context_free!!!!!
[2025-09-28 14:27:35] [ERROR] set_module_properties():3881 - [LTE]SET DDR CLK to 1066
[2025-09-28 14:27:35] [ERROR] set_module_properties():3902 - [LTE]Close SIM write
[2025-09-28 14:27:36]waiting_for_sim_det_ctrl():3683 - [LTE]ignored SimDetection set!
[2025-09-28 14:27:36]update_module_info_param():2909 - [LTE]lte module_info is already updated.
[2025-09-28 14:27:36]update_module_info_param():2967 - [LTE]update_module_info_param now!
[2025-09-28 14:27:36] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:36]lte_start_main_loop():6788 - [LTE]Main loop sim check...
[2025-09-28 14:27:36]lte_start_main_loop():6806 - [LTE]start do sim check
[2025-09-28 14:27:36] [ERROR] get_sim_card_status():11292 - [LTE]get_sim_card_status cpinLine:+CPIN: READY
[2025-09-28 14:27:36]get_cme_err_code():3491 - [LTE]get_cme_err_code cme_err_reply:+CPIN: READY
[2025-09-28 14:27:36]get_sim_card_status():11391 - [LTE]SIM card status changed(1 -> 2)
[2025-09-28 14:27:36]iccid_manager_handle():11209 - [LTE]4G not connected.
[2025-09-28 14:27:36]iccid_manager_handle():11232 - [LTE]lte iccid updated ...
[2025-09-28 14:27:36]handle_iccid():11158 - [LTE]SIM_QCCID:89860118803543131053
[2025-09-28 14:27:36]iccid_manager_handle():11267 - [LTE]update_iccid now!
[2025-09-28 14:27:36]update_module_info_param():2909 - [LTE]lte module_info is already updated.
[2025-09-28 14:27:36] [ERROR] get_cimi_info_param():2894 - [LTE]imsi:460092902101099
[2025-09-28 14:27:36]update_module_info_param():2957 - [LTE][imsi]460092902101099
[2025-09-28 14:27:36]update_module_info_param():2967 - [LTE]update_module_info_param now!
[2025-09-28 14:27:36] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:36]lte_start_main_loop():7293 - [LTE]Main loop search for internet.
[2025-09-28 14:27:36]update_led_state():11558 - [LTE]LED send led event 20
[2025-09-28 14:27:36] [ERROR] lte_start_main_loop():7423 - [LTE]err = 2, cgreg_status:0
Monitor: ignore <NVMP_MAIN_ALIVE, 272> because nvmp_no_restart.
[2025-09-28 14:27:36] [ERROR] lte_start_main_loop():7470 - [LTE]err = 2, cereg_status:0
[2025-09-28 14:27:36] [ERROR] lte_start_main_loop():7667 - [LTE]err = 2, creg_status:0
[2025-09-28 14:27:36] [ERROR] lte_start_main_loop():7767 - [LTE]wait for ps or cs registered.
[2025-09-28 14:27:37]lte_start_main_loop():7293 - [LTE]Main loop search for internet.
[2025-09-28 14:27:37] [ERROR] lte_start_main_loop():7423 - [LTE]err = 2, cgreg_status:0
[2025-09-28 14:27:38] [ERROR] urc_CGREG():214 - [LTE]ps_net_info.pcid:9B21, ps_net_info.cellID:858BD03
[2025-09-28 14:27:38] [ERROR] readport():451 - [LTE]urc not found, recv [+CGEV: EPS PDN ACT 1
]
[2025-09-28 14:27:38] [ERROR] lte_start_main_loop():7470 - [LTE]err = 2, cereg_status:0
[2025-09-28 14:27:38] [ERROR] lte_start_main_loop():7667 - [LTE]err = 2, creg_status:1
[2025-09-28 14:27:38] [ERROR] cloud_com_outer_start():552 - [CLOUDCOM]TCP req, cloudCom n-device-entry-sur.tplinkcloud.com:443
[2025-09-28 14:27:38] cloud_com_outer_start():551 - [Information][Network][Cloud]Start connecting to TP-Link Cloud/VMS server
[2025-09-28 14:27:40] [ERROR] diagnose_msg_send():846 - [DIAGNOSE]send lte model diagnose msg out id:2
[2025-09-28 14:27:40] [ERROR] diagnose_result_save_config():1055 - [DIAGNOSE]internet status has changed: [1] ===> [4]
[2025-09-28 14:27:40]lte_net_detection_callback():11759 - [LTE]4G internet not connected
[2025-09-28 14:27:41] [ERROR] get_sim_spn_info():524 - [LTE]AT_Response_buf:^SPN: 99,1,
[2025-09-28 14:27:41] [ERROR] get_sim_spn_info():528 - [LTE]short_eons:
[2025-09-28 14:27:41] [ERROR] get_sim_spn_info():531 - [LTE]SIM short_spn is , coding =1
[2025-09-28 14:27:41] [ERROR] readport():446 - [LTE]urc 0x10000019 have no proc fun, [+CTZV: "+32"
]
[2025-09-28 14:27:41] [ERROR] urc_CNEC_ESM_GSM():453 - [LTE]err_code:51,err_cid:8
[2025-09-28 14:27:41] [ERROR] urc_CNEC_ESM_GSM():454 - [LTE]Network side rejection occurred
[2025-09-28 14:27:41] [ERROR] urc_CNEC_ESM_GSM():470 - [LTE]no need to Switch profile
[2025-09-28 14:27:41] [ERROR] readport():451 - [LTE]urc not found, recv [+CGEV: ME PDN ACT 8,1
]
[2025-09-28 14:27:41] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: SMS DONE
]
[2025-09-28 14:27:41] [ERROR] get_sim_gid1_info():478 - [LTE]SIM GID1 is FF len = 2
[2025-09-28 14:27:41] [ERROR] get_profile():4174 - [LTE]isp:46001.
[2025-09-28 14:27:41] [ERROR] get_profile():4177 - [LTE]mcc:460 mnc:01.
[2025-09-28 14:27:42] [ERROR] get_profile():4264 - [LTE]g_apn_conf_index:0
[2025-09-28 14:27:42] [ERROR] get_profile():4266 - [LTE]g_profile_pos:2310
[2025-09-28 14:27:42] [ERROR] get_profile():4281 - [LTE]###########is mvno ERROR#########
[2025-09-28 14:27:42] get_profile():4343 - [Information][Network][4G]cur_profile apn:3gnet ip_version:2 username: password: authentication:0 pkg_name:China Unicom
[2025-09-28 14:27:42] [ERROR] get_profile():4354 - [LTE]g_apn_conf_index:1864
[2025-09-28 14:27:42] [ERROR] get_profile():4355 - [LTE]g_profile_pos:1864
[2025-09-28 14:27:42]get_default_bearer_apn():4666 - [LTE]AT*CGDFLT? return:*CGDFLT: "IPV4V6","",0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0.
[2025-09-28 14:27:42] [ERROR] get_default_bearer_apn():4668 - [LTE]pdp_type_str:IPV4V6, apn_str:
[2025-09-28 14:27:42] [ERROR] get_default_bearer_apn():4672 - [LTE]parse AT*CGDFLT success.
[2025-09-28 14:27:42] [ERROR] lte_start_main_loop():7733 - [LTE]ps network register successs, go to APN_SET status.
[2025-09-28 14:27:42]iccid_manager_handle():11209 - [LTE]4G not connected.
[2025-09-28 14:27:42]iccid_manager_handle():11232 - [LTE]lte iccid updated ...
[2025-09-28 14:27:42] [ERROR] iccid_manager_handle():11236 - [LTE]lte module_info is already updated.
[2025-09-28 14:27:42] [ERROR] iccid_manager_handle():11237 - [LTE]no need to upload iccid:89860118803543131053.
[2025-09-28 14:27:42]lte_start_main_loop():7796 - [LTE]Main loop apn set ...(1)
[2025-09-28 14:27:42] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:42] [ERROR] long_connect_reload():4392 - [LONG_CONNECT]4g internet link_status change to :2
[2025-09-28 14:27:42] [ERROR] ddns_reload():693 - [DDNS]LTE mode: link_status change to :2
[2025-09-28 14:27:42]lte_start_main_loop():7841 - [LTE]Will not set user apn!
[2025-09-28 14:27:42] [ERROR] try_to_set_apn():9463 - [LTE]cmd:AT+CGDCONT=2,"IPV4V6","3gnet"
[2025-09-28 14:27:42] [ERROR] try_to_set_apn():9478 - [LTE]cmd:AT*AUTHREQ=2,0,"",""
[2025-09-28 14:27:42]lte_start_main_loop():7850 - [LTE]set default apn success
[2025-09-28 14:27:42] [ERROR] lte_start_main_loop():7888 - [LTE]4G model start attach.
[2025-09-28 14:27:42] start_attach_process():795 - [Information][Network][4G]4G model attach successful
[2025-09-28 14:27:43] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4
[2025-09-28 14:27:43] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:0,data:0
[2025-09-28 14:27:43] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:0,data:0
[2025-09-28 14:27:43]lte_start_main_loop():7925 - [LTE]Main loop start dial...
[2025-09-28 14:27:43] cloud_com_record_error_to_log():159 - [Exception][Network][Cloud]server(0):-90100 cloudCom dns error 1006
[2025-09-28 14:27:45] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:45]lte_start_main_loop():8070 - [LTE]Waiting for usb0 ...
[2025-09-28 14:27:45]lte_start_main_loop():8097 - [LTE]Interface usb0 up
[2025-09-28 14:27:45] [ERROR] limit_network_speed():1889 - [LTE]cmd:iptables -t filter -I FORWARD 1 -m limit --limit=2000/s --limit-burst=1000 -j ACCEPT;
[2025-09-28 14:27:45] [ERROR] limit_network_speed():1893 - [LTE]cmd:iptables -t filter -A FORWARD -j DROP;
[2025-09-28 14:27:45] [ERROR] readport():451 - [LTE]urc not found, recv [+QIND: PB DONE
]
[2025-09-28 14:27:46] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4
[2025-09-28 14:27:46] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:438,data:438
[2025-09-28 14:27:46] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:28,data:28
[2025-09-28 14:27:46]lte_start_main_loop():8133 - [LTE]Main loop net connecting ...
Monitor: ignore <NVMP_MAIN_ALIVE, 272> because nvmp_no_restart.
[2025-09-28 14:27:46] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:47] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4
[2025-09-28 14:27:47] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:1184,data:1184
[2025-09-28 14:27:47] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:100,data:100
[2025-09-28 14:27:47] [ERROR] get_runtime_param():1328 - [LTE]start:+CGCONTRDP: 2,5,"3gnet","10.174.94.176","","119.7.7.7","119.6.6.6","","",0,0
+CGCONTRDP: 2,5,"3gnet","254.128.0.0.0.0.0.0.24.105.94.87.110.177.45.143","","36.8.128.1.112.0.0.0.0.0.0.0.0.0.0.1","36.8.128.1.112.0.0.0.0.0.0.0.0.0.0.0","","",0,0
OK
.
[2025-09-28 14:27:47] [ERROR] get_runtime_param():1402 - [LTE]ipv6:fe80::1869:5e57:6eb1:2d8f
[2025-09-28 14:27:47] [ERROR] get_runtime_param():1412 - [LTE]dnsv6_1:2408:8001:7000::1
[2025-09-28 14:27:47] [ERROR] get_runtime_param():1427 - [LTE]dnsv6_2:2408:8001:7000::
[2025-09-28 14:27:47]lte_reload():12064 - [LTE]lte_reload
[2025-09-28 14:27:47] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0
[2025-09-28 14:27:47] [ERROR] context_check_timer():553 - [HTTPD]context_free!!!!!
[2025-09-28 14:27:47] [ERROR] get_runtime_mtu():1206 - [LTE]mtu_val:0, old_mtu_val:1480, ret_cnt:1
[2025-09-28 14:27:47] [ERROR] get_runtime_mtu():1216 - [LTE]get lte ipv6 dns config
[2025-09-28 14:27:47] [ERROR] get_runtime_mtu():1240 - [LTE]Could not get MTU value by command AT*PCO=2, keep old mtu value.
[2025-09-28 14:27:47] [ERROR] lte_start_main_loop():8333 - [LTE]get ipv4 successful, get_ipaddr_flag:17
[2025-09-28 14:27:47] [ERROR] lte_start_main_loop():8338 - [LTE]get ipv6 successful, get_ipaddr_flag:17
[2025-09-28 14:27:47] [ERROR] lte_start_main_loop():8344 - [LTE]info_internet.ipv6_link_status:2
[2025-09-28 14:27:48] [ERROR] ds_pack_config():978 - [DS]encrypt_key_type:0
[2025-09-28 14:27:48] [ERROR] lte_start_main_loop():8378 - [LTE]dhcpc_process_cur_time - dhcpc_process_start_time:0 s
[2025-09-28 14:27:48]lte_start_main_loop():8133 - [LTE]Main loop net connecting ...
[2025-09-28 14:27:48] [ERROR] onvif_cfg_monitor_reload():111 - [ONVIF]config /protocol/ipv6 changed
[2025-09-28 14:27:48] [ERROR] nifc_set_if_usb0_info_callback():899 - [NIFC]get usb0 information success
[2025-09-28 14:27:48] [ERROR] nifc_set_if_usb0_info_callback():900 - [NIFC]Start set usb0 network information
[2025-09-28 14:27:48] [ERROR] nifc_set_if_usb0_info_callback():911 - [NIFC]start set usb0 ipv4 net.
[2025-09-28 14:27:48] ipv6_enabled():649 - [Information][Network][IPV6]Start IPv6 stateless successful
[2025-09-28 14:27:48] ipv6_reload():826 - [Information][Network][IPV6]Enable IPv6
[2025-09-28 14:27:48] [ERROR] system_if_del_mac_of_gateway():502 - [NIFC]Ioctl SIOCDARP error, error info:No such device or address
[2025-09-28 14:27:48] [ERROR] nifc_set_usb0_net():1579 - [NIFC][LTE] bridge.host_route:0.0.0.0
[2025-09-28 14:27:48] [ERROR] nifc_set_usb0_net():1637 - [NIFC]set usb0 net success
[2025-09-28 14:27:48] [ERROR] write_dns():249 - [NIFC]start write ipv6 dns nameserver.
[2025-09-28 14:27:48] [ERROR] handle_4g_internet_status():9733 - [LTE]4G internet not connected
[2025-09-28 14:27:49] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4
[2025-09-28 14:27:49] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:1184,data:1184
[2025-09-28 14:27:49] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:100,data:100
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5673 - [LTE]lte_wan6_stopXlat begin.
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5685 - [LTE]virtualIpv4:192.0.0.2
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5693 - [LTE]cmd:ip6tables -D FORWARD -t filter -i clatd -j ACCEPT.
ip6tables: Bad rule (does a matching rule exist in that chain?).
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5697 - [LTE]cmd:ip6tables -D FORWARD -t filter -i usb0 -j ACCEPT.
ip6tables: Bad rule (does a matching rule exist in that chain?).
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5701 - [LTE]cmd:iptables -D FORWARD -t filter -i eth0 -j ACCEPT.
iptables: Bad rule (does a matching rule exist in that chain?).
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5705 - [LTE]cmd:iptables -D POSTROUTING -t nat -o clatd -j SNAT --to-source 192.0.0.2.
iptables: No chain/target/match by that name.
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5709 - [LTE]cmd:echo "del clatd" > /proc/net/nat46/control.
nat46: deleting device (clatd)
Could not find device 'clatd'
[2025-09-28 14:27:49] [ERROR] lte_wan6_stopXlat():5712 - [LTE]lte_wan6_stopXlat end.
[2025-09-28 14:27:49] [ERROR] lte_dhcps_start():687 - [LTE]dev_name:eth0
[2025-09-28 14:27:49] [ERROR] start_ipv4_nat_conversion():1790 - [LTE]cmd:echo '1' > /proc/sys/net/ipv4/ip_forward
[2025-09-28 14:27:49] dhcps_start_cb():1044 - [Information][Network][DHCP]Start DHCP server
[2025-09-28 14:27:49] [ERROR] start_ipv4_nat_conversion():1826 - [LTE]cmd:iptables -t nat -A PREROUTING -d 192.168.43.1 -p udp -m udp --dport 53 -j DNAT --to-destination 119.7.7.7;
[2025-09-28 14:27:49] [ERROR] cloud_com_outer_start():552 - [CLOUDCOM]TCP req, cloudCom n-device-entry-sur.tplinkcloud.com:443
[2025-09-28 14:27:49] cloud_com_outer_start():551 - [Information][Network][Cloud]Start connecting to TP-Link Cloud/VMS server
[2025-09-28 14:27:49] [ERROR] start_ipv4_nat_conversion():1855 - [LTE]cmd:iptables -t nat -A PREROUTING -d 192.168.43.1 -p tcp -m tcp --dport 53 -j DNAT --to-destination 119.7.7.7;
[2025-09-28 14:27:50] [ERROR] start_ipv4_nat_conversion():1863 - [LTE]cmd:iptables -t nat -A POSTROUTING -s 192.168.43.0/255.255.255.0 -o usb0 -j MASQUERADE;
[2025-09-28 14:27:50]update_led_state():11558 - [LTE]LED send led event 21
[2025-09-28 14:27:50]lte_start_main_loop():8582 - [LTE]Main loop net check ...
[2025-09-28 14:27:50] lte_start_main_loop():8554 - [Information][Network][4G]*** 4g internet connected.
[2025-09-28 14:27:50] [ERROR] long_connect_reload():4392 - [LONG_CONNECT]4g internet link_status change to :1
[2025-09-28 14:27:50] [ERROR] ddns_reload():693 - [DDNS]LTE mode: link_status change to :1
[2025-09-28 14:27:50] [ERROR] start_ddns_process():579 - [DDNS]DDNS start
[2025-09-28 14:27:50] [ERROR] start_ddns_process():582 - [DDNS]dns is not enable
[2025-09-28 14:27:50] [ERROR] lte_status_check_process():10381 - [LTE]sig_lvl:4
[2025-09-28 14:27:50]lte_status_check_process():10498 - [LTE]Check net dailing status.
[2025-09-28 14:27:51] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:5491,data:5491
[2025-09-28 14:27:51] [ERROR] get_flow_bytes():4076 - [LTE]read_buf:7933,data:7933