forum.gl-inet.cn

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
    查看: 674|回复: 5

    [问题反馈] EC20无法获取ip

    [复制链接]

    3

    主题

    8

    帖子

    120

    积分

    注册会员

    Rank: 2

    积分
    120
    发表于 2023-8-9 23:05:17 | 显示全部楼层 |阅读模式
    本帖最后由 fevenor 于 2023-8-9 23:18 编辑

    EC20模块,型号EC20CFA-512-STD,通过转接板USB2.0连接MT3000,插上后设备页面展示正确识别,页面设置QMI协议连接端口/dev/cdc-wdm0,页面显示卡在“连接中……”。
    Modem管理页面可以看到已经注册到网络中,通过uqmi工具也可以确认。
    1. uqmi -d /dev/cdc-wdm0  --get-current-settings
    2. {
    3.         "pdp-type": "ipv4-or-ipv6",
    4.         "ip-family": "ipv4",
    5.         "mtu": 1500,
    6.         "ipv4": {
    7.                 "ip": "10.26.105.88",
    8.                 "dns1": "202.101.172.37",
    9.                 "dns2": "202.101.173.157",
    10.                 "gateway": "10.26.105.89",
    11.                 "subnet": "255.255.255.240"
    12.         },
    13.         "ipv6": {

    14.         },
    15.         "domain-names": {

    16.         }
    17. }
    复制代码

    查看系统日志,卡在“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指令获得的模块信息
    1. ATI

    2. Quectel
    3. EC20F
    4. Revision: EC20CFAR02A10M4G
    复制代码



    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    0

    主题

    53

    帖子

    354

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    354

    官方人员

    发表于 2023-8-16 17:49:00 | 显示全部楼层
    请在/lib/netifd/proto/qmi.sh中将echo "Y" > /sys/class/net/$ifname/qmi/raw_ip改成echo "N" > /sys/class/net/$ifname/qmi/raw_ip
    回复

    使用道具 举报

    3

    主题

    8

    帖子

    120

    积分

    注册会员

    Rank: 2

    积分
    120
     楼主| 发表于 2023-8-17 18:26:09 | 显示全部楼层
    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查看状态:
    1. uqmi -d /dev/cdc-wdm0 --get-current-settings
    2. "Out of call"
    3. uqmi -d /dev/cdc-wdm0 --get-data-status
    4. "disconnected"
    复制代码


    这个时候除了页面点终止,有什么命令可以放脚本里自动重连?
    回复

    使用道具 举报

    0

    主题

    53

    帖子

    354

    积分

    中级会员

    Rank: 3Rank: 3

    积分
    354

    官方人员

    发表于 2023-8-18 12:06:11 | 显示全部楼层
    fevenor 发表于 2023-8-17 18:26
    这样可以获取ip了
    有个新的问题,跑几个小时后,会断网,使用uqmi查看状态:

    自己写一个脚本检测?
    发现disconnected之后,执行 ifconfig wwan0 down && ifconfig wwan0 up
    回复

    使用道具 举报

    3

    主题

    8

    帖子

    120

    积分

    注册会员

    Rank: 2

    积分
    120
     楼主| 发表于 2023-8-19 21:10:45 | 显示全部楼层
    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了
    1. Sat Aug 19 11:59:06 2023 kern.warn kernel: [251707.454535] ------------[ cut here ]------------
    2. Sat Aug 19 11:59:06 2023 kern.info kernel: [251707.459245] NETDEV WATCHDOG: wwan0 (qmi_wwan): transmit queue 0 timed out
    3. Sat Aug 19 11:59:07 2023 kern.warn kernel: [251707.466135] WARNING: CPU: 0 PID: 0 at dev_watchdog+0x2d8/0x2e0
    4. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.472040] 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
    5. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.472137]  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
    6. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.559658]  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
    7. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.660294] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.4.211 #0
    8. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.666370] Hardware name: GL.iNet GL-MT3000 (DT)
    9. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.671147] pstate: 60000005 (nZCv daif -PAN -UAO)
    10. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.676012] pc : dev_watchdog+0x2d8/0x2e0
    11. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.680095] lr : dev_watchdog+0x2d8/0x2e0
    12. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.684176] sp : ffffffc010003db0
    13. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.687563] x29: ffffffc010003db0 x28: 0000000000000140
    14. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.692948] x27: 00000000ffffffff x26: 0000000000000000
    15. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.698331] x25: 0000000000000000 x24: 0000000000000000
    16. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.703715] x23: 0000000000000001 x22: ffffff8011a97000
    17. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.709099] x21: ffffff8011a97480 x20: ffffffc010a16000
    18. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.714483] x19: 0000000000000000 x18: 0000000000000000
    19. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.719866] x17: 0000000000000000 x16: 0000000000000000
    20. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.725251] x15: 0000000000000000 x14: ffffffc010a8d39a
    21. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.730635] x13: 0000000000007b24 x12: ffffffc010a8c000
    22. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.736018] x11: ffffffc010a26000 x10: 0000000000000010
    23. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.741401] x9 : 0000000000000000 x8 : 756575712074696d
    24. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.746786] x7 : 736e617274203a29 x6 : 0000000000000001
    25. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.752169] x5 : ffffffc01034c168 x4 : 0000000000000001
    26. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.757553] x3 : 0000000000000000 x2 : 0000000000000040
    27. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.762936] x1 : 0000000000000002 x0 : 000000000000003d
    28. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.768320] Call trace:
    29. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.770843]  dev_watchdog+0x2d8/0x2e0
    30. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.774580]  call_timer_fn.isra.37+0x20/0x78
    31. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.778923]  run_timer_softirq+0x1e0/0x468
    32. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.783093]  __do_softirq+0x124/0x260
    33. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.786828]  irq_exit+0xb8/0xc8
    34. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.790046]  __handle_domain_irq+0x64/0xb8
    35. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.794215]  gic_handle_irq+0xc0/0x158
    36. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.798036]  el1_irq+0xb8/0x140
    37. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.801253]  arch_cpu_idle+0x10/0x18
    38. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.804903]  do_idle+0x120/0x148
    39. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.808206]  cpu_startup_entry+0x20/0x60
    40. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.812204]  rest_init+0xb0/0xbc
    41. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.815507]  arch_call_rest_init+0xc/0x14
    42. Sat Aug 19 11:59:07 2023 kern.debug kernel: [251707.819589]  start_kernel+0x3f8/0x410
    43. Sat Aug 19 11:59:07 2023 kern.warn kernel: [251707.823324] ---[ end trace a6c56a9945c29450 ]---
    44. Sat Aug 19 11:59:08 2023 kern.warn kernel: [251709.502031] xhci-mtk 11200000.xhci: xHCI host not responding to stop endpoint command.
    45. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.510031] xhci-mtk 11200000.xhci: xHCI host controller not responding, assume dead
    46. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.518083] xhci-mtk 11200000.xhci: HC died; cleaning up
    47. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.519316] option1 ttyUSB2: usb_wwan_open: submit int urb failed: -19
    48. Sat Aug 19 11:59:08 2023 kern.info kernel: [251709.523567] usb 1-1: USB disconnect, device number 4
    49. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.530126] option1 ttyUSB2: usb_wwan_open: submit read urb 0 failed: -19
    50. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.530130] option1 ttyUSB2: usb_wwan_open: submit read urb 1 failed: -19
    51. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.530134] option1 ttyUSB2: usb_wwan_open: submit read urb 2 failed: -19
    52. Sat Aug 19 11:59:08 2023 kern.err kernel: [251709.530138] option1 ttyUSB2: usb_wwan_open: submit read urb 3 failed: -19
    53. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.563425] option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
    54. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.571652] option 1-1:1.0: device disconnected
    55. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.576630] option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
    56. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.585693] option 1-1:1.1: device disconnected
    57. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.591847] option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
    58. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.600106] option 1-1:1.2: device disconnected
    59. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.605122] option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
    60. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.613460] option 1-1:1.3: device disconnected
    61. Sat Aug 19 11:59:09 2023 kern.info kernel: [251709.618787] qmi_wwan 1-1:1.4 wwan0: unregister 'qmi_wwan' usb-11200000.xhci-1, WWAN/QMI device
    复制代码
    回复

    使用道具 举报

    3

    主题

    8

    帖子

    120

    积分

    注册会员

    Rank: 2

    积分
    120
     楼主| 发表于 2023-8-19 21:16:10 | 显示全部楼层
    另外发现,建立lte连接的时候有异常文件生成

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有帐号?立即注册

    x
    回复

    使用道具 举报

    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    Archiver|手机版|小黑屋|gl-inet.cn ( 粤ICP备18130956号 )

    GMT+8, 2024-5-4 12:56 , Processed in 0.026728 second(s), 26 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2021, Tencent Cloud.

    快速回复 返回顶部 返回列表