Author Message

<  Setup Discussion  ~  Confirm E3131 modeswitch to CDC mode?

PostPosted: Sun Feb 10, 2013 2:35 pm Reply with quote
Posts: 7Joined: Sat Feb 09, 2013 6:17 pm
In to other word, I can not even switch to initial mode using usb_modeswitch?
Ok, I will try to reset using AT commands


Offline Profile
PostPosted: Sun Feb 10, 2013 2:41 pm Reply with quote
Posts: 1156Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
ursus wrote:
In to other word, I can not even switch to initial mode using usb_modeswitch?
Ok, I will try to reset using AT commands


usb_modeswitch is made for switching from default mode (install mode) to target mode and not the other way around.
It is unusual that a stick doesn't return to default mode when re-plugging it, I have only seen that before when a user has disabled the cd-rom with AT^UDIAG commands. No cd-rom - no default mode.


Offline Profile
PostPosted: Sun Feb 10, 2013 3:22 pm Reply with quote
Posts: 7Joined: Sat Feb 09, 2013 6:17 pm
Bingo!

I couldn't imagine that modes could be switchable using AT commands.
I dosvered that HiLink mode can be switched to serial, using http://192.168.1.1/html/switchProjectMode.html
from this blog http://blog.phoenixhaven.net/category/haxx/
But I couldn't understand why there was reference to 12d1 1c05 so I decided it is related to some other revision of E3131

now as @LOM suggested I tried AT command
and used AT^U2DIAG=0
now my E3131 is always in 12d1 1c05 mode

Here is a list of other Huawei modes:
AT^U2DIAG=0 Modem Mode
AT^U2DIAG=1 Modem and CD-Rom Mode
AT^U2DIAG=255 Modem+CD-Rom+Card-Reader Modem+ Factory Defaults Setting
AT^U2DIAG=256 Modem+Card-Reader Mode
AT^U2DIAG=257 Disable Application Port
AT^U2DIAG=276 Reset to factory Defaults

AT^U2DIAG=119 to return to HiLink mode


Offline Profile
PostPosted: Mon Feb 11, 2013 12:14 am Reply with quote
Posts: 6Joined: Mon Jan 07, 2013 1:46 pm
ursus, I tried the same command it works with me also and I have now Product ID 1c05.

Now the conclusion is that I have tree different ways to switch the usb modem to serial port each one has different target Product ID

12d1:1001 (using MessageContent 55534243123456780000000000000011060000000000000000000000000000)
12d1:1442 (Using http://192.168.1.1/html/switchProjectMode.html)
12d1:1c05 (Using At Cmd AT^U2DIAG=0)

If as LOM said 1442 serial port interfaces are for maintenance and and diagnostics purpose.
Why their exist both 1001 and 1c05 ?
Why the modem didn't convert from cdc ethernet (12d1:1f01) to target (12d1:14db) when using MessageContent 55534243123456780000000000000011060000000000000000000000000000, as LOM said, but instead (12d1:1001) ?
What if switchProjectMode is not exists and I can't use command like AT^U2DIAG=0, how can I know that a specific MessageContent can be used to convert the modem to serial ports (if no way is known to let the windows driver to convert it manually to serial port mode), I mean is it just tring different MessageContent and see the result ?


Offline Profile
PostPosted: Mon Feb 11, 2013 11:45 am Reply with quote
Posts: 165Location: Oslo, NorwayJoined: Thu Mar 15, 2012 10:47 pm
Guest wrote:
ursus, I tried the same command it works with me also and I have now Product ID 1c05.

Now the conclusion is that I have tree different ways to switch the usb modem to serial port each one has different target Product ID

12d1:1001 (using MessageContent 55534243123456780000000000000011060000000000000000000000000000)
12d1:1442 (Using http://192.168.1.1/html/switchProjectMode.html)
12d1:1c05 (Using At Cmd AT^U2DIAG=0)

If as LOM said 1442 serial port interfaces are for maintenance and and diagnostics purpose.
Why their exist both 1001 and 1c05 ?
Why the modem didn't convert from cdc ethernet (12d1:1f01) to target (12d1:14db) when using MessageContent 55534243123456780000000000000011060000000000000000000000000000, as LOM said, but instead (12d1:1001) ?
What if switchProjectMode is not exists and I can't use command like AT^U2DIAG=0, how can I know that a specific MessageContent can be used to convert the modem to serial ports (if no way is known to let the windows driver to convert it manually to serial port mode), I mean is it just tring different MessageContent and see the result ?


I think you need to realize that the vendor never intended you to play with these commands at all. The only supported mode switching is the one done by the Windows software installed when the device is first plugged into a Windows machine. That is the only mode which is safe to use.

usb_modeswitch can be configured to send the exact same command the Windows software sends. This is safe, and allows the device to be used the same way in Linux as in Windows.

Any other mode is unsupported and can potentionally make your modem permanently unusable. The vendor may have implemented a number of different modes in addition to the supported mode. Which product IDs these use are completely up to the vendor to decide. But the fact that these modes exist does not mean that they are supposed to be used by any end user. Feel free to experiment, but be aware that some of the modes can be a dead end. Some of them are most likely only intended for firmware development or device testing. And there is no official documentation for any of this. If you get stuck, then you are on your own.


Offline Profile
PostPosted: Fri Jul 05, 2013 4:26 pm Reply with quote
Posts: 3Joined: Fri Jul 05, 2013 1:44 pm
Hi
I have a Huawei E3131 , and I want to unlock it, but the issue is that I don't know how to use and send a MessageContent like "55534243123456780000000000000011060000000000000000000000000000"

which switches some 12d1:1f01 versions into 12d1:14db with serial type interfaces.

knowing that I work under windows 7 !!


Offline Profile
PostPosted: Mon Jul 08, 2013 8:24 pm Reply with quote
Site AdminPosts: 6360Joined: Sat Nov 03, 2007 12:30 am
Did you have a look at the usb_modeswitch main page?


Offline Profile
PostPosted: Mon Jul 08, 2013 8:50 pm Reply with quote
Posts: 3Joined: Fri Jul 05, 2013 1:44 pm
Thanks for your reply, I have worked with it, but when I executed it, the system appears a message error that the System can't recognize the Dongle ! Unlock !


Offline Profile
PostPosted: Mon Jul 08, 2013 10:36 pm Reply with quote
Site AdminPosts: 6360Joined: Sat Nov 03, 2007 12:30 am
That is the whole point of mode switching. The "old" device is going away, and a new one appears.

Check the result with "lsusb", before and after.


Offline Profile
PostPosted: Tue Jul 09, 2013 10:17 am Reply with quote
Posts: 3Joined: Fri Jul 05, 2013 1:44 pm
thank you, can you please explain to me more, because I don't understand how can I work with it !


Offline Profile
PostPosted: Tue Jul 09, 2013 9:55 pm Reply with quote
Posts: 3Joined: Tue Jul 09, 2013 9:30 pm
Hi,

i'm also trying to switch a E3131 into a serial device with usb_modeswitch on a raspberry pi on wheezy. I need to do it without using the page http://192.168.1.1/html/switchProjectMode.html .

lsusb tells me: 12d1:1f01

If I visit the page on Windows, the devide is switchting to: 12d1:1442 with two unknown devices, I can't find any drivers to get a serial port under windows.

So i tried to use usb_modeswitch an the raspberry to get the two tty devices, for using at cmds:
usb_modeswitch -W -v 12d1 -p 1f01 -V 12d1 -P 1442 -M "55534243123456780000000000000011060000000000000000000000000000"

But this doesn't work:

Code:
Taking all parameters from the command line


 * usb_modeswitch: handle USB devices with multiple modes
 * Version 1.2.5 (C) Josua Dietze 2012
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x12d1
DefaultProduct= 0x1f01
TargetVendor=   0x12d1
TargetProduct=  0x1442
TargetClass=    not set
TargetProductList=""

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
QisdaMode=0
QuantaMode=0
GCTMode=0
KobilMode=0
SequansMode=0
MobileActionMode=0
CiscoMode=0
MessageEndpoint=  not set
MessageContent="55534243123456780000000000000011060000000000000000000000000000"
NeedResponse=0
ResponseEndpoint= not set

InquireDevice enabled (default)
Success check disabled
System integration mode disabled


usb_set_debug: Setting debugging level to 15 (on)
usb_os_find_busses: Found 001
usb_os_find_devices: Found 008 on 001
usb_os_find_devices: Found 005 on 001
usb_os_find_devices: Found 004 on 001
usb_os_find_devices: Found 003 on 001
usb_os_find_devices: Found 002 on 001
usb_os_find_devices: Found 001 on 001
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
error obtaining child information: Inappropriate ioctl for device
Looking for target devices ...
  searching devices, found USB ID 12d1:1f01
   found matching vendor ID
  searching devices, found USB ID 7392:7811
  searching devices, found USB ID 05e3:0608
  searching devices, found USB ID 0424:ec00
  searching devices, found USB ID 0424:9512
  searching devices, found USB ID 1d6b:0002
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 12d1:1f01
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 7392:7811
  searching devices, found USB ID 05e3:0608
  searching devices, found USB ID 0424:ec00
  searching devices, found USB ID 0424:9512
  searching devices, found USB ID 1d6b:0002
 Found device in default mode, class or configuration (1)
Accessing device 008 on bus 001 ...
Getting the current device configuration ...
 OK, got current device configuration (1)
Using interface number 0
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
USB error: could not get bound driver: No data available
 No driver found. Either detached before or never attached

SCSI inquiry data (for identification)
-------------------------
  Vendor String: HUAWEI
   Model String: Mass Storage
Revision String: 2.31
-------------------------

USB description data (for identification)
-------------------------
Manufacturer: HUAWEI
     Product: HUAWEI HiLink
  Serial No.: not provided
-------------------------
Setting up communication with interface 0
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 OK, message successfully sent
Resetting response endpoint 0x81
Resetting message endpoint 0x01
-> Run lsusb to note any changes. Bye.



I tried also many other combinations of target pids and meassage contents, without any changes.

Josh, can you help me, please? If necessary, i can send a E3131 device to you.

Best regards from Stuttgart
Dom


Offline Profile
PostPosted: Thu Jul 11, 2013 7:24 pm Reply with quote
Site AdminPosts: 6360Joined: Sat Nov 03, 2007 12:30 am
"Doesn't work" means that the USB ID does not change - did I get that right?


Offline Profile
PostPosted: Thu Jul 11, 2013 8:32 pm Reply with quote
Posts: 3Joined: Tue Jul 09, 2013 9:30 pm
Yes, no change of the PID.


Offline Profile
PostPosted: Fri Jul 12, 2013 12:03 am Reply with quote
Site AdminPosts: 6360Joined: Sat Nov 03, 2007 12:30 am
Hmm, if you are runing manually, there may be an improvement when adding the -I parameter.


Offline Profile
PostPosted: Fri Jul 12, 2013 10:35 pm Reply with quote
Posts: 3Joined: Tue Jul 09, 2013 9:30 pm
Thank you Josh! That's it!

This cmd switches the E3131 directly into modem mode:
Code:
usb_modeswitch -W -I -v 12d1 -p 1f01 -V 12d1 -P 1001 -M "55534243123456780000000000000011060000000000000000000000000000"


lsusb:
Code:
Bus 001 Device 008: ID 12d1:1001 Huawei Technologies Co., Ltd. E169/E620/E800 HSDPA Modem



UMTS connection works fine with wvdial.

/etc/wvdial.conf for Congstar / T-Mobile with public IP adress:
Code:
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2
Modem Type = Analog Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0


[Dialer umts]
Dial Command = ATD
Carrier Check = no
Phone = *99#
Username = internet
Password = t-d1
Stupid Mode = 1
Init4 = AT+CGDCONT=1,"IP","internet.t-d1.de"
Dial Attempts = 3


Then run wvdial
Code:
wvdial --config=/etc/wvdial.conf umts



Best regards
Dom


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 2 of 3
39 posts
Go to page Previous  1, 2, 3  Next
Users browsing this forum: Baidu [Spider] and 1 guest
Search for:
Post new topic  Reply to topic
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum