Add GobiNet driver to the Build Environment

Hi guys,

I'm using T-CPE1200K ( MT7621AT SoC ) and built-in Quectel-EC25-EC as LTE chip.
I used OpenWRT build environment to build for MT7621 target, with all known USB, CDC, QMI, and so on ...
after flashing, device boot and working good but Quectel-EC25-EC is not detected, I tried to add USB or any other USB drivers but no success,

root@OpenWRT:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@OpenWRT:~# echo "0x2c7c 0x0125" > /sys/bus/usb-serial/drivers/generic/new_id
root@OpenWRT:~# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@OpenWRT:~# ls /dev/
autofs              mtd3ro              net
bus                 mtd4                network_latency
console             mtd4ro              network_throughput
cpu_dma_latency     mtd5                null
full                mtd5ro              port
fuse                mtd6                ppp
gpiochip0           mtd6ro              ptmx
gpiochip1           mtdblock0           pts
gpiochip2           mtdblock1           random
kmsg                mtdblock2           shm
log                 mtdblock3           tty
mem                 mtdblock4           ttyS0
memory_bandwidth    mtdblock5           ttyS1
mtd0                mtdblock6           ttyS2
mtd0ro              natcap_ctl          ubi_ctrl
mtd1                natcap_peer_ctl     urandom
mtd1ro              natflow_ctl         watchdog
mtd2                natflow_ktun_ctl    watchdog0
mtd2ro              natflow_user_ctl    watchdog1
mtd3                natflow_zone_ctl    zero

I have GobiNet driver but I don't know how to add these files to the OpenWRT Build Environment,

Can you please help me to add this GobiNet driver and Connect Manager to the Build environment?

I'm using OpenWRT 18.06.8 as Build Environment,

No USB driver is going to help if the device doesn't show up here. It is not connected to any USB bus. It is either physically disconnected or powered down. If the router with modem worked before you installed OpenWrt, then my guess is that there is a GPIO controlling power to the modem slot.

2 Likes

I can confirm that the Quectel-EC25 works perfect in openwrt as-is without gobi drivers.

1 Like

Yes, I confirm too, pcie models will works fine but my model is built-in
See the attached pic plz
image

What about you?
Is your chip pcie or builtin ?

To compile the gobi drivers try putting the source code into the package directory of OpenWrt, then run ./scrips feeds update -a && ./scripts feeds install -a then pick them from menu config.

I have both, but it should not matter at all.
In the end, it's a USB device regardless of the form factor.

1 Like

Nice! Then you can be pretty sure the connection is OK :slight_smile:

Look for GPIOs controllng regulator and/or reset pin. The modem is probably just powered down by default.

EDIT: Googling for the device, I found this: https://github.com/x-wrt/x-wrt/commit/da623b2be252f19274f77fb9b03819a2518dc71c

It defines 3 gpio_export pins which all seem relevant to the modem named "pd8_switch_ec20"; "pd9_reset_ec20"; and "4v_en". You obviously have a newer modem, but those GPIOs contrlolling the modem are probably the same. I assume you'll need to enable them all to turn the modem on. Or maybe not the "switch" thing? I have no idea what that does.

here is GPIO values,

are these fine or need any modification?

root@OpenWrt:~#  cat /sys/kernel/debug/gpio 
gpiochip0: GPIOs 0-31, parent: platform/1e000600.gpio, 1e000600.gpio:
 gpio-7   (                    |xwrt:blue:wifi      ) out lo    
 gpio-8   (                    |xwrt:blue:wps       ) out lo    
 gpio-10  (                    |xwrt:blue:eth       ) out hi    
 gpio-12  (                    |wps                 ) in  hi    
 gpio-18  (                    |reset               ) in  hi    
 gpio-22  (                    |xwrt:blue:lte_2g    ) out hi    
 gpio-23  (                    |4v_en               ) out hi    
 gpio-24  (                    |pd9_reset_ec20      ) out hi    
 gpio-25  (                    |pd8_switch_ec20     ) out hi    
 gpio-26  (                    |xwrt:blue:lte_4g    ) out hi    
 gpio-27  (                    |xwrt:blue:lte_3g    ) out hi    
 gpio-28  (                    |xwrt:blue:rssi3     ) out hi    
 gpio-29  (                    |xwrt:blue:rssi2     ) out hi    
 gpio-30  (                    |xwrt:blue:rssi1     ) out hi    

gpiochip1: GPIOs 32-63, parent: platform/1e000600.gpio, 1e000600.gpio:
 gpio-32  (                    |xwrt:blue:rssi4     ) out hi    
 gpio-33  (                    |xwrt:blue:rssi5     ) out hi    

gpiochip2: GPIOs 64-95, parent: platform/1e000600.gpio, 1e000600.gpio:

These instructions worked for me: https://www.twblogs.net/a/5b8aae502b71775d1ce88638

Once you get the gobinet driver running for your module, how (what is the next step) to get OpenWRT to have it connect/dial?