3g / 4g Connection with sim in router head weblink hdrm200

Good afternoon, I'm new to the forum and first of all I wanted to thank you for the great community behind this beautiful project.

I have bought this router head weblink hdrm200 that has two integrated sim card slots but I cannot configure the router to get the internet from the sim cards.I have tried with two protocols and it does not work:
-UMTS/GPRS/EV-DO with de modem device /dev/cdc-wdrm0
-QMI

I am configuring via putty or interface, the first problem I detect is that I cannot find the command to see if it detects me or not the sim, or in which port it is.

My version of OpenWrt is 19.07.8 r with kernel version 4.14.241.

It uses a MediaTek MT7620A so the qmi protocol is not correct, can someone help me?

Regards

It looks like your router is equipped with SIMCOM SIM7100E LTE modem (thanks, google)
In order to check its capabilities access your router via ssh and run
cat /sys/kernel/debug/usb/devices
You need to post the complete output.

Thanks for your quick answer, when I enter that command I can see that it is on port 1, if I'm right, but how do I know what protocol to use?
I am noob to this software, sorry for the simple questions.

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1e0e ProdID=9001 Rev= 2.32
S:  Manufacturer=SimTech, Incorporated
S:  Product=SimTech, Incorporated

T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=480  MxCh= 1
B:  Alloc=  0/800 us ( 0%), #Int=  2, #Iso=  0
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0002 Rev= 4.14
S:  Manufacturer=Linux 4.14.241 ehci_hcd
S:  Product=EHCI Host Controller
S:  SerialNumber=101c0000.ehci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   4 Ivl=256ms

T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  2 Spd=480  MxCh= 4
D:  Ver= 2.00 Cls=09(hub  ) Sub=00 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0608 Rev=85.37
S:  Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   1 Ivl=256ms

T:  Bus=01 Lev=02 Prnt=02 Port=01 Cnt=01 Dev#=  3 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1e0e ProdID=9001 Rev= 2.32
S:  Manufacturer=SimTech, Incorporated
S:  Product=SimTech, Incorporated
S:  SerialNumber=0123456789ABCDEF
C:* #Ifs= 7 Cfg#= 1 Atr=80 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=83(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=85(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=87(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E:  Ad=89(I) Atr=03(Int.) MxPS=  10 Ivl=32ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
E:  Ad=8b(I) Atr=03(Int.) MxPS=   8 Ivl=32ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I:* If#= 6 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
E:  Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T:  Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12   MxCh= 1
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.10 Cls=09(hub  ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1d6b ProdID=0001 Rev= 4.14
S:  Manufacturer=Linux 4.14.241 ohci_hcd
S:  Product=Generic Platform OHCI controller
S:  SerialNumber=101c1000.ohci
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   2 Ivl=255ms

 this is all of de devices

You have QMI interface available, so follow the docs

okey! but i have a problem with this protocol,the router dont detect my sim of Simyo

I can't know what port the sim is in

then use another SIM slot, it looks like you have two of them

I have tried both sim slots and nothing ... I get this error:

See if you have the necessary GPIO configured and try to switch the slots (source):

You control which SIM slot to use by writing 0/1 to
/sys/class/gpio/sim_switch/value. In order for the change to take
effect, you can either use AT-commands (AT+CFUN) or power-cycle the
modem (write 0/1 to /sys/class/gpio/power_mpcie/value)

thanks for helping me so much, I put that command and it won't let me access.

image

Obviously :wink:
You need to do this in a right way:

# read value
cat /sys/class/gpio/sim_switch/value
# write values
echo 0 > /sys/class/gpio/sim_switch/value
echo 1 > /sys/class/gpio/sim_switch/value

You don't need pictures to show text, just use copy/paste.

1 Like

You're using spaces in the wrong places. After a command (cat) there needs to be a space. In the directory path (directory/subdirectory etc) no spaces around the slashes.

1 Like
root@OpenWrt:~# # read value
root@OpenWrt:~# cat /sys/class/gpio/sim_switch/value
cat: can't open '/sys/class/gpio/sim_switch/value': No such file or directory
root@OpenWrt:~# # write values
root@OpenWrt:~# echo 0 > /sys/class/gpio/sim_switch/value
-ash: can't create /sys/class/gpio/sim_switch/value: nonexistent directory
root@OpenWrt:~# echo 1 > /sys/class/gpio/sim_switch/value
-ash: can't create /sys/class/gpio/sim_switch/value: nonexistent directory


bad luck .... thanks I will keep looking to see what it can be, on the page you sent me they talk about it.

Note that I used if : "if you have the necessary GPIO configured"
Please show the output of cat /sys/kernel/debug/gpio

root@OpenWrt:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-23, parent: platform/10000600.gpio, 10000600.gpio:
 gpio-0   (                    |sysfs               ) out lo
 gpio-1   (                    |sysfs               ) out lo
 gpio-2   (                    |sysfs               ) out lo
 gpio-11  (                    |sysfs               ) out lo
 gpio-12  (                    |wps                 ) in  hi
 gpio-13  (                    |reset               ) in  hi
 gpio-14  (                    |sysfs               ) out lo
 gpio-19  (                    |hdrm200:red:rssi    ) out hi
 gpio-21  (                    |sysfs               ) out hi

gpiochip1: GPIOs 24-39, parent: platform/10000638.gpio, 10000638.gpio:
 gpio-38  (                    |hdrm200:green:system) out lo

gpiochip2: GPIOs 72-72, parent: platform/10000688.gpio, 10000688.gpio:
 gpio-72  (                    |hdrm200:green:wifi  ) out lo

those are my number of gpio

so you do not have sim_switch that was proposed in the commit message and you will need to use gpio0 instead:
echo 1 > /sys/class/gpio/gpio0/value (to set 1)
echo 0 > /sys/class/gpio/gpio0/value (to set 0)

If you only have one SIM card you don't have to worry about the SIM switching mechanism, though you will have to identify which slot defaults to being live.

Try a SIM card in both slots, in each case using modem commands to see if it has communication with the SIM card.

OP already checked that

Well it didn't come up and connect to the Internet, but there are a lot of other things besides not finding the SIM that would cause that. The OP needs to first confirm that the modem sees the SIM at all then continue to troubleshoot from there. Is the PIN locked, is the modem carrier locked, is the LTE band compatible, etc.

That is the problem I have, I cannot detect the sim, it seems that the module does not communicate with the router, what commands do you use to see if it detects the sim? I have put back in case it was a possible cause, the company is simyo and if it is compatible