Activation Codes and Methods, Hardware Details, Sniffing
Post Reply
solene
Posts: 2
Joined: Fri Nov 10, 2017 4:01 pm

Huawei E398-u1

Post by solene » Fri Nov 10, 2017 4:26 pm

Hello,

I bought a Huawei E398-u1 and I'm trying to make it working on FreeBSD with usb_modeswitch-2.5.0.
I'm not familiar with usb_modeswitch at all, I may missed something.

Here are the full informations :

dmesg when connecting

Code: Select all

umass0 on uhub0                                                                          
umass0: <Huawei Technologies HUAWEI Mobile, class 0/0, rev 2.00/0.00, addr 1> on usbus0  
umass0:  SCSI over Bulk-Only; quirks = 0x0100                                            
umass0:2:0: Attached to scbus2                                                           
umass0: at uhub0, port 4, addr 1 (disconnected)
usbconfig -u 0 dump_device_desc

Code: Select all

                                                                         
ugen0.2: <Huawei Technologies HUAWEI Mobile> at usbus0, 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 = 0x1505
  bcdDevice = 0x0000
  iManufacturer = 0x0003  <Huawei Technologies>
  iProduct = 0x0002  <HUAWEI Mobile>
  iSerialNumber = 0x0000  <no string>
  bNumConfigurations = 0x0001
usb_modeswitch -v 12d1 -p 1505 -J -W -R

Code: Select all

Take all parameters from the command line                                                
                                                                                         
                                                                                         
 * usb_modeswitch: handle USB devices with multiple modes                                
 * Version 2.5.0 (C) Josua Dietze 2017                                                   
 * Based on libusb1/libusbx                                                              
                                                                                         
 ! PLEASE REPORT NEW CONFIGURATIONS !                                                    
                                                                                         
DefaultVendor=  0x12d1                                                                   
DefaultProduct= 0x1505                                                                   
HuaweiNewMode=1                                                                          
                                                                                         
Look for default devices ...                                                             
  found USB ID 0000:0000                                                                 
  found USB ID 0000:0000                                                                 
  found USB ID 0438:7900                                                                 
  found USB ID 12d1:1505                                                                 
   vendor ID matched                                                                     
   product ID matched                                                                    
 Found devices in default mode (1)                                                       
Access device 002 on bus 000                                                             
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 Technologies                                                        
     Product: HUAWEI Mobile                                                              
  Serial No.: not provided                                                               
-------------------------                                                                
Using standard Huawei switching message                                                  
Looking for active driver ...                                                            
 No active driver found. Detached before or never attached                               
Set up interface 0                                                                       
Use endpoint 0x01 for message sending ...                                                
Trying to send message 1 to endpoint 0x01 ...                                            
 OK, message successfully sent                                                           
Read the response to message 1 (CSW) ...                                                 
 Response reading failed (error -99)                                                     
 Device is gone, skip any further commands                                               
Device handle empty, skip USB reset                                                      
-> Run lsusb to note any changes. Bye!                                             
 
From there, I tried various combinations of flags and ID without success (I had no hope in this but whatever). I'm not even sure this device is supported.

Could someone help me ? I will provide needed informations of course.

LOM
Posts: 1286
Joined: Wed Jul 11, 2012 3:14 pm
Location: Koh Samui, TH

Re: Huawei E398-u1

Post by LOM » Sat Nov 11, 2017 9:29 am

You can remove the -R switch from the command, it has never been needed by Huawei dongles and was ignored by usb_modeswitch because the device had already disappeared.

Disappeared because it had been switched and you were asked to run lsusb in order to verify the new device id. In your case I assume it is once again usbconfig -u 0 dump_device_desc where you should see the usb id 12d1:1506 now.

Your dmesg also ought to show the disappearence of 12d1:1505 and the appearance of 12d1:1506 shortly thereafter.

solene
Posts: 2
Joined: Fri Nov 10, 2017 4:01 pm

Re: Huawei E398-u1

Post by solene » Fri Jan 05, 2018 4:58 pm

LOM wrote:You can remove the -R switch from the command, it has never been needed by Huawei dongles and was ignored by usb_modeswitch because the device had already disappeared.

Disappeared because it had been switched and you were asked to run lsusb in order to verify the new device id. In your case I assume it is once again usbconfig -u 0 dump_device_desc where you should see the usb id 12d1:1506 now.

Your dmesg also ought to show the disappearence of 12d1:1505 and the appearance of 12d1:1506 shortly thereafter.
Sorry to answer that late, you were right but FreeBSD didn't recognize the modem correctly. I have to force the reset of the usb device to get it working.

Here is a script I use in /etc/rc.local to initialize the PIN code and set-up the network through PPP (FreeBSD 11.1)

Code: Select all

echo "Modeswitch"
usb_modeswitch -v 12d1 -p 1505 -J -W &
echo "Waiting" ; sleep 10
usbconfig -u 0 -a 2 reset &
sleep 30
echo 'AT+CPIN="0000"'  | minicom --device /dev/cuaU0.0 -b 115200 &
sleep 5
service ppp onestart my_ppp_config &
sleep 2
echo "We make a query to force ppp to dial"
dig kernel.org &

Post Reply