[partially SOLVED]USB-Serial cable on XE300

[SOLVED]
The XE300 we purchased is the model with a battery, as the without-battery model is out of stock at that time.
while we do not need the internal battery and charging the battery releases more heat. so we removed the internal battery.
I believe this caused the problem. see the below link for more info.

once we restored the battery, the USB port gets the 5V power.

however, we still need help to make it works on the battery removed XE300

Thank you.

MT

while it is so weird. I tried excatly same procedure on another XE300, and no luck.
I use a USB port tester and found that the USB port does not have 5V voltage output, except only few seconds after XE300 was powered on.
keep working on it…
============================================================

Hi There,
We purchased a few dozen XE300s for our project. but we are now facing problems letting the USB-Serial cable work on XE300. We tried different cables with almost all chip brands (CH341, PL2303, FTDI…).
For sure, All the drivers were installed. Tried on the firmware version 3.212 and 3.216, with just factory default settings and packages, plus only USB-Serial cable drivers and the usbutils package were installed.

There is no response after any cable was plugged into XE300.

With the lsusb command, it listed four devices:

root@GL-XE300:~# lsusb
Bus 001 Device 005: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 05e3:0752 Genesys Logic, Inc. 
Bus 001 Device 002: ID 05e3:0618 Genesys Logic, Inc. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

but not showing any USB-Serial cable.

root@GL-XE300:~# dmesg | grep -E 'USB|usb'
[   11.630131] usbcore: registered new interface driver usbfs
[   11.635938] usbcore: registered new interface driver hub
[   11.641505] usbcore: registered new device driver usb
[   11.696733] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.729165] ehci-platform 1b000000.usb: EHCI Host Controller
[   11.735091] ehci-platform 1b000000.usb: new USB bus registered, assigned bus number 1
[   11.743302] ehci-platform 1b000000.usb: irq 3, io mem 0x1b000000
[   11.772146] ehci-platform 1b000000.usb: USB 2.0 started, EHCI 1.00
[   11.779368] hub 1-0:1.0: USB hub found
[   11.791423] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   11.808033] uhci_hcd: USB Universal Host Controller Interface driver
[   11.819852] usbcore: registered new interface driver usb-storage
[   11.828602] usbcore: registered new interface driver uas
[   12.472192] usb 1-1: new high-speed USB device number 2 using ehci-platform
[   12.707351] hub 1-1:1.0: USB hub found
[   13.246897] usb 1-1.1: new high-speed USB device number 3 using ehci-platform
[   13.451687] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[   13.472570] scsi host0: usb-storage 1-1.1:1.0
[   13.572219] usb 1-1.4: new full-speed USB device number 4 using ehci-platform
[   14.572150] usb 1-1.2: new high-speed USB device number 5 using ehci-platform
[   31.047966] usbcore: registered new interface driver cdc_acm
[   31.053878] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[   31.114196] usbcore: registered new interface driver cdc_wdm
[   31.274408] usbcore: registered new interface driver ipheth
[   32.000037] usbcore: registered new interface driver usbserial
[   32.006246] usbcore: registered new interface driver usbserial_generic
[   32.013103] usbserial: USB Serial support registered for generic
[   32.295496] usbcore: registered new interface driver cdc_ether
[   32.327226] usbcore: registered new interface driver cdc_ncm
[   32.514674] usbcore: registered new interface driver ch341
[   32.520414] usbserial: USB Serial support registered for ch341-uart
[   32.572997] usb 1-1.4: ch341-uart converter now attached to ttyUSB0
[   32.589019] usbcore: registered new interface driver cp210x
[   32.594946] usbserial: USB Serial support registered for cp210x
[   32.648454] usbcore: registered new interface driver huawei_cdc_ncm
[   32.982421] qmi_wwan 1-1.2:1.4: cdc-wdm0: USB WDM device
[   33.013092] qmi_wwan 1-1.2:1.4 wwan0: register 'qmi_wwan' at usb-1b000000.usb-1.2, WWAN/QMI device, a6:8b:6e:90:45:ed
[   33.024355] usbcore: registered new interface driver qmi_wwan
[   33.055859] usbcore: registered new interface driver rndis_host
[   33.137136] usbcore: registered new interface driver sierra
[   33.143043] usbserial: USB Serial support registered for Sierra USB modem
[   33.204957] usbcore: registered new interface driver sierra_net
[   33.356247] usbcore: registered new interface driver option
[   33.362079] usbserial: USB Serial support registered for GSM modem (1-port)
[   33.376745] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB1
[   33.390931] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB2
[   33.405184] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB3
[   33.419370] usb 1-1.2: GSM modem (1-port) converter now attached to ttyUSB4
[   33.675255] usbcore: registered new interface driver rt2800usb
[ 1302.371618] usbcore: registered new interface driver pl2303
[ 1302.377470] usbserial: USB Serial support registered for pl2303

Please help,
Thank you very much.

MT

root@GL-XE300:~# cat /sys/kernel/debug/gpio 
gpiochip0: GPIOs 0-31, parent: platform/18040000.gpio, 18040000.gpio:
 gpio-0   (                    |lte_power           ) out hi    
 gpio-1   (                    |gl-xe300:green:wan  ) out hi    
 gpio-3   (                    |reset               ) in  hi    
 gpio-10  (                    |gl-xe300:green:lan  ) out lo    
 gpio-12  (                    |gl-xe300:green:wlan ) out lo    
 gpio-13  (                    |gl-xe300:green:lte  ) out hi    
 gpio-16  (                    |sysfs               ) out hi    
 gpio-17  (                    |sd_detect           ) out lo

I can confirm that CH341 must be working because we are using it.

for the XE300 with battery model, it works with any USB-serial cable when the driver was properly installed. However, if you removed the internal battery from XE300, it seems that a script turned off the power of the USB port during the initialization. we are looking for a solution…

@galenzhao, any solution?

have you tried this

echo 16 >/sys/class/gpio/export
echo out >/sys/class/gpio/gpio16/direction
echo 1 >/sys/class/gpio/gpio16/value

I have same problem , After I removed the internal battery, I can’t access the usb prot any more .
step 1:
root@GL-XE300:~# lsusb
Bus 001 Device 005: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 004: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 05e3:0752 Genesys Logic, Inc.
Bus 001 Device 002: ID 05e3:0618 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@GL-XE300:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/18040000.gpio, 18040000.gpio:
gpio-0 ( |lte_power ) out hi
gpio-1 ( |gl-xe300:green:wan ) out hi
gpio-3 ( |reset ) in hi
gpio-10 ( |gl-xe300:green:lan ) out hi
gpio-12 ( |gl-xe300:green:wlan ) out lo
gpio-13 ( |gl-xe300:green:lte ) out lo
gpio-16 ( |sysfs ) out hi
gpio-17 ( |sd_detect ) out lo

step 2
echo 16 >/sys/class/gpio/export
(some error like this device is using…)
echo out >/sys/class/gpio/gpio16/direction
echo 1 >/sys/class/gpio/gpio16/value

root@GL-XE300:~# lsusb
Bus 001 Device 004: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 003: ID 05e3:0752 Genesys Logic, Inc.
Bus 001 Device 002: ID 05e3:0618 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

root@GL-XE300:~# cat /sys/kernel/debug/gpio
gpiochip0: GPIOs 0-31, parent: platform/18040000.gpio, 18040000.gpio:
gpio-0 ( |lte_power ) out hi
gpio-1 ( |gl-xe300:green:wan ) out hi
gpio-3 ( |reset ) in hi
gpio-10 ( |gl-xe300:green:lan ) out hi
gpio-12 ( |gl-xe300:green:wlan ) out lo
gpio-13 ( |gl-xe300:green:lte ) out lo
gpio-16 ( |sysfs ) out hi
gpio-17 ( |sd_detect ) out lo

now the usb cant’ use
please help

For XE300 with batteries, if you remove battery, the USB port will not have power.

This cannot be controlled via the GPIO. The GPIO control can only be used for non-battery version.

@alzhao
after removed battery, then I give a 5v to the battery jumper . then USB port have power. My usb device is a usb gps receiver, I can see the device work ,the usb has a red led on. but I can’t get the usb connected.
before I removed battery , the usb use /dev/ttyACM0.
I attached the device information below, please help 。

logread
Thu Mar 21 18:29:10 2024 kern.err kernel: [ 402.099036] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
Thu Mar 21 18:29:11 2024 kern.err kernel: [ 403.008911] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
Thu Mar 21 18:29:11 2024 kern.info kernel: [ 403.015900] usb 1-1-port3: attempt power cycle
Thu Mar 21 18:29:12 2024 kern.err kernel: [ 404.268664] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
Thu Mar 21 18:29:13 2024 kern.err kernel: [ 405.178535] usb 1-1-port3: Cannot enable. Maybe the USB cable is bad?
Thu Mar 21 18:29:13 2024 kern.err kernel: [ 405.185534] usb 1-1-port3: unable to enumerate USB device

root@GL-XE300:~/gps# lsusb
Bus 001 Device 006: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem
Bus 001 Device 005: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 001 Device 003: ID 05e3:0752 Genesys Logic, Inc.
Bus 001 Device 002: ID 05e3:0618 Genesys Logic, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

ls /dev/
bus log mtd3ro mtdblock4 pts ttyS12 ttyS7 ubi0_0
cdc-wdm0 memory_bandwidth mtd4 mtdblock5 random ttyS13 ttyS8 ubi0_1
console mtd0 mtd4ro net sda ttyS14 ttyS9 ubi_ctrl
cpu_dma_latency mtd0ro mtd5 network_latency shm ttyS15 ttyUSB0 ubiblock0_0
full mtd1 mtd5ro network_throughput tty ttyS2 ttyUSB1 urandom
fuse mtd1ro mtdblock0 null ttyS0 ttyS3 ttyUSB2 watchdog
gpiochip0 mtd2 mtdblock1 port ttyS1 ttyS4 ttyUSB3 zero
hwrng mtd2ro mtdblock2 ppp ttyS10 ttyS5 ttyUSB4
kmsg mtd3 mtdblock3 ptmx ttyS11 ttyS6 ubi0

Even didn’t think this is a solution. But this should work.

Can you get the log when you plug in the usb device?
logread
dmesg