Automatic Activation, Hotplug and UDEV, Configuration
Post Reply
schizo99
Posts: 1
Joined: 09 Apr 2021, 11:23

e3372 not switching

Post by schizo99 » 09 Apr 2021, 11:25

Hi,

I'm running opnsense which is indeed freebsd so this question maybe doesn't qualify?

In any case when modeswitching I get the following error.

Code: Select all

$ usb_modeswitch -v 0x12d1 -p 0x14fe -c /usr/local/share/usb_modeswitch/12d1:14fe
Look for target devices ...
 No devices in target mode or class found
Look for default devices ...
 Found devices in default mode (1)
Access device 002 on bus 000
Get the current device configuration ...
 Determining the active configuration failed (error -5). Abort
 
ANY suggestions would be much appreciated!

Josh
Site Admin
Posts: 6570
Joined: 03 Nov 2007, 00:30

Re: e3372 not switching

Post by Josh » 18 Apr 2021, 09:35

Note that you have to run usb_modeswitch as "root" or with "sudo" when using it manually.

mementomori@sbj.hu
Posts: 4
Joined: 03 Sep 2021, 14:56

Re: e3372 not switching

Post by mementomori@sbj.hu » 03 Sep 2021, 15:16

Hello,
I am new in the topic and I need to ask because I cannot understand something.
I installed pfsense on a physical machine. pfsense works well.
When I plug my E3372h-320 lsusb shows that it tells about itslef it is a 12d1:1f01 and tells that it is a Mass Storage. It does not act as an ethernet device and green led is just flashing.
That's okay I have read about usb_modswitch could help me. (Later on I want to write a bit more about it.)

But when I plug this E3372h-320 to a Fedora 33 it starts automatically working. Connects to the mobile network and internal dhcp just assigns IP to ith internal USB Ethernet interface.
Additionally Fedora lsusb shows that the device is a 12d1:14db

My problem is that I would like to use this E3372h-320 in my pfsense and I have already tried out usb_modswitch but I am not able to switch it to 14db mode.

Could you please help me why I am not able to this or what I supposed to do for that?

P.S:
This was the command that I tried few times : usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P 14db -W and id didn't work. Only command that worked was this: usb_modeswitch -v 12d1 -p 1f01 -X -W (This command swithced to the old huawei mod and lsusb showed 12d1:155e - Ethernet adapter appears but IP was not assigned to it).

LOM
Posts: 1380
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: e3372 not switching

Post by LOM » 03 Sep 2021, 19:01

mementomori@sbj.hu wrote: 03 Sep 2021, 15:16
This was the command that I tried few times : usb_modeswitch -v 12d1 -p 1f01 -V 12d1 -P 14db -W and id didn't work. Only command that worked was this: usb_modeswitch -v 12d1 -p 1f01 -X -W (This command swithced to the old huawei mod and lsusb showed 12d1:155e - Ethernet adapter appears but IP was not assigned to it).
-W is verbose mode but you need to specify a switch method (like -X in your second try), without it there will be no switching.
Try instead with -H which is Huawei-mode or -J which is Huawei-new-mode.
-X is Huawei-altmode and that will not give you an ethernet device with a protocol that pfsense/freebsd have drivers for.

mementomori@sbj.hu
Posts: 4
Joined: 03 Sep 2021, 14:56

Re: e3372 not switching

Post by mementomori@sbj.hu » 03 Sep 2021, 19:24

Try instead with -H which is Huawei-mode or -J which is Huawei-new-mode.
-X is Huawei-altmode and that will not give you an ethernet device with a protocol that pfsense/freebsd have drivers for.
Do I make it well? It looks like I do not understand something.
Correct me if I am wrong but the usb_modeswitch should switch the mode. Could you read the given message below from FreeBSD? I don't know what I am doing wrong.
Thank you for your help.

Code: Select all

[2.5.2-RELEASE][root@pfSense.pince.som]/root: usb_modeswitch -v 12d1 -p 1f01 -J -W
Take all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 2.6.0 (C) Josua Dietze 2017
 * Based on libusb1/libusbx

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1f01
HuaweiNewMode=1

Look for default devices ...
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 0000:0000
  found USB ID 03f0:171d
  found USB ID 12d1:1f01
   vendor ID matched
   product ID matched
  found USB ID 08ff:2580
  found USB ID 0424:2228
  found USB ID 0bda:5411
  found USB ID 0bda:8153
 Found devices in default mode (1)
Access device 002 on bus 006
Get the current device configuration ...
Current configuration number is 1
Use interface number 0
 with class 8
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI_MOBILE
     Product: HUAWEI_MOBILE
  Serial No.: 0123456789ABCDEF
-------------------------
Using standard Huawei switching message
Looking for active drivers ...
 OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
 OK, message successfully sent
Read the response to message 1 (CSW) ...
LIBUSB_FUNCTION: libusb_bulk_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer enter
LIBUSB_FUNCTION: libusb_submit_transfer leave 0
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed enter
LIBUSB_FUNCTION: libusb10_handle_events_sub enter
LIBUSB_TRANSFER: sync I/O done
LIBUSB_FUNCTION: libusb_handle_events_timeout_completed exit
LIBUSB_FUNCTION: libusb_bulk_transfer leave
 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!

Code: Select all

[2.5.2-RELEASE][root@pfSense.pince.som]/root: dmesg
umass0: at uhub2, port 1, addr 2 (disconnected)
cd1 at umass-sim0 bus 0 scbus3 target 0 lun 0
cd1: <HUAWEI Mass Storage 2.3M>  s/n 0123456789ABCDEF detached
(cd1:umass-sim0:0:0:0): Periph destroyed
umass0: detached
ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6 (disconnected)
ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6
cdce0 on uhub2
cdce0: <CDC Ethernet Control Model (ECM)> on usbus6
ue1: <USB Ethernet> on cdce0
ue1: Ethernet address: 00:1e:10:1f:00:00
ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6 (disconnected)
cdce0: at uhub2, port 1, addr 2 (disconnected)
cdce0: detached
ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6
umass0 on uhub2
umass0: <Mass Storage> on usbus6
cd1 at umass-sim0 bus 0 scbus3 target 0 lun 0
cd1: <HUAWEI Mass Storage 2.3M> Removable CD-ROM SCSI-2 device
cd1: Serial Number 0123456789ABCDEF
cd1: 40.000MB/s transfers
cd1: 7MB (3584 2048 byte sectors)
cd1: quirks=0x10<10_BYTE_ONLY>
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d fe 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdfe
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d c1 00 00 04 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdc1
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d fe 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdfe
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d fe 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdfe
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d c1 00 00 04 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdc1
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d fe 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdfe
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
(cd1:umass-sim0:0:0:0): READ(10). CDB: 28 00 00 00 0d ff 00 00 01 00
(cd1:umass-sim0:0:0:0): CAM status: SCSI Status Error
(cd1:umass-sim0:0:0:0): SCSI status: Check Condition
(cd1:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read error)
(cd1:umass-sim0:0:0:0): Info: 0xdff
(cd1:umass-sim0:0:0:0): Error 5, Unretryable error
(cd1:umass-sim0:0:0:0): cddone: got error 0x5 back
I have found this from 2016 but it is happening presents:
I wanted to send this information to help others in their quest of 4G connectivity with FreeBSD here at Europes continent and in Finland. Huawei does not include a lot of information about their products. These 4G-network modems are usually provided by the subscriberline companies and with their own products. This one was from Sonera (Teliasonera, .se and .fi) here in Finland.
Huawei E3372 seems to be a CDCE device. /boot/loader.conf has to have a line if_cdce_load="YES". Only usb_modeswitch works with this one. Command:
/usr/local/sbin/usb_modeswitch --default-vendor 0x12d1 --default-product 0x1f01 -J
swithes to the CDCE mode. Device ue0 appears to be configured (with ifconfig -command). Using 'dhclient ue0' a network address is found and using the address and adding a default router the network interface is usable. An admin HTTP-page can be found from http://192.168.1.1. CDCE has two network interfaces at both ends of USB. Both ends can be configured with their own IP-address.
ID:s idVendor = 0x12d1 idProduct = 0x1f01 are switched to ID:s idVendor = 0x12d1 idProduct = 0x14dc . This seems to be correct since the connection to the Internet succeeded with cdce.
Using u3g.c:U3G_DEV(HUAWEI, K3372_INIT, U3GINIT_HUAWEISCSI)
Causes the modem to appear as a device id 0x1442 . Using this, only NTP port was listening. Maby this is a ntp mode. Using:U3G_DEV(HUAWEI, E3372_INIT, U3GINIT_HUAWEISCSI2)
does not give any results. These are the current possibilities if compiling a new kernel every time is possible.
It would be easier if a device had only one identification code. Reading about the different codes from usb_modeswitch list, it is maby clear that the service provider can change the device ID:s. This is not very easy to the users. If the device was only a modem, it would be usable without the flip-flop states of the modem-devices. ISO image is given with Windows and Linux drivers or software and after installing the software, the state becomes a modem state. Possibly with a HTTP-interface to connecto to the Internet.
Quick test with Linux shows that the latency time is less with Linux. Previously using PPP with these kind of wireless devices, FreeBSD has shown best latency times. This is an estimate. Using an external modem (propably Linux inside) caused more latency with PPP over the previous 3G link.

LOM
Posts: 1380
Joined: 11 Jul 2012, 15:14
Location: Koh Samui, TH

Re: e3372 not switching

Post by LOM » 04 Sep 2021, 05:16

mementomori@sbj.hu wrote: 03 Sep 2021, 19:24
Correct me if I am wrong but the usb_modeswitch should switch the mode.
It does switch your dongle
mementomori@sbj.hu wrote: 03 Sep 2021, 19:24

Code: Select all

 Response successfully read (13 bytes), status 0
Reset response endpoint 0x81
Reset message endpoint 0x01
-> Run lsusb to note any changes. Bye!
mementomori@sbj.hu wrote: 03 Sep 2021, 19:24

Code: Select all

ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6 (disconnected)
ugen6.2: <HUAWEIMOBILE HUAWEIMOBILE> at usbus6
cdce0 on uhub2
cdce0: <CDC Ethernet Control Model (ECM)> on usbus6
ue1: <USB Ethernet> on cdce0
ue1: Ethernet address: 00:1e:10:1f:00:00
but it disconnects moment later, maybe because of not enough power for the dongle from your usb port, maybe because pfsense doesn't like the ethernet device that was created..
That it didn't disconnect when you switched it into 12d1:155e indicates that it is pfsense's driver not being happy with the created ethernet device of 12d1:14db/14dc.
12d1:155e created a kind of ethernet device that pfsense doesn't have driver for so no reject/disconnect.

yours is not the first problem report, see viewtopic.php?f=4&t=2995

mementomori@sbj.hu
Posts: 4
Joined: 03 Sep 2021, 14:56

Re: e3372 not switching

Post by mementomori@sbj.hu » 04 Sep 2021, 08:46

but it disconnects moment later, maybe because of not enough power for the dongle from your usb port, maybe because pfsense doesn't like the ethernet device that was created..
That it didn't disconnect when you switched it into 12d1:155e indicates that it is pfsense's driver not being happy with the created ethernet device of 12d1:14db/14dc.
12d1:155e created a kind of ethernet device that pfsense doesn't have driver for so no reject/disconnect.

yours is not the first problem report, see viewtopic.php?f=4&t=2995
Thank you for your kind help and effort.
I go to the linked topic and dig myself into the details.

Post Reply