EC20无法获取ip
本帖最后由 fevenor 于 2023-8-9 23:18 编辑EC20模块,型号EC20CFA-512-STD,通过转接板USB2.0连接MT3000,插上后设备页面展示正确识别,页面设置QMI协议连接端口/dev/cdc-wdm0,页面显示卡在“连接中……”。
Modem管理页面可以看到已经注册到网络中,通过uqmi工具也可以确认。
uqmi -d /dev/cdc-wdm0--get-current-settings
{
"pdp-type": "ipv4-or-ipv6",
"ip-family": "ipv4",
"mtu": 1500,
"ipv4": {
"ip": "10.26.105.88",
"dns1": "202.101.172.37",
"dns2": "202.101.173.157",
"gateway": "10.26.105.89",
"subnet": "255.255.255.240"
},
"ipv6": {
},
"domain-names": {
}
}
查看系统日志,卡在“udhcpc: sending discover”
“ cat /sys/class/net/wwan0/qmi/raw_ip” 显示为 “Y”
若直接执行echo "N" > /sys/class/net/wwan0/qmi/raw_ip ,报write error: Resource busy
通过页面终止后可以顺利写入,但一旦重新开启,raw_ip自动设置为Y
若页面选择3G协议连接ttyUSB3,可以正常获得ipv4地址及ipv6地址,但网速只有1~2M
通过AT指令获得的模块信息ATI
Quectel
EC20F
Revision: EC20CFAR02A10M4G
请在/lib/netifd/proto/qmi.sh中将echo "Y" > /sys/class/net/$ifname/qmi/raw_ip改成echo "N" > /sys/class/net/$ifname/qmi/raw_ip dengxinfa 发表于 2023-8-16 17:49
请在/lib/netifd/proto/qmi.sh中将echo "Y" > /sys/class/net/$ifname/qmi/raw_ip改成echo "N" > /sys/clas ...
这样可以获取ip了
有个新的问题,跑几个小时后,会断网,使用uqmi查看状态:
uqmi -d /dev/cdc-wdm0 --get-current-settings
"Out of call"
uqmi -d /dev/cdc-wdm0 --get-data-status
"disconnected"
这个时候除了页面点终止,有什么命令可以放脚本里自动重连? fevenor 发表于 2023-8-17 18:26
这样可以获取ip了
有个新的问题,跑几个小时后,会断网,使用uqmi查看状态:
自己写一个脚本检测?
发现disconnected之后,执行 ifconfig wwan0 down && ifconfig wwan0 up dengxinfa 发表于 2023-8-18 12:06
自己写一个脚本检测?
发现disconnected之后,执行 ifconfig wwan0 down && ifconfig wwan0 up ...
试了下,ifconfig wwan0 up后,modem_1_1_4不会重启获取ip,ifup modem_1_1 也不太行,得通过echo 0 > /sys/bus/usb/devices/1-1/bConfigurationValue的方式重连usb才行。
然后又出现了一个新问题,内核崩了,崩溃后就没usb了
Sat Aug 19 11:59:06 2023 kern.warn kernel: ------------[ cut here ]------------
Sat Aug 19 11:59:06 2023 kern.info kernel: NETDEV WATCHDOG: wwan0 (qmi_wwan): transmit queue 0 timed out
Sat Aug 19 11:59:07 2023 kern.warn kernel: WARNING: CPU: 0 PID: 0 at dev_watchdog+0x2d8/0x2e0
Sat Aug 19 11:59:07 2023 kern.debug kernel: Modules linked in: pppoe ppp_async option wireguard usb_wwan rndis_host qmi_wwan pppox ppp_generic libchacha20poly1305 ipt_REJECT huawei_cdc_ncm chacha_neon cdc_ncm cdc_ether xt_time xt_tcpudp xt_tcpmss xt_string xt_statistic xt_state xt_socket xt_recent xt_quota xt_pkttype xt_owner xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_iprange xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_bpf xt_addrtype xt_TPROXY xt_TCPMSS xt_REDIRECT xt_MASQUERADE xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY usbserial usbnet ts_kmp ts_fsm ts_bm slhc poly1305_neon nf_tproxy_ipv6 nf_tproxy_ipv4 nf_socket_ipv6 nf_socket_ipv4 nf_reject_ipv4 nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_conntrack_netlink nf_conncount mtqos mtk_warp_proxy mtfwd mt_wifi libcurve25519_generic libchacha iptable_raw iptable_nat iptable_mangle iptable_filter ipt_ECN ipheth ip_tables exfat crc_ccitt cdc_wdm cdc_acm arptable_filter arpt_mangle arp_tables fuse
Sat Aug 19 11:59:07 2023 kern.debug kernel: sch_tbf sch_ingress sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred act_gact pwm_fan hwmon xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink ip6table_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip6t_NPT nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 nfsv4 nfsd nfs ifb ip6_udp_tunnel udp_tunnel rpcsec_gss_krb5 auth_rpcgss oid_registry tun vfat fat ntfs lockd sunrpc grace dns_resolver dm_mirror dm_region_hash dm_log dm_crypt dm_mod dax nls_utf8 nls_iso8859_1 nls_cp437 md5 des_generic libdes cts cbc arc4 mtdoops gl_fan_driver mtk_warp mtkhnat leds_gpio uhci_hcd ohci_platform ohci_hcd
Sat Aug 19 11:59:07 2023 kern.debug kernel: fsl_mph_dr_of ehci_platform ehci_fsl ehci_hcd gpio_button_hotplug gl_sdk4_tertf ext4 mbcache jbd2 mii conninfra crc32c_generic gl_sdk4_hw_info
Sat Aug 19 11:59:07 2023 kern.debug kernel: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.211 #0
Sat Aug 19 11:59:07 2023 kern.debug kernel: Hardware name: GL.iNet GL-MT3000 (DT)
Sat Aug 19 11:59:07 2023 kern.debug kernel: pstate: 60000005 (nZCv daif -PAN -UAO)
Sat Aug 19 11:59:07 2023 kern.debug kernel: pc : dev_watchdog+0x2d8/0x2e0
Sat Aug 19 11:59:07 2023 kern.debug kernel: lr : dev_watchdog+0x2d8/0x2e0
Sat Aug 19 11:59:07 2023 kern.debug kernel: sp : ffffffc010003db0
Sat Aug 19 11:59:07 2023 kern.debug kernel: x29: ffffffc010003db0 x28: 0000000000000140
Sat Aug 19 11:59:07 2023 kern.debug kernel: x27: 00000000ffffffff x26: 0000000000000000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x25: 0000000000000000 x24: 0000000000000000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x23: 0000000000000001 x22: ffffff8011a97000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x21: ffffff8011a97480 x20: ffffffc010a16000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x19: 0000000000000000 x18: 0000000000000000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x17: 0000000000000000 x16: 0000000000000000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x15: 0000000000000000 x14: ffffffc010a8d39a
Sat Aug 19 11:59:07 2023 kern.debug kernel: x13: 0000000000007b24 x12: ffffffc010a8c000
Sat Aug 19 11:59:07 2023 kern.debug kernel: x11: ffffffc010a26000 x10: 0000000000000010
Sat Aug 19 11:59:07 2023 kern.debug kernel: x9 : 0000000000000000 x8 : 756575712074696d
Sat Aug 19 11:59:07 2023 kern.debug kernel: x7 : 736e617274203a29 x6 : 0000000000000001
Sat Aug 19 11:59:07 2023 kern.debug kernel: x5 : ffffffc01034c168 x4 : 0000000000000001
Sat Aug 19 11:59:07 2023 kern.debug kernel: x3 : 0000000000000000 x2 : 0000000000000040
Sat Aug 19 11:59:07 2023 kern.debug kernel: x1 : 0000000000000002 x0 : 000000000000003d
Sat Aug 19 11:59:07 2023 kern.debug kernel: Call trace:
Sat Aug 19 11:59:07 2023 kern.debug kernel: dev_watchdog+0x2d8/0x2e0
Sat Aug 19 11:59:07 2023 kern.debug kernel: call_timer_fn.isra.37+0x20/0x78
Sat Aug 19 11:59:07 2023 kern.debug kernel: run_timer_softirq+0x1e0/0x468
Sat Aug 19 11:59:07 2023 kern.debug kernel: __do_softirq+0x124/0x260
Sat Aug 19 11:59:07 2023 kern.debug kernel: irq_exit+0xb8/0xc8
Sat Aug 19 11:59:07 2023 kern.debug kernel: __handle_domain_irq+0x64/0xb8
Sat Aug 19 11:59:07 2023 kern.debug kernel: gic_handle_irq+0xc0/0x158
Sat Aug 19 11:59:07 2023 kern.debug kernel: el1_irq+0xb8/0x140
Sat Aug 19 11:59:07 2023 kern.debug kernel: arch_cpu_idle+0x10/0x18
Sat Aug 19 11:59:07 2023 kern.debug kernel: do_idle+0x120/0x148
Sat Aug 19 11:59:07 2023 kern.debug kernel: cpu_startup_entry+0x20/0x60
Sat Aug 19 11:59:07 2023 kern.debug kernel: rest_init+0xb0/0xbc
Sat Aug 19 11:59:07 2023 kern.debug kernel: arch_call_rest_init+0xc/0x14
Sat Aug 19 11:59:07 2023 kern.debug kernel: start_kernel+0x3f8/0x410
Sat Aug 19 11:59:07 2023 kern.warn kernel: ---[ end trace a6c56a9945c29450 ]---
Sat Aug 19 11:59:08 2023 kern.warn kernel: xhci-mtk 11200000.xhci: xHCI host not responding to stop endpoint command.
Sat Aug 19 11:59:08 2023 kern.err kernel: xhci-mtk 11200000.xhci: xHCI host controller not responding, assume dead
Sat Aug 19 11:59:08 2023 kern.err kernel: xhci-mtk 11200000.xhci: HC died; cleaning up
Sat Aug 19 11:59:08 2023 kern.err kernel: option1 ttyUSB2: usb_wwan_open: submit int urb failed: -19
Sat Aug 19 11:59:08 2023 kern.info kernel: usb 1-1: USB disconnect, device number 4
Sat Aug 19 11:59:08 2023 kern.err kernel: option1 ttyUSB2: usb_wwan_open: submit read urb 0 failed: -19
Sat Aug 19 11:59:08 2023 kern.err kernel: option1 ttyUSB2: usb_wwan_open: submit read urb 1 failed: -19
Sat Aug 19 11:59:08 2023 kern.err kernel: option1 ttyUSB2: usb_wwan_open: submit read urb 2 failed: -19
Sat Aug 19 11:59:08 2023 kern.err kernel: option1 ttyUSB2: usb_wwan_open: submit read urb 3 failed: -19
Sat Aug 19 11:59:09 2023 kern.info kernel: option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Sat Aug 19 11:59:09 2023 kern.info kernel: option 1-1:1.0: device disconnected
Sat Aug 19 11:59:09 2023 kern.info kernel: option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
Sat Aug 19 11:59:09 2023 kern.info kernel: option 1-1:1.1: device disconnected
Sat Aug 19 11:59:09 2023 kern.info kernel: option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
Sat Aug 19 11:59:09 2023 kern.info kernel: option 1-1:1.2: device disconnected
Sat Aug 19 11:59:09 2023 kern.info kernel: option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
Sat Aug 19 11:59:09 2023 kern.info kernel: option 1-1:1.3: device disconnected
Sat Aug 19 11:59:09 2023 kern.info kernel: qmi_wwan 1-1:1.4 wwan0: unregister 'qmi_wwan' usb-11200000.xhci-1, WWAN/QMI device 另外发现,建立lte连接的时候有异常文件生成
页:
[1]