How to setup/configure drivers for AG35 on Ubuntu?

Hello there.
I’m struggling with configuring drivers on Ubuntu for AG35.
From the scrap it don’t want to communicate properly (on windows everything is fine). As I can see, the main issue is that Ubuntu doesn’t assigns drivers to interfaces as lsusb -t returns me:

  |__ Port 004: Dev 010, If 0, Class=[unknown], Driver=rndis_host, 480M
  |__ Port 004: Dev 010, If 1, Class=[unknown], Driver=rndis_host, 480M
  |__ Port 004: Dev 010, If 2, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 3, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 4, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 5, Class=[unknown], Driver=cdc_acm, 480M
  |__ Port 004: Dev 010, If 6, Class=[unknown], Driver=cdc_acm, 480M
  |__ Port 004: Dev 010, If 7, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 8, Class=[unknown], Driver=[none], 480M

After a bit of testing, it turned out that I need to make interface number 8 to use usbfs driver and some of the others to use option driver. So, basically if I do:

adb shell
exit

And then

sudo modprobe option
echo '2c7c 600a' | sudo tee -a /sys/bus/usb-serial/drivers/option1/new_id > /dev/null

It starts to work the way I need it (I can communicate via screen or sscom and use adb). But it’s a bit of hassle to do every time when I restart Ubuntu. Is there any other way? Am I missing something, perhaps? Or can I automate it somehow?

What’s the Linux kernel version? We can rebuild the option.ko.

I use Ubuntu 25. It’s Kernel: Linux 6.14.0-36-generic
It also turned out that my solution is bad because after device burning the option driver takes over every interface so I need to manually unbind 8th to be able to use adb again. So inconvenient.

Just add the

{ USB_DEVICE_INTERFACE_CLASS(0x2C7C, 0x600A, 0xff),.driver_info = RSVD(8) },

in the option.c.

userial.zip (19.0 KB)

make 
sudo make install
sudo depmod

And then restart the ubuntu.

I did everything like you said and nothing change
The only concerning thing was this message:

xwolkx@xwolkx:~/Downloads/userial$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.14.0-36-generic/build M=/home/xwolkx/Downloads/userial modules
make[1]: Entering directory '/usr/src/linux-headers-6.14.0-36-generic'
make[2]: Entering directory '/home/xwolkx/Downloads/userial'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0
  You are using:           gcc-14 (Ubuntu 14.2.0-19ubuntu2) 14.2.0
  CC [M]  option.o
  MODPOST Module.symvers
  CC [M]  option.mod.o
  CC [M]  .module-common.o
  LD [M]  option.ko
  BTF [M] option.ko
Skipping BTF generation for option.ko due to unavailability of vmlinux
make[2]: Leaving directory '/home/xwolkx/Downloads/userial'
make[1]: Leaving directory '/usr/src/linux-headers-6.14.0-36-generic'

After all the commands and restart, on plug I see this with lsusb -t:

  |__ Port 004: Dev 010, If 0, Class=[unknown], Driver=rndis_host, 480M
  |__ Port 004: Dev 010, If 1, Class=[unknown], Driver=rndis_host, 480M
  |__ Port 004: Dev 010, If 2, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 3, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 4, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 5, Class=[unknown], Driver=cdc_acm, 480M
  |__ Port 004: Dev 010, If 6, Class=[unknown], Driver=cdc_acm, 480M
  |__ Port 004: Dev 010, If 7, Class=[unknown], Driver=[none], 480M
  |__ Port 004: Dev 010, If 8, Class=[unknown], Driver=[none], 480M

So far, the only temporary solution I found is creating a udev rule with next params:

ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="600a", \
RUN+="/sbin/modprobe option", \
RUN+="/bin/sh -c 'grep -q \"2c7c 600a\" /sys/bus/usb-serial/drivers/option1/new_id || echo 2c7c 600a > /sys/bus/usb-serial/drivers/option1/new_id'"

ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceNumber}=="02|03|05|06|07|08", \
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="600a", \
RUN+="/bin/sh -c 'echo $kernel | sudo tee /sys/bus/usb/drivers/option/unbind'"

ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceNumber}=="04", \
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="600a", \
RUN+="/bin/sh -c 'echo $kernel | sudo tee /sys/bus/usb/drivers/option/bind'"

ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceNumber}=="05|06", \
ATTRS{idVendor}=="2c7c", ATTRS{idProduct}=="600a", \
RUN+="/bin/sh -c 'echo $kernel | sudo tee /sys/bus/usb/drivers/cdc_acm/bind'"

I have no idea which interface should be controlled by which driver, but I’m sure that interface 4 should be used by driver Option and interface 8 should be used by ADB.

Hi @Alex_Wolf ,

since you have ADB access, you should be able to find the USB compositions on the AG35 (after adb shell) with find / -name compositions. cd to this directory and grep -i 600a *. This should give you the file which normally contains a description of the composition and the actual shell commands to set it up. Looking at the lsusb -d 2c7c: -vv output on the Linux host should also give additional information.

Regards,
Reinhard

I tried find / -name compositions as you suggested, but it returns nothing.
And lsusb -d 2c7c: -vv provides me with a lot of data that I have no idea how to use
output.txt (11.0 KB)

Looks like this is not a standard AG35 which should be on USB id 2c7c:0435 according to Quectel documentation but yours is on USB id 2c7c:600a. According to the lsusb output it is actually a idProduct 0x600a AG35CET.

Except for the RNDIS, ACM TTY and ADB interfaces for which you don’t have to add udev rules you would need information from Quectel to know which function the other non-AT vendor specific interfaces have.

If the forum support cannot give you this information it probably would be best to refer to one of their FAEs.

The AG35 is based on ASR chip rather than Qualcomm mdm9628, and so that the PID is 0x600A rather than 0x0435.

Please use the option.ko you got. Have you tried the make install?

What do you mean? I have done all the steps you asked.

After all the commands and restart, on plug I see this with lsusb -t :

Did you try it? And then check whether the option will load automatically.

Yes I did.
After restart of PC option driver didn’t took any interfaces of the device.