Netgate SG-1000 microFirewall

Author Topic: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading  (Read 1643 times)

0 Members and 1 Guest are viewing this topic.

Offline rite2dinesh

  • Newbie
  • *
  • Posts: 2
  • Karma: +2/-0
    • View Profile
Hi,

We managed to successfully setup the PPP connection with the Huawei ME909u modem. I have no issues with the connection itself. However, when we reboot the system the PPP connection never tries to reconnect automatically.

After some analysis, we found that the modem is not detected properly on warm/cold boot. As you can see from the dmesg output : ugen1.3: <Unknown> at usbus1 (disconnected) , the usb device is not recognized correctly.

dmesg after boot:
Code: [Select]
usbus0: 5.0Gbps Super Speed USB v3.0
usbus1: 480Mbps High Speed USB v2.0
ugen0.1: <0x1022> at usbus0
uhub0: <0x1022 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ugen1.1: <AMD> at usbus1
uhub1: <AMD EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
uhub0: 4 ports with 4 removable, self powered
uhub1: 2 ports with 2 removable, self powered
ugen1.2: <vendor 0x0438> at usbus1
uhub2: <vendor 0x0438 product 0x7900, class 9/0, rev 2.00/0.18, addr 2> on usbus1
uhub2: 4 ports with 4 removable, self powered
ugen1.3: <Unknown> at usbus1 (disconnected)

If we unplug and plug it again, the modem is detected correctly with all the serial ports available.

dmesg after unplug and plug:
Code: [Select]
ugen1.3: <HUAWEI Technology> at usbus1
u3g0: <HUAWEI Mobile Connect - Modem> on usbus1
u3g0: Found 5 ports.

We tried to manually load u3g module, but it look like it is part of the kernel itself and it is not necessary.
Code: [Select]
> kldload u3g
kldload: can't load u3g: module already loaded or in kernel

The system we are using is
Code: [Select]
System: PC Engines APU2
Version: 2.3.3-RELEASE (amd64)

content of /boot/loader.conf
Code: [Select]
autoboot_delay="3"
umodem_load="YES"
u3g_load="YES"
ucom_load="YES"
boot_serial="YES"
console="comconsole"
comconsole_speed="115200"
hw.usb.no_pf="1"

Could some one please tell me setup procedure so that the modem is detected correctly on warm/cold boot? and eventually establishing the PPP connection.


« Last Edit: March 06, 2017, 07:57:06 am by rite2dinesh »

Offline rite2dinesh

  • Newbie
  • *
  • Posts: 2
  • Karma: +2/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #1 on: March 06, 2017, 11:51:17 am »
This could be a possible workaround.

By resetting the usb bus number 1 early in the boot process triggers the modem to reload. On reload the drivers are loaded again, and the serial port are exposed properly.

https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

Code: [Select]
<earlyshellcmd>usbconfig -u 1 reset</earlyshellcmd>
There are two other products on this bus, we don't know yet if there are any side-effects.

Code: [Select]
ugen0.1: <XHCI root HUB 0x1022> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB AMD> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <product 0x7900 vendor 0x0438> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen1.3: <HUAWEI Mobile HUAWEI Technology> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

If some one has a better solution/suggestion, please update us.


« Last Edit: March 06, 2017, 01:34:36 pm by rite2dinesh »

Offline z3n0

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #2 on: March 08, 2017, 04:05:58 am »
This could be a possible workaround.

By resetting the usb bus number 1 early in the boot process triggers the modem to reload. On reload the drivers are loaded again, and the serial port are exposed properly.

https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

Code: [Select]
<earlyshellcmd>usbconfig -u 1 reset</earlyshellcmd>
There are two other products on this bus, we don't know yet if there are any side-effects.

Code: [Select]
ugen0.1: <XHCI root HUB 0x1022> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB AMD> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <product 0x7900 vendor 0x0438> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen1.3: <HUAWEI Mobile HUAWEI Technology> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

If some one has a better solution/suggestion, please update us.

I have the same problem.
Could you explain what do I do?
Thank u

Offline Slam

  • Sr. Member
  • ****
  • Posts: 302
  • Karma: +1/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #3 on: May 16, 2017, 07:53:41 pm »
Thanks, this worked.

Slam


This could be a possible workaround.

By resetting the usb bus number 1 early in the boot process triggers the modem to reload. On reload the drivers are loaded again, and the serial port are exposed properly.

https://doc.pfsense.org/index.php/Executing_commands_at_boot_time

Code: [Select]
<earlyshellcmd>usbconfig -u 1 reset</earlyshellcmd>
There are two other products on this bus, we don't know yet if there are any side-effects.

Code: [Select]
ugen0.1: <XHCI root HUB 0x1022> at usbus0, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=SAVE (0mA)
ugen1.1: <EHCI root HUB AMD> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (0mA)
ugen1.2: <product 0x7900 vendor 0x0438> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=SAVE (100mA)
ugen1.3: <HUAWEI Mobile HUAWEI Technology> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

If some one has a better solution/suggestion, please update us.

Offline nop

  • Newbie
  • *
  • Posts: 4
  • Karma: +1/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #4 on: December 01, 2017, 09:13:49 pm »
I installed a shellcmd

php -r 'require_once("shaper.inc"); require_once("filter.inc"); interface_ppps_configure('opt2');'

to fix this issue.

Replace opt2 with the optx you are using.

Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #5 on: December 02, 2017, 06:28:02 am »
I have exactly same problem. ME909u-521 not recognized.

Board: PC Engines APU3B4 (with 1 mSATA and 2 mPCIe slots)
pdSense 2.4.0 amd64, FreeBSD 11.1-realease-p1
LTE modem: Huawei ME909u-521

Dmesg says: ugen2.3: <unknown> at usbus2 (disconnected).

I added <earlyshellcmd>usbconfig -u 2 reset</earlyshellcmd> above <system>-part to config.xml.
Rebooted. I get still the same 'unknown' message.

I tried manually run that 'usbconfig -u 2 reset' from command line, then I get
'usbconfig: could not open device: No error: 0'

What is going wrong here?

Offline johnkeates

  • Hero Member
  • *****
  • Posts: 841
  • Karma: +60/-1
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #6 on: December 03, 2017, 05:10:30 pm »
I have exactly same problem. ME909u-521 not recognized.

Board: PC Engines APU3B4 (with 1 mSATA and 2 mPCIe slots)
pdSense 2.4.0 amd64, FreeBSD 11.1-realease-p1
LTE modem: Huawei ME909u-521

Dmesg says: ugen2.3: <unknown> at usbus2 (disconnected).

I added <earlyshellcmd>usbconfig -u 2 reset</earlyshellcmd> above <system>-part to config.xml.
Rebooted. I get still the same 'unknown' message.

I tried manually run that 'usbconfig -u 2 reset' from command line, then I get
'usbconfig: could not open device: No error: 0'

What is going wrong here?

Are you sure you are using the correct device id?

Offline z3n0

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #7 on: December 04, 2017, 01:47:55 am »
Set delay to 40s

Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #8 on: December 06, 2017, 11:55:55 am »
I have changed the delay from 3 s to 41 s, even 63 - no help.

I changed the Huawei module to another mPCIe slot, no change.

If the module is removed, then the '<unknown> at usbus2...' line in dmesg disappears.

Updated pfSense to the newest 2.4.2. No change :-(

Clearly the system can not identify the Huawei module or the module is broken.
Or the module is an uncompatible subversion or something.

Any good ideas ? Is it possible the module is in some strange mode?
It is not very easy to test the module/MB combination with some other OS.


Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #9 on: December 06, 2017, 12:50:35 pm »
I have exactly same problem. ME909u-521 not recognized.

Board: PC Engines APU3B4 (with 1 mSATA and 2 mPCIe slots)
pdSense 2.4.0 amd64, FreeBSD 11.1-realease-p1
LTE modem: Huawei ME909u-521

Dmesg says: ugen2.3: <unknown> at usbus2 (disconnected).

I added <earlyshellcmd>usbconfig -u 2 reset</earlyshellcmd> above <system>-part to config.xml.
Rebooted. I get still the same 'unknown' message.

I tried manually run that 'usbconfig -u 2 reset' from command line, then I get
'usbconfig: could not open device: No error: 0'

What is going wrong here?

Are you sure you are using the correct device id?

No I am not :-(

But how can I get one ?

usbconfig dump_device_desc :

ugen1.1: <AMD EHCI root HUB> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps)
pwr=SAVE (0mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009  <HUB>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0000
  idProduct = 0x0000
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <AMD>
  iProduct = 0x0002  <EHCI root HUB>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

ugen2.1: <AMD EHCI root HUB> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps)
pwr=SAVE (0mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009  <HUB>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0000
  idProduct = 0x0000
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <AMD>
  iProduct = 0x0002  <EHCI root HUB>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

ugen0.1: <0x1022 XHCI root HUB> at usbus0, cfg=0 md=HOST spd=SUPER
(5.0Gbps) pwr=SAVE (0mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0300
  bDeviceClass = 0x0009  <HUB>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0003
  bMaxPacketSize0 = 0x0009
  idVendor = 0x0000
  idProduct = 0x0000
  bcdDevice = 0x0100
  iManufacturer = 0x0001  <0x1022>
  iProduct = 0x0002  <XHCI root HUB>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

ugen1.2: <vendor 0x0438 product 0x7900> at usbus1, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009  <HUB>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0438
  idProduct = 0x7900
  bcdDevice = 0x0018
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

ugen2.2: <vendor 0x0438 product 0x7900> at usbus2, cfg=0 md=HOST spd=HIGH
(480Mbps) pwr=SAVE (100mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0009  <HUB>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0001
  bMaxPacketSize0 = 0x0040
  idVendor = 0x0438
  idProduct = 0x7900
  bcdDevice = 0x0018
  iManufacturer = 0x0000  <no string>
  iProduct = 0x0000  <no string>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001

Offline uno12

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #10 on: December 28, 2017, 06:34:24 am »
Hi,

i had the same problem... the ME909u-521 was not found with usbconfig. I got the message "...(disconnected)" for the USB Device in the log file (dmesg).
also the usbreset did not work for me..

I asume this is a timing problem.
My original installation was on a 16G mSATA SSD. Boot was very fast and everything was o.k. but the huawei card was not detected.
I tried Linux boot from USB Stick, and the card was found correct.
also, if i boot pfsense from usb stick.... much slower than Sata SSD, the ME909 is found and works. I have rebooted this config several times and had no more issues that the device cuaU0.0-4 devices not available.

i will try to put some delays in the boot process, to bring my ME909 card online even with the SATA SSD....



regards

Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #11 on: January 05, 2018, 12:09:26 pm »
Do you have found how to slow boot down?

/boot/loader.conf setting increases the wait time in boot OK, but does not resolve the original problem - identifying the 909u-521 :-/

I have run out of ideas.

Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #12 on: January 06, 2018, 07:20:10 am »
I installed pfSense on a slow USB-memory-stick, and booted from that.
ME909u-521 gets identified and shows 5 serial ports, from cuaU0.0 to 0.4
Configured PPP to port /dev/cuaU0.0, and added &F0E1Q0 to init string.
Yes, it connects and works.

Now the problem still lies how to make it work from much faster SSD-disk...

Offline jsrobinson3

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #13 on: January 26, 2018, 02:52:21 pm »
I installed pfSense on a slow USB-memory-stick, and booted from that.
ME909u-521 gets identified and shows 5 serial ports, from cuaU0.0 to 0.4
Configured PPP to port /dev/cuaU0.0, and added &F0E1Q0 to init string.
Yes, it connects and works.

Now the problem still lies how to make it work from much faster SSD-disk...

Have you figured out how to solve this I am having what seems to be the same problem with a Sierra MC7355

Offline nora

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #14 on: January 28, 2018, 09:02:15 am »
Hi guys.

I have here the same problem.
On the running system, plugged off the miniPCIe modem, plugged it in again an its recognized.
But that can't be the plan.
Any new advisories to get the modem recognized?

Tried all the recommendations, no luck.

Cheers
Nora

Offline nora

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #15 on: January 29, 2018, 10:34:54 am »
Hi
some more output:
After plugged off and plugged in the modem.

Code: [Select]
ugen2.3: <HUAWEI Technology> at usbus2
u3g0: <HUAWEI Mobile Connect - Modem> on usbus2
u3g0: Found 5 ports.
ugen2.3: <HUAWEI Technology> at usbus2 (disconnected)
u3g0: at uhub4, port 3, addr 3 (disconnected)
ugen2.3: <HUAWEI Technology> at usbus2
u3g0: <HUAWEI Mobile Connect - Modem> on usbus2
u3g0: Found 5 ports.

then the usbconfig dump_device_desc
Code: [Select]
..
..
ugen2.3: <HUAWEI Mobile HUAWEI Technology> at usbus2, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (500mA)

  bLength = 0x0012
  bDescriptorType = 0x0001
  bcdUSB = 0x0200
  bDeviceClass = 0x0000  <Probed by interface class>
  bDeviceSubClass = 0x0000
  bDeviceProtocol = 0x0000
  bMaxPacketSize0 = 0x0040
  idVendor = 0x12d1
  idProduct = 0x1573
  bcdDevice = 0x0228
  iManufacturer = 0x0001  <HUAWEI Technology>
  iProduct = 0x0002  <HUAWEI Mobile>
  iSerialNumber = 0x0003  <0123456712ABCA17>
  bNumConfigurations = 0x0003


Where can we do some configuration to recognize this card?
I found an other peace of documentation here:
I don't know if i'm allowed to post an foreign URL ?
But I don't know if this could help?

Any help is greatly appreciated

Nora

Offline arundsis

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #16 on: January 30, 2018, 05:22:59 am »
Usbmodeswitch is needed with some usb-type modemsticks, it can change the stick's mode to modem, from the original usb-memory-mode offering typically some installer software for Windows.

As far as I know, ME909 mPCIe-module does not need usbmodeswitch, at least not for it's original purpose.

But maybe it can still be possible to help or re-run the recognition procedure with usbmodeswitch, I don't know.

I quess the core of this problem is somewhere in FreeBSD code, maybe some driver or other USB-related thing causing a timing problem and locking the bus/module.
The best alternative would be if some BSD- or pfSense developer looked at it...

Offline wireless

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: 3G/LTE Modem (Huawei ME909u -521) on boot - USB driver not loading
« Reply #17 on: February 12, 2018, 02:25:58 pm »

I have here the same problem.
On the running system, plugged off the miniPCIe modem, plugged it in again an its recognized.
But that can't be the plan.
Any new advisories to get the modem recognized?


I've spent a substantial amount of time struggling with this issue: APU board, Huawei ME909u-521, boot from SSD disk. It doesn't matter if the modem is plugged into the motherboard connector or into a USB connector using adapter. Neither this is pfSense-spesific, OPNsense does the same, actually it's the underlying up-to-date freeBSD. AFAIK, old enough (maybe 9.x?) freeBSD did work. But it seems to be essential that 1) the board used is APU and 2) having the Huawei module plugged in during cold boot, the result will be a failure. Plug it in when the system is running, it works.

I've been in touch with PC Engines' support, last week I heard they were able to reproduce the problem and promised to investigate it. So I'll keep my fingers crossed there will be a bios update to fix this some day.

As a workaround I'm using Sierra MC7455 in my most urgent application. It works out-of-the-box, needs no init strings. Unfortunately I've found no way how to get any info about the radio link quality while the connection is active.
« Last Edit: February 12, 2018, 02:30:38 pm by wireless »