Activation Codes and Methods, Hardware Details, Sniffing
arro
Posts: 2
Joined: 06 Apr 2010, 09:17

ZTE k3765-z

Post by arro » 06 Apr 2010, 09:57

The key has Vodafone brand, not to confuse with huawei k3765 wich has the same look.

Image

After many days of tries I managed the key to work under openWRT r1873. This model has a strange behaviour, it start with 0x2000 PID that after the switch became 0x2002, the point is that there is also a microsd reader integrated wich present the same 0x2002 PID. The system find two 0x2002 devices and can not work properly. Here is the solution:

usb_modeswitch.conf

Code: Select all

########################################################
# ZTE K3765-Z
#

DefaultVendor=  0x19d2
DefaultProduct= 0x2000

TargetVendor=   0x19d2
TargetProduct=  0x2002

# only for reference and 0.x versions
MessageEndpoint=0x01

MessageContent="5553424308E0CC852400000080000C85000000240000000000000000000000"
commands to execute at startup

Code: Select all

usb_modeswitch &
sleep 2
usb_modeswitch -v 0x19d2 -p 0x2002 &
it needs two switching, from CD-ROM to SD-READER and from SD-READER to MODEM, the pause is necessary for the first switch to complete before executing the second switch.

Based on what I read on the internet it seems that the key works well under generic linux distros for PCs but under openWRT this is not true anymore. Maybe someone who googled for this problem will reach this page.[/b]
Last edited by arro on 06 Apr 2010, 19:45, edited 1 time in total.

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

Post by Josh » 06 Apr 2010, 16:59

The ID points to a ZTE device. Did you try the MessageContent
"55534243123456782000000080000c85010101180101010101000000000000"
??

Your way of switching is strange; you don't seem to give any switching command, so usb_modeswitch will really do nothing at all ...


arro
Posts: 2
Joined: 06 Apr 2010, 09:17

Post by arro » 06 Apr 2010, 19:47

sorry I forgot to paste the messageendpoint and messagecontent part...updated in the first post
I don't know why, but this is what it needs to flip this little b....

pdc_2
Posts: 15
Joined: 09 Apr 2010, 22:46

Post by pdc_2 » 09 Apr 2010, 22:56

I have one of these (vodafone branded) devices; seems to me it is ZTE;

the lsusb gives me

19d2:2000

and then

19d2:0063 after flipping

I set up a udev rule that now flips it; (as another way to flip);
# gedit /etc/udev/rules.d/zte_eject.rules
SYSFS{idVendor}=="19d2", SYSFS{idProduct}=="2000", RUN+="/usr/bin/eject %k", OPTIONS+="last_rule"
Not every current distro can then dial up: I find fedora 12 works well;

I also note that lucid lynx liveCD (beta) seems to "flip" this device; (I know not how ..)

so dialup seems very easy now on lucid lynx with this device: insert; configure; connect;

interested to see comments about different target products to the one I have[/quote]

goodman
Posts: 2
Joined: 31 Jul 2010, 22:21

Post by goodman » 31 Jul 2010, 22:33

Hello,

Did anyone have success with the K3765-Z by using this guide? Unfortunately, when my device is plugged in, it already has the productID 2002, and does not accept any change message in this state. The MMC/SD-reader is identified but usb_modeswitch does not change its ID. Any clue??

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

Post by Josh » 01 Aug 2010, 00:35

If you get product ID 2002, your device was switched (by usb_modeswitch or an existing udev rule). You don't need to switch it again.

goodman
Posts: 2
Joined: 31 Jul 2010, 22:21

Post by goodman » 01 Aug 2010, 12:48

How is it possible that the device gets switched, but the serial device is not recognized? I have the usb-serial module loaded, do I have to load anything else? Shall I try to compile a newer kernel? I'm running on stock Debian Lenny kernel.

thx

Code: Select all

[    3.212035] usb 5-2: new high speed USB device using ehci_hcd and address 2
[    3.358376] usb 5-2: configuration #1 chosen from 1 choice
[    3.364340] usb 5-2: New USB device found, idVendor=19d2, idProduct=2002
[    3.364343] usb 5-2: New USB device strings: Mfr=4, Product=3, SerialNumber=5
[    3.364346] usb 5-2: Product: Vodafone Mobile Broadband K3765-Z
[    3.364349] usb 5-2: Manufacturer: Vodafone (ZTE)
[    3.364351] usb 5-2: SerialNumber: P673A1VDF_MS
[    3.461565] Initializing USB Mass Storage driver...
[    3.461687] scsi0 : SCSI emulation for USB Mass Storage devices
[    3.461791] usbcore: registered new interface driver usb-storage
[    3.461794] USB Mass Storage support registered.
[    3.463139] usb-storage: device found at 2
[    3.463142] usb-storage: waiting for device to settle before scanning
Update: I compiled a vanilla 2.6.34.1 kernel, and now I can dial out via the ttyUSB3 interface. Thanks for turning the light on! :)

Pocio
Posts: 2
Joined: 06 Aug 2010, 16:24

Post by Pocio » 06 Aug 2010, 16:30

Hi my friends...I ask for your help!
I have a vodafone k 3765-z, the same of the pic in the first post.
I try to get it works on Ubuntu 10.04 Lucid Lynx, but network manager doesn't recognise it!
lsusb gives me 19d2:2002
How can i solve? Thaks a lot and sorry for my bad English!

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

Post by Josh » 10 Aug 2010, 15:30

Well, Pocio, what exactly did you try so far?
Did you install the usb-modeswitch and usb-modeswitch-data packages?

Pocio
Posts: 2
Joined: 06 Aug 2010, 16:24

Post by Pocio » 10 Aug 2010, 15:39

Yes, of course!

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

Post by Josh » 10 Aug 2010, 16:28

Then be so kind and post the output of the "dmesg" command after plugging the modem in and waiting a while (around 8-10 seconds). Only the last 20 lines or so.

pierlau38
Posts: 16
Joined: 10 Aug 2010, 23:03

ZTE K3565 on eeepc 701

Post by pierlau38 » 10 Aug 2010, 23:25

Hello,

I have a ZTE K-3565 (from SFR-France) which also have a microSD slot.
I have tested quite a lot of thing found around but until now nothing have work.

I provide the informations I have...

The pc I would like to use it is an eeepc 701 under xandros kernel rev 2.6.21.4.

When I plugg the device, it flashes red and then bleu or red according to the network visible i suppose.
and many windows open to ask if I want to open an filemanager window on which I select "cancel" button

Code: Select all

 >lsusb 
Bus 002 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 005 Device 006: ID 19d2:2000  
Bus 005 Device 003: ID 0951:1606 Kingston Technology 
Bus 005 Device 001: ID 0000:0000  
Bus 004 Device 001: ID 0000:0000 


You recognise it : 19d2:2000 ! Strange thing : no name of vendor appear here....

Code: Select all

>dmesg
[ 3231.410000] usb 5-2: new high speed USB device using ehci_hcd and address 6
[ 3231.570000] usb 5-2: configuration #1 chosen from 1 choice
[ 3231.570000] scsi5 : SCSI emulation for USB Mass Storage devices
[ 3231.570000] usb-storage: device found at 6
[ 3231.570000] usb-storage: waiting for device to settle before scanning
[ 3236.570000] scsi 5:0:0:0: CD-ROM            ZTE      USB SCSI CD-ROM  2.31 PQ: 0 ANSI: 0
[ 3236.600000] sr0: scsi3-mmc drive: 0x/52x cd/rw xa/form2 cdda tray
[ 3236.600000] sr 5:0:0:0: Attached scsi CD-ROM sr0
[ 3236.600000] sr 5:0:0:0: Attached scsi generic sg2 type 5
[ 3236.620000] usb-storage: device scan complete
[ 3238.230000] sr0: CDROM not ready.  Make sure there is a disc in the drive.
[ 3239.550000] sr0: CDROM not ready.  Make sure there is a disc in the drive.
[ 3241.130000] sr0: CDROM not ready.  Make sure there is a disc in the drive.
[ 3242.780000] sr0: CDROM not ready.  Make sure there is a disc in the drive.
[ 3244.890000] sr0: CDROM not ready.  Make sure there is a disc in the drive.
[ 3246.590000] sr0: CDROM not ready.  Make sure there is a disc in the drive.

Then I have install usb_modeswitch but some difficulties with usb_modeswitch-data.deb which seems not to be installable.

I have the following .conf file

Code: Select all


EnableLogging=1
CheckSuccess=8
########################################################
# ZTE MF628 - modif PL K-3565
#
# Captured with "usbmon". Has a micro SD slot which can be
# activated alternatively
#
# Contributor: Alvaro Lopes <alvieboy at alvie dot com>

DefaultVendor=  0x19d2
DefaultProduct= 0x2000

# To modem mode:

TargetVendor=   0x19d2
TargetProduct=  0x0052

MessageEndpoint=0x01
MessageContent="55534243123456782000000080000c85010101180101010101000000000000"
;MessageContent="5553424312345678000000000000061b000000030000000000000000000000"

# To SD slot mode:

;TargetVendor=   0x05c6
;TargetProduct=  0x2001

;MessageEndpoint=0x08
;MessageContent="55534243123456782000000080000a86010101180101010101000000000000"

;ResponseEndpoint=7
which gives me in return the following log :


Notes that I have change the target product to 0x0052 because with the original (0x0013) I have an error -2 with usb_modeswitch but I have no idea about wich is the best one ?

Code: Select all

>sudo /usr/sbin/usb_modeswitch -c /etc/usb_modeswitch.conf

 * usb_modeswitch: tool for controlling "flip flop" mode USB devices
 * Version 0.9.7 (C) Josua Dietze 2009
 * Works with libusb 0.1.12 and probably other versions

Looking for target devices ...
 No devices in target mode or class found
Looking for default devices ...
 Found default devices (1)
Prepare switching, accessing device 006 on bus 005 ...
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0 ...
Trying to send the message to endpoint 0x01 ...
 Sending the message returned error -110. Trying to continue
Checking for mode switch after 8 seconds settling time ...
 Original device can still be accessed. Hmm.
 No new devices in target mode or class found

Mode switch seems to have failed. Bye!
and indeed nothing change in lsusb....


Other information : it happens sometimes that the devices is 19d2:0052 but I do not acheive to make it always, and even with this situation It is not possible to select it for building an network connection...

I wondering if you have any idea to solve this issue...

Regards

Pierre[/code]

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

Post by Josh » 11 Aug 2010, 08:37

@pierlau38:

The version of usb_modeswitch you are calling is very old (0.9.7). There was no separate "data" package with this version.
The current version is 1.1.3 and I would recommend to install it, even when the automatic switching might not work with your system. The included binary is a lot more reliable and has several new features which may be useful for getting your modem to work.


pierlau38
Posts: 16
Joined: 10 Aug 2010, 23:03

Post by pierlau38 » 11 Aug 2010, 10:23

Josh,

I have managed to install the latest version, and here are the results :

Code: Select all

>sudo /usr/sbin/usb_modeswitch -c /etc/usbmodeswitch.d/19d2_2000 -W

 * usb-modeswitch: handle USB devices with multiple modes
 * Version 1.1.3 (C) Josua Dietze 2010
 * Based on libusb0 (0.1.12 and above)

 ! PLEASE REPORT NEW CONFIGURATIONS !

DefaultVendor=  0x19d2
DefaultProduct= 0x2000
TargetVendor=   0x19d2
TargetProduct=  not set
TargetClass=    not set
TargetProductList="0001,0002,0015,0016,0017,0031,0037,0052,0055,0063,0064,0108,0128"

DetachStorageOnly=0
HuaweiMode=0
SierraMode=0
SonyMode=0
GCTMode=0
MessageEndpoint=  not set
MessageContent="5553424312345678000000000000061e000000000000000000000000000000"
MessageContent2="5553424312345679000000000000061b000000020000000000000000000000"
NeedResponse=1
ResponseEndpoint= not set
Interface=0x00

InquireDevice enabled (default)
Success check enabled, max. wait time 20 seconds
System integration mode disabled


Looking for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 0930:6545
  searching devices, found USB ID 0951:1606
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
 No devices in target mode or class found
Looking for default devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
   found matching product ID
   adding device
  searching devices, found USB ID 0930:6545
  searching devices, found USB ID 0951:1606
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
 Found devices in default mode or class (1)
Accessing device 006 on bus 005 ...
Using endpoints 0x01 (out) and 0x81 (in)
Inquiring device details; driver will be detached ...
Looking for active driver ...
 No driver found. Either detached before or never attached
 Could not send INQUIRY message (error -2)

USB description data (for identification)
-------------------------
Manufacturer: 
     Product: 
  Serial No.: not provided
-------------------------
Looking for active driver ...
 No driver found. Either detached before or never attached
Setting up communication with interface 0 ...
Using endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
 Sending the message returned error -2. Trying to continue
Reading the response to the message (CSW) ...
 Response reading got error -2, can probably be ignored
 Device is gone, skipping any further commands

Checking for mode switch (max. 20 times, once per second) ...
 Original device is gone already, not checking
 Searching for target devices ...
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 19d2:2000
   found matching vendor ID
  searching devices, found USB ID 0930:6545
  searching devices, found USB ID 0951:1606
  searching devices, found USB ID 0000:0000
  searching devices, found USB ID 0000:0000
....

....

 No new devices in target mode or class found

Mode switch has failed. Bye.

What do you think is the best thing to do to solve this issue ?

Regards

Pierre[/code]

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

Post by Josh » 11 Aug 2010, 11:23

There is probably an interference with the automatic run of usb_modeswitch. Check your system log (/var/log/syslog) for any messages from usb_modeswitch at the end (right after plugging).


Post Reply