Activation Codes and Methods, Hardware Details, Sniffing
jackzy
Posts: 5
Joined: Wed Dec 07, 2011 9:23 am

ZTE MF652 HUSP+USB Modem

Post by jackzy » Tue Dec 13, 2011 4:23 am

ZTE MF652 HUSP+USB Modem:
default PID = 0x0146
default VID = 0x19d2

Target PID = 0x0142
Target VID = 0x19d2

I need to know MessageContent .
I have catch USB message with BusHound and USBsniff but no result.Who can give me some advice.

Thank you.

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Wed Dec 14, 2011 9:22 am

It is very likely that your device will work with one of the known switching commands.

Just try out the "MessageContent" from the existing ZTE configurations (the file names starting with "19d2:...").


jackzy
Posts: 5
Joined: Wed Dec 07, 2011 9:23 am

Post by jackzy » Thu Dec 15, 2011 5:36 am

Thank you Josh.
I also have try all the known MessageContent but no result.

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu Dec 15, 2011 9:02 am

Hmm. Can you post your SniffUSB log on "pastebin.com"?

jackzy
Posts: 5
Joined: Wed Dec 07, 2011 9:23 am

Post by jackzy » Tue Dec 20, 2011 5:25 am

Thanks.
Here is the sniffUSB logl.
http://pastebin.com/u9G0DktE

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Tue Dec 20, 2011 8:51 pm

URB 12 and 13 are quite strange. All other transmissions are common.

There is a good five seconds during which nothing happens. This would be unusual for a storage device; I suspect the initialization for the mode switch is happening ahead of that period.

As a first attempt, try this:
MessageContent="55534243688df0852400000080000685000000240000000000000000000000"


bjoern.hoefer
Posts: 10
Joined: Mon Jan 02, 2012 11:47 pm

Post by bjoern.hoefer » Thu Jan 05, 2012 5:33 pm

Working config for my MF652:

DefaultVendor= 0x19d2
DefaultProduct=0x1520

TargetVendor=0x19d2
TargetProduct=0x0142

MessageContent="5553424312345679000000000000061b000000020000000000000000000000"

NeedResponse=1

Tested on OpenWRT 10.03.1-RC6 Backfire on a Netgear WNDR-3700-100PES

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Thu Jan 05, 2012 7:40 pm

Cool !!

I was hoping your variant would be easier to handle ...

I'll add you as the contributor for this device.


bjoern.hoefer
Posts: 10
Joined: Mon Jan 02, 2012 11:47 pm

Post by bjoern.hoefer » Thu Jan 05, 2012 8:31 pm

proud to be mentioned as a contributor *g*

A much more better feeling than paying cash for software or ideas ;-)

And this with only 7 tries...

jackzy
Posts: 5
Joined: Wed Dec 07, 2011 9:23 am

Post by jackzy » Fri Jan 06, 2012 5:55 am

Thanks.
My MF652 default PID = 0x0146 not 0x1520 。
And if I use MessageContent="5553424312345679000000000000061b000000020000000000000000000000"
the TargetProduct will be 0x0143 not 0x0142.

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Fri Jan 06, 2012 2:21 pm

jackzy, according to your earlier post I thought you had no switching success with the known ZTE messages ?

bjoern.hoefer
Posts: 10
Joined: Mon Jan 02, 2012 11:47 pm

Post by bjoern.hoefer » Fri Jan 06, 2012 11:15 pm

My Stick maybe branded from my internet provider - drei.at (Hutchinson)

Maybe this is why i get a different IDs...

bjoern.hoefer
Posts: 10
Joined: Mon Jan 02, 2012 11:47 pm

Post by bjoern.hoefer » Sat Jan 07, 2012 2:00 am

Pretty strange behavoir here *g*

when i shut down the router, plug in the ZTE and then boot i'll get:

Code: Select all

Jan  6 22:17:11 OpenWrt user.notice kernel: scsi 0:0:0:0: CD-ROM            ZTE      Datacard CD-ROM  0001 PQ: 0 ANSI: 0
Jan  6 22:17:11 OpenWrt user.notice kernel: scsi 0:0:0:1: Direct-Access     ZTE      Storage          0001 PQ: 0 ANSI: 0
Jan  6 22:17:11 OpenWrt user.debug kernel: usb-storage: device scan complete
Jan  6 22:17:11 OpenWrt user.notice kernel: sd 0:0:0:1: [sda] Attached SCSI removable disk
Jan  6 22:17:12 OpenWrt authpriv.info dropbear[1015]: Child connection from 192.168.0.131:53799
Jan  6 22:17:13 OpenWrt user.notice usb-modeswitch: 1-0:1.0: Manufacturer=Linux_2.6.32.27_ehci_hcd Product=Atheros_AR71xx_built-in_EHCI_controller Serial=ar71xx-ehci
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.0: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.1: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.2: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.3: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.4: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.5: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.6: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB6
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.8: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB7
Jan  6 22:17:13 OpenWrt user.info kernel: option 1-1:1.9: GSM modem (1-port) converter detected
Jan  6 22:17:13 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB8
Jan  6 22:17:17 OpenWrt authpriv.notice dropbear[1015]: Password auth succeeded for 'root' from 192.168.0.131:53799
Jan  6 22:17:21 OpenWrt user.notice usb-modeswitch: 1-1:1.0: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:26 OpenWrt user.notice usb-modeswitch: 1-1:1.1: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:30 OpenWrt user.notice usb-modeswitch: 1-1:1.2: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:34 OpenWrt user.notice usb-modeswitch: 1-1:1.3: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:38 OpenWrt user.notice usb-modeswitch: 1-1:1.4: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:42 OpenWrt user.notice usb-modeswitch: 1-1:1.5: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:46 OpenWrt user.notice usb-modeswitch: 1-1:1.6: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:50 OpenWrt user.notice usb-modeswitch: 1-1:1.7: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:54 OpenWrt user.notice usb-modeswitch: 1-1:1.8: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:17:58 OpenWrt user.notice usb-modeswitch: 1-1:1.9: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:07 OpenWrt user.notice usb-modeswitch: 2-0:1.0: Manufacturer=Linux_2.6.32.27_ohci_hcd Product=Atheros_AR71xx_built-in_OHCI_controller Serial=ar71xx-ohci
Jan  6 22:18:11 OpenWrt user.notice usb-modeswitch: 1-0:1.0: Manufacturer=Linux_2.6.32.27_ehci_hcd Product=Atheros_AR71xx_built-in_EHCI_controller Serial=ar71xx-ehci
Jan  6 22:18:19 OpenWrt user.notice usb-modeswitch: 1-1:1.0: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:23 OpenWrt user.notice usb-modeswitch: 1-1:1.1: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:27 OpenWrt user.notice usb-modeswitch: 1-1:1.2: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:31 OpenWrt user.notice usb-modeswitch: 1-1:1.3: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:36 OpenWrt user.notice usb-modeswitch: 1-1:1.4: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:40 OpenWrt user.notice usb-modeswitch: 1-1:1.5: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:44 OpenWrt user.notice usb-modeswitch: 1-1:1.6: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:48 OpenWrt user.notice usb-modeswitch: 1-1:1.7: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:52 OpenWrt user.notice usb-modeswitch: 1-1:1.8: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:18:56 OpenWrt user.notice usb-modeswitch: 1-1:1.9: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:19:00 OpenWrt user.notice usb-modeswitch: 2-0:1.0: Manufacturer=Linux_2.6.32.27_ohci_hcd Product=Atheros_AR71xx_built-in_OHCI_controller Serial=ar71xx-ohci
Jan  6 22:19:10 OpenWrt user.notice 3g-hotplug: Starting interface wan for device ttyUSB2
Jan  6 22:19:13 OpenWrt daemon.notice pppd[1847]: pppd 2.4.4 started by root, uid 0
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: abort on (BUSY)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: abort on (NO CARRIER)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: abort on (ERROR)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: report (CONNECT)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: timeout set to 10 seconds
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: send (AT&F^M)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: expect (OK)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: AT&F^M^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: OK
Jan  6 22:19:14 OpenWrt local2.info chat[1852]:  -- got it
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: send (ATE1^M)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: expect (OK)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: ^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: ATE1^M^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: OK
Jan  6 22:19:14 OpenWrt local2.info chat[1852]:  -- got it
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: send (AT+CGDCONT=1,"IP","drei.at"^M)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: timeout set to 30 seconds
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: expect (OK)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: ^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: AT+CGDCONT=1,"IP","drei.at"^M^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: OK
Jan  6 22:19:14 OpenWrt local2.info chat[1852]:  -- got it
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: send (ATD*99#^M)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: expect (CONNECT)
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: ^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: ATD*99#^M^M
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: CONNECT
Jan  6 22:19:14 OpenWrt local2.info chat[1852]:  -- got it
Jan  6 22:19:14 OpenWrt local2.info chat[1852]: send ( ^M)
Jan  6 22:19:14 OpenWrt daemon.info pppd[1847]: Serial connection established.
Jan  6 22:19:14 OpenWrt daemon.info pppd[1847]: Using interface 3g-wan
Jan  6 22:19:14 OpenWrt daemon.notice pppd[1847]: Connect: 3g-wan <--> /dev/ttyUSB2
Why is the modem switched twice?

And if I unplug the modem during runtime - it's getting stranger *g*

Code: Select all

Jan  6 22:19:56 OpenWrt user.notice kernel: scsi 1:0:0:0: CD-ROM            ZTE      Datacard CD-ROM  0001 PQ: 0 ANSI: 0
Jan  6 22:19:56 OpenWrt user.notice kernel: scsi 1:0:0:1: Direct-Access     ZTE      Storage          0001 PQ: 0 ANSI: 0
Jan  6 22:19:56 OpenWrt user.debug kernel: usb-storage: device scan complete
Jan  6 22:19:56 OpenWrt user.notice kernel: sd 1:0:0:1: [sda] Attached SCSI removable disk
Jan  6 22:20:40 OpenWrt user.notice usb-modeswitch: 1-1:1.0: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:20:40 OpenWrt user.notice usb-modeswitch: 1-1:1.0: Selecting /etc/usb_modeswitch.d/19d2:1520 for mode switching
Jan  6 22:20:40 OpenWrt user.warn kernel: usb 1-1: usbfs: process 2529 (usb_modeswitch) did not claim interface 0 before use
Jan  6 22:20:40 OpenWrt user.info kernel: usb 1-1: USB disconnect, address 3
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: new high speed USB device using ar71xx-ehci and address 4
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: configuration #1 chosen from 1 choice
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.0: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB0
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.1: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB1
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.2: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB2
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.3: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB3
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.4: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB4
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.5: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB5
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.6: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB6
Jan  6 22:20:48 OpenWrt user.info kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.8: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB7
Jan  6 22:20:48 OpenWrt user.info kernel: option 1-1:1.9: GSM modem (1-port) converter detected
Jan  6 22:20:48 OpenWrt user.info kernel: usb 1-1: GSM modem (1-port) converter now attached to ttyUSB8
Jan  6 22:20:48 OpenWrt user.debug kernel: usb-storage: device found at 4
Jan  6 22:20:48 OpenWrt user.debug kernel: usb-storage: waiting for device to settle before scanning
Jan  6 22:20:53 OpenWrt user.notice kernel: scsi 2:0:0:0: CD-ROM            ZTE      Datacard CD-ROM  0001 PQ: 0 ANSI: 0
Jan  6 22:20:53 OpenWrt user.notice kernel: scsi 2:0:0:1: Direct-Access     ZTE      Storage          0001 PQ: 0 ANSI: 0
Jan  6 22:20:53 OpenWrt user.debug kernel: usb-storage: device scan complete
Jan  6 22:20:53 OpenWrt user.notice kernel: sd 2:0:0:1: [sda] Attached SCSI removable disk
Jan  6 22:20:57 OpenWrt user.notice usb-modeswitch: 1-1:1.0: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:01 OpenWrt user.notice usb-modeswitch: 1-1:1.1: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:05 OpenWrt user.notice usb-modeswitch: 1-1:1.2: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:06 OpenWrt user.notice 3g-hotplug: Starting interface wan for device ttyUSB2
Jan  6 22:21:09 OpenWrt daemon.notice pppd[2772]: pppd 2.4.4 started by root, uid 0
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: abort on (BUSY)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: abort on (NO CARRIER)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: abort on (ERROR)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: report (CONNECT)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: timeout set to 10 seconds
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: send (AT&F^M)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: expect (OK)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: AT&F^M^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: OK
Jan  6 22:21:10 OpenWrt local2.info chat[2777]:  -- got it
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: send (ATE1^M)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: expect (OK)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: ^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: ATE1^M^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: OK
Jan  6 22:21:10 OpenWrt local2.info chat[2777]:  -- got it
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: send (AT+CGDCONT=1,"IP","drei.at"^M)
Jan  6 22:21:10 OpenWrt user.notice usb-modeswitch: 1-1:1.3: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: timeout set to 30 seconds
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: expect (OK)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: ^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: AT+CGDCONT=1,"IP","drei.at"^M^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: OK
Jan  6 22:21:10 OpenWrt local2.info chat[2777]:  -- got it
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: send (ATD*99#^M)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: expect (CONNECT)
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: ^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: ATD*99#^M^M
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: CONNECT
Jan  6 22:21:10 OpenWrt local2.info chat[2777]:  -- got it
Jan  6 22:21:10 OpenWrt local2.info chat[2777]: send ( ^M)
Jan  6 22:21:10 OpenWrt daemon.info pppd[2772]: Serial connection established.
Jan  6 22:21:10 OpenWrt daemon.info pppd[2772]: Using interface 3g-wan
Jan  6 22:21:10 OpenWrt daemon.notice pppd[2772]: Connect: 3g-wan <--> /dev/ttyUSB2
Jan  6 22:21:14 OpenWrt daemon.notice pppd[2772]: replacing old default route to br-lan [192.168.0.1]
Jan  6 22:21:14 OpenWrt daemon.notice pppd[2772]: local  IP address 77.118.245.139
Jan  6 22:21:14 OpenWrt daemon.notice pppd[2772]: remote IP address 10.0.0.1
Jan  6 22:21:14 OpenWrt daemon.notice pppd[2772]: primary   DNS address 213.94.78.16
Jan  6 22:21:14 OpenWrt daemon.notice pppd[2772]: secondary DNS address 213.94.78.17
Jan  6 22:21:14 OpenWrt user.notice usb-modeswitch: 1-1:1.4: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:14 OpenWrt user.notice ifup: Enabling Router Solicitations on wan (3g-wan)
Jan  6 22:21:15 OpenWrt user.info firewall: adding wan (3g-wan) to zone wan
Jan  6 22:21:18 OpenWrt user.notice usb-modeswitch: 1-1:1.5: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:23 OpenWrt user.notice usb-modeswitch: 1-1:1.6: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:27 OpenWrt user.notice usb-modeswitch: 1-1:1.7: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:31 OpenWrt user.notice usb-modeswitch: 1-1:1.8: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:21:35 OpenWrt user.notice usb-modeswitch: 1-1:1.9: Manufacturer=ZTE Product=MF652 Serial=85D74A83752591AE6BDA8729E7D6D1586D5F21F9
Jan  6 22:22:46 OpenWrt daemon.warn dnsmasq[997]: failed to access /tmp/resolv.conf.auto: No such file or directory
Jan  6 22:22:46 OpenWrt user.info firewall: removing lan (br-lan) from zone lan
Jan  6 22:22:47 OpenWrt user.info kernel: br-lan: port 1(eth0.1) entering disabled state
Jan  6 22:22:47 OpenWrt user.info kernel: device eth0 left promiscuous mode
Jan  6 22:22:47 OpenWrt user.info kernel: device eth0.1 left promiscuous mode
Jan  6 22:22:47 OpenWrt user.info kernel: br-lan: port 1(eth0.1) entering disabled state
Jan  6 22:22:47 OpenWrt daemon.info pppd[2772]: Terminating on signal 15
Jan  6 22:22:47 OpenWrt daemon.info pppd[2772]: Connect time 1.6 minutes.
Jan  6 22:22:47 OpenWrt daemon.info pppd[2772]: Sent 0 bytes, received 0 bytes.
Jan  6 22:22:47 OpenWrt daemon.notice pppd[2772]: restoring old default route to br-lan [192.168.0.1]
Jan  6 22:22:47 OpenWrt daemon.err pppd[2772]: restore default route ioctl(SIOCADDRT): No such device
Jan  6 22:22:47 OpenWrt daemon.notice pppd[2772]: Connection terminated.
Jan  6 22:22:47 OpenWrt user.info firewall: removing wan (3g-wan) from zone wan
Jan  6 22:22:48 OpenWrt daemon.info pppd[2772]: Exit.
Jan  6 22:22:49 OpenWrt user.notice ifup: Enabling Router Solicitations on loopback (lo)
Jan  6 22:22:49 OpenWrt user.info kernel: device eth0.1 entered promiscuous mode
Jan  6 22:22:49 OpenWrt user.info kernel: device eth0 entered promiscuous mode
Jan  6 22:22:49 OpenWrt user.info kernel: br-lan: port 1(eth0.1) entering forwarding state
Jan  6 22:22:50 OpenWrt user.notice ifup: Enabling Router Solicitations on lan (br-lan)
Jan  6 22:22:51 OpenWrt user.info firewall: adding lan (br-lan) to zone lan
Jan  6 22:22:51 OpenWrt daemon.notice pppd[4201]: pppd 2.4.4 started by root, uid 0
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: abort on (BUSY)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: abort on (NO CARRIER)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: abort on (ERROR)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: report (CONNECT)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: timeout set to 10 seconds
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: send (AT&F^M)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: expect (OK)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: AT&F^M^M
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: OK
Jan  6 22:22:52 OpenWrt local2.info chat[4344]:  -- got it
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: send (ATE1^M)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: expect (OK)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: ^M
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: ATE1^M^M
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: OK
Jan  6 22:22:52 OpenWrt local2.info chat[4344]:  -- got it
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: send (AT+CGDCONT=1,"IP","drei.at"^M)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: timeout set to 30 seconds
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: expect (OK)
Jan  6 22:22:52 OpenWrt local2.info chat[4344]: ^M
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: AT+CGDCONT=1,"IP","drei.at"^M^M
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: OK
Jan  6 22:22:53 OpenWrt local2.info chat[4344]:  -- got it
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: send (ATD*99#^M)
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: expect (CONNECT)
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: ^M
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: ATD*99#^M^M
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: CONNECT
Jan  6 22:22:53 OpenWrt local2.info chat[4344]:  -- got it
Jan  6 22:22:53 OpenWrt local2.info chat[4344]: send ( ^M)
Jan  6 22:22:53 OpenWrt daemon.info pppd[4201]: Serial connection established.
Jan  6 22:22:53 OpenWrt daemon.info pppd[4201]: Using interface 3g-wan
Jan  6 22:22:53 OpenWrt daemon.notice pppd[4201]: Connect: 3g-wan <--> /dev/ttyUSB2

As far as I understand it - while the switchmode is running, he starts connecting - then continues switching - disconnects and reconnects.

I really don't got a problem with that - the dial-in time after reboot and repluging the modem is about 45sec. to 1 min. which is the same time which my MBRN3000 needed...

Could this behavior be an openwrt-issue?

Config in /etc/usb-modeswitch/

Code: Select all

# ZTE MF 652
DefaultVendor= 0x19d2
DefaultProduct=0x1520

TargetVendor=0x19d2
TargetProduct=0x0142

MessageContent="5553424312345679000000000000061b000000020000000000000000000000"

NeedResponse=1
Used the same "optimizations" like in my DWL-156 example...

/etc/hotplug.d/usb/20-modeswitch

Code: Select all

#!/bin/sh

local uVid uPid uMa uPr uSe
local sVe sMo sRe

local modeswitch="/usr/bin/usb_modeswitch"


log() {
        logger -t "usb-modeswitch" "$@"
}

sleep 4

sanitize() {
        sed -e 's/[[:space:]]\+$//; s/[[:space:]]\+/_/g' "$@"
}

.... AND SO ON ....

Code: Select all

... LAST LINE OF SCRIPT ....
echo "19d2 1522" > /sys/bus/usb-serial/drivers/option1/new_id

Josh
Site Admin
Posts: 6533
Joined: Sat Nov 03, 2007 12:30 am

Post by Josh » Sat Jan 07, 2012 10:01 am

This does not seem to be right:

Code: Select all

Jan  6 22:17:13 OpenWrt user.notice usb-modeswitch: 1-0:1.0: Manufacturer=Linux_2.6.32.27_ehci_hcd Product=Atheros_AR71xx_built-in_EHCI_controller Serial=ar71xx-ehci
It means that usb_modeswitch was run for the USB host.

That would be weird; but then I don't know how the OpenWRT hotplugging works. I suggest asking the development community of this system.


jow
Posts: 1
Joined: Sat Jan 07, 2012 4:04 pm
Contact:

Post by jow » Sat Jan 07, 2012 4:51 pm

Josh wrote:That would be weird; but then I don't know how the OpenWRT hotplugging works. I suggest asking the development community of this system.
Hi, the author of the modeswitch OpenWrt hotplug integration here.

We execute a custom usb_modeswitch hotplug script each time an usb device pops up. The logline pasted earlier does not imply that we actually run usb_modeswitch on it, just that our hotplug handler identified the printed information. If we actually invoke modeswitch, there'll be a line like "Selected config ... for modeswitch" later on. The logic for selecting the conf file has been reimplemented in ash using the upstream udev helper code as reference.

Post Reply