You may help me with an sim error i got on my r3 model with an Bus 001 Device 003: ID 2c7c:0800 Quectel RM502Q-AE, installed with a adapter M.2 Key B to Mini PCI-e NGFF M2 “https://es.aliexpress.com/item/1005004251364071.html?spm=a2g0o.order_list.order_list_main.5.62d3194dZfPazn&gatewayAdapt=glo2esp”
The issue is that i see the device, it seems to work till the point that it cant find the sim no matter the port i choose it keeps on this error, i will put some logs down:
OpenWrt SNAPSHOT, r21666-68f983ba41
<b>root@OpenWrt:~# gcom -d /dev/cdc-wdm0
***SIM ERROR***
Check device port configuration.
Check SIM is inserted
Test SIM in a mobile phone?</b>
**root@OpenWrt:~# dmesg | grep modem**
[ 18.298631] usbserial: USB Serial support registered for GSM modem (1-port)
[ 18.305706] option 1-1.1:1.0: GSM modem (1-port) converter detected
[ 18.312115] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB0
[ 18.319221] option 1-1.1:1.1: GSM modem (1-port) converter detected
[ 18.325608] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB1
[ 18.332706] option 1-1.1:1.2: GSM modem (1-port) converter detected
[ 18.339112] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB2
[ 18.346185] option 1-1.1:1.3: GSM modem (1-port) converter detected
[ 18.352581] usb 1-1.1: GSM modem (1-port) converter now attached to ttyUSB3
[ 18.367564] usbserial: USB Serial support registered for Qualcomm USB modem
<b>root@OpenWrt:~# lsusb</b>
Bus 002 Device 001: ID 1d6b:0003 Linux 5.15.86 xhci-hcd xHCI Host Controller
Bus 001 Device **003: ID 2c7c:0800 Quectel RM502Q-AE**
Bus 001 Device 002: ID 1a40:0101 USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux 5.15.86 xhci-hcd xHCI Host Controller
<b>root@OpenWrt:~# ls -l /dev/</b>
crw------- 1 root root 10, 234 Jan 4 23:19 btrfs-control
drwxr-xr-x 3 root root 60 Jan 1 1970 bus
<b>crw------- 1 root root 180, 176 Jan 4 23:19 cdc-wdm0</b>
crw------- 1 root root 5, 1 Jan 1 1970 console
crw-rw-rw- 1 root root 1, 7 Jan 1 1970 full
crw------- 1 root root 10, 229 Jan 4 23:19 fuse
crw------- 1 root root 254, 0 Jan 1 1970 gpiochip0
crw------- 1 root root 10, 183 Jan 1 1970 hwrng
crw------- 1 root root 89, 0 Jan 1 1970 i2c-0
crw------- 1 root root 89, 1 Jan 4 23:19 i2c-1
crw------- 1 root root 89, 2 Jan 4 23:19 i2c-2
crw------- 1 root root 1, 11 Jan 1 1970 kmsg
srw-rw-rw- 1 root root 0 Jan 4 23:19 log
crw------- 1 root root 10, 237 Jan 1 1970 loop-control
brw------- 1 root root 7, 0 Jan 1 1970 loop0
brw------- 1 root root 7, 1 Jan 1 1970 loop1
brw------- 1 root root 7, 2 Jan 1 1970 loop2
brw------- 1 root root 7, 3 Jan 1 1970 loop3
brw------- 1 root root 7, 4 Jan 1 1970 loop4
brw------- 1 root root 7, 5 Jan 1 1970 loop5
brw------- 1 root root 7, 6 Jan 1 1970 loop6
brw------- 1 root root 7, 7 Jan 1 1970 loop7
brw------- 1 root root 179, 0 Jan 1 1970 mmcblk0
brw------- 1 root root 179, 8 Jan 1 1970 mmcblk0boot0
brw------- 1 root root 179, 16 Jan 1 1970 mmcblk0boot1
brw------- 1 root root 179, 1 Jan 1 1970 mmcblk0p1
brw------- 1 root root 259, 0 Jan 1 1970 mmcblk0p128
brw------- 1 root root 179, 2 Jan 1 1970 mmcblk0p2
brw------- 1 root root 179, 3 Jan 1 1970 mmcblk0p3
brw------- 1 root root 179, 4 Jan 1 1970 mmcblk0p4
brw------- 1 root root 179, 5 Jan 1 1970 mmcblk0p5
crw------- 1 root root 250, 0 Jan 1 1970 mmcblk0rpmb
crw------- 1 root root 90, 0 Jan 1 1970 mtd0
crw------- 1 root root 90, 1 Jan 1 1970 mtd0ro
crw------- 1 root root 90, 2 Jan 1 1970 mtd1
crw------- 1 root root 90, 3 Jan 1 1970 mtd1ro
crw------- 1 root root 90, 4 Jan 1 1970 mtd2
crw------- 1 root root 90, 5 Jan 1 1970 mtd2ro
crw------- 1 root root 90, 6 Jan 1 1970 mtd3
crw------- 1 root root 90, 7 Jan 1 1970 mtd3ro
brw------- 1 root root 31, 0 Jan 1 1970 mtdblock0
brw------- 1 root root 31, 1 Jan 1 1970 mtdblock1
brw------- 1 root root 31, 2 Jan 1 1970 mtdblock2
brw------- 1 root root 31, 3 Jan 1 1970 mtdblock3
crw-rw-rw- 1 root root 1, 3 Jan 1 1970 null
crw------- 1 root root 1, 4 Jan 1 1970 port
crw------- 1 root root 108, 0 Jan 4 23:19 ppp
crw-rw-rw- 1 root root 5, 2 Jan 5 06:50 ptmx
drwxr-xr-x 2 root root 0 Jan 1 1970 pts
crw-rw-rw- 1 root root 1, 8 Jan 1 1970 random
lrwxrwxrwx 1 root root 8 Jan 1 1970 shm -> /tmp/shm
lrwxrwxrwx 1 root root 15 Jan 1 1970 stderr -> /proc/self/fd/2
lrwxrwxrwx 1 root root 15 Jan 1 1970 stdin -> /proc/self/fd/0
lrwxrwxrwx 1 root root 15 Jan 1 1970 stdout -> /proc/self/fd/1
crw-rw-rw- 1 root root 5, 0 Jan 1 1970 tty
crw-rw---- 1 root dialout 4, 64 Jan 1 1970 ttyS0
crw-rw---- 1 root dialout 4, 65 Jan 1 1970 ttyS1
crw-rw---- 1 root dialout 4, 74 Jan 1 1970 ttyS10
crw-rw---- 1 root dialout 4, 75 Jan 1 1970 ttyS11
crw-rw---- 1 root dialout 4, 76 Jan 1 1970 ttyS12
crw-rw---- 1 root dialout 4, 77 Jan 1 1970 ttyS13
crw-rw---- 1 root dialout 4, 78 Jan 1 1970 ttyS14
crw-rw---- 1 root dialout 4, 79 Jan 1 1970 ttyS15
crw-rw---- 1 root dialout 4, 66 Jan 1 1970 ttyS2
crw-rw---- 1 root dialout 4, 67 Jan 1 1970 ttyS3
crw-rw---- 1 root dialout 4, 68 Jan 1 1970 ttyS4
crw-rw---- 1 root dialout 4, 69 Jan 1 1970 ttyS5
crw-rw---- 1 root dialout 4, 70 Jan 1 1970 ttyS6
crw-rw---- 1 root dialout 4, 71 Jan 1 1970 ttyS7
crw-rw---- 1 root dialout 4, 72 Jan 1 1970 ttyS8
crw-rw---- 1 root dialout 4, 73 Jan 1 1970 ttyS9
<b>crw-rw---- 1 root dialout 188, 0 Jan 4 23:19 ttyUSB0
crw-rw---- 1 root dialout 188, 1 Jan 4 23:19 ttyUSB1
crw-rw---- 1 root dialout 188, 2 Jan 4 23:38 ttyUSB2
crw-rw---- 1 root dialout 188, 3 Jan 4 23:19 ttyUSB3</b>
crw------- 1 root root 249, 0 Jan 1 1970 ubi0
crw------- 1 root root 249, 1 Jan 1 1970 ubi0_0
crw------- 1 root root 249, 2 Jan 1 1970 ubi0_1
crw------- 1 root root 249, 3 Jan 1 1970 ubi0_2
crw------- 1 root root 249, 4 Jan 1 1970 ubi0_3
crw------- 1 root root 249, 5 Jan 1 1970 ubi0_4
crw------- 1 root root 249, 6 Jan 1 1970 ubi0_5
crw------- 1 root root 10, 127 Jan 1 1970 ubi_ctrl
brw------- 1 root root 254, 0 Jan 1 1970 ubiblock0_2
brw------- 1 root root 259, 1 Jan 1 1970 ubiblock0_2p1
crw-rw-rw- 1 root root 1, 9 Jan 1 1970 urandom
crw------- 1 root root 10, 130 Jan 1 1970 watchdog
crw------- 1 root root 252, 0 Jan 1 1970 watchdog0
crw-rw-rw- 1 root root 1, 5 Jan 1 1970 zero
<b>root@OpenWrt:~# comgt -v</b>
comgt 06:53:16 -> Verbose output enabled
comgt 06:53:16 -> argc:2
comgt 06:53:16 -> argv[0]=comgt
comgt 06:53:16 -> argv[1]=-v
comgt 06:53:16 -> ---Script---
1@0000 opengt
2@0007 set com 115200n81
3@0029 set senddelay 0.05
4@0052 send "AT+CFUN=1^m"
5@0075 waitquiet 1 0.2
6@0095 :start
7@0104 flash 0.1
8@0118 send "AT+CPIN?^m"
9@0140 waitfor 30 "SIM PUK","SIM PIN","READY","ERROR","ERR"
10@0197 if % = -1 goto error
11@0222 if % = 0 goto ready
12@0246 if % = 1 goto getpin
13@0271 if % = 2 goto ready
14@0295 if % = 3 goto error
15@0319 if % = 4 goto error
16@0343 :error
17@0352 print $s," ***SIM ERROR***
18@0383 "
19@0385 print "Check device port configuration.
20@0429 Check SIM is inserted
21@0451 Test SIM in a mobile phone?
22@0479 "
23@0481 exit 1
24@0492 :getpin
25@0502 #handle case where original Vodafone 3G generates wrong response
26@0571 waitfor 1 "2"
27@0589 if % = 0 goto ready
28@0613 print "
29@0625 Enter PIN number: "
30@0645 input $x
31@0658 let a=len($x)
32@0676 if a<>5 goto getpin
33@0700 let c=0
34@0712 :test
35@0720 let $c=$mid($x,c,1)
36@0744 if $c<"0" goto getpin
37@0770 if $c>"9" goto getpin
38@0796 inc c
39@0806 if c<4 goto test
40@0827 let a=val($x)
41@0845 if a<0 goto getpin
42@0868 if a>9999 goto getpin
43@0894 let $c=$left($x,4)
44@0917 :enterpin
45@0929 send "AT+CPIN=\""
46@0951 send $c
47@0963 send "\"^m"
48@0979 waitfor 20 "OK","ERR"
49@1005 if % = -1 goto timeerror
50@1034 if % = 0 goto cont
51@1057 if % = 1 goto pinerror
52@1084 :pinerror
53@1096 :timeerror
54@1109 print "ERROR entering PIN code
55@1144 "
56@1146 print "Caution! - entering the wrong PIN code three times will lock the SIM
57@1226 "
58@1228 exit 1
59@1239 :ready
60@1248 print "SIM ready
61@1269 "
62@1271 :cont
63@1279 print "Waiting for Registration..(120 sec max)"
64@1331 let c = 0
65@1345 :waitreg
66@1356 send "AT+CREG?^m"
67@1378 waitfor 2 "+CREG: 0,1","+CREG: 0,5"
68@1418 if % = -1 goto regagain
69@1446 if % = 0 goto homereg
70@1472 if % = 1 goto roamreg
71@1498 :regagain
72@1510 if c > 120 goto regtimeout
73@1541 let c=c+2
74@1555 print "."
75@1569 goto waitreg
76@1586 :regtimeout
77@1600 print "
78@1612 Failed to register
79@1631 "
80@1633 exit 1
81@1644 :homereg
82@1655 print "
83@1667 Registered on Home network: "
84@1697 goto registered
85@1717 :roamreg
86@1728 print "
87@1740 Registered on Roaming network: "
88@1773 goto registered
89@1793 :registered
90@1807 waitquiet 1 0.1
91@1827 send "AT+COPS?^m"
92@1849 get 2 "^m" $s
93@1867 get 2 "^m" $s
94@1885 let a=len($s)
95@1903 let b=a-12
96@1918 if b < 1 goto regtimeout
97@1947 let $c=$right($s,b)
98@1971 print $c,"
99@1986 "
100@1988 let c=0
101@2000 :signal
102@2010 waitquiet 1 0.1
103@2030 send "AT+CSQ^m"
104@2050 get 2 "^m" $s
105@2068 get 2 "^m" $s
106@2086 let a=len($s)
107@2104 let a=a-6
108@2118 let $s=$right($s,a)
109@2142 if $s <> "0,0" goto sigcont
110@2174 if c > 3 goto sigexit
111@2200 let c=c+1
112@2214 pause 1
113@2226 goto signal
114@2242 :sigexit
115@2253 print "Signal strength measure 0,0 too low!"
116@2302 exit 1
117@2313 :sigcont
118@2324 print "Signal Quality:",$s,"\n"
119@2360 waitquiet 1 0.1
comgt 06:53:16 -> ---End of script---
comgt 06:53:16 -> @0000 opengt
Trying list of devices
comgt 06:53:16 -> Opened /dev/ttyUSB2 as FD 3
comgt 06:53:16 -> @0011 set com 115200n81
comgt 06:53:16 -> @0033 set senddelay 0.05
comgt 06:53:16 -> @0056 send "AT+CFUN=1^m"
comgt 06:53:17 -> @0079 waitquiet 1 0.2
comgt 06:53:17 -> @0097 :start
comgt 06:53:17 -> @0108 flash 0.1
comgt 06:53:17 -> @0122 send "AT+CPIN?^m"
comgt 06:53:18 -> @0144 waitfor 30 "SIM PUK","SIM PIN","READY","ERROR","ERR"
moderated by frank-w: format output as code, change title