Author Message

<  Device Information  ~  New device TP-Link MA260

PostPosted: Fri Sep 05, 2014 4:28 am Reply with quote
Posts: 1108Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
mig wrote:
That's a jolly good question!

Unless dwc2 goes by the name "dwc_otg" in the logs, I'm using dwc_otg. How do I switch?


A quick google tells me that Debian jessie is based on the 3.16 kernel but not which minor version it is built from. I have the source for 3.16.1 where the old dwc_otg directory is gone and has been replaced by dwc2 so I guess your kernel is older.
The raspberry pi forum is probably a better source of info about the old drivers problems and in which prebuild kernel the new driver is available.
The old driver had many bugs, one of them being that it did not have enough resources to handle composite devices, ie devices with many interfaces, while it worked ok for devices with single interfaces like mouse, keyboard, storage.
It was also known to have problems with releasing a disappeared device and detecting a new appearing device which is what happens when mode switching a 3G dongle.


Offline Profile
PostPosted: Fri Sep 05, 2014 6:02 am Reply with quote
Posts: 5Location: Puteaux, FRJoined: Thu Sep 04, 2014 3:49 pm
Thanks LOM for this very detailed reply!
Actually I have a 3.12.26+ kernel. So I shall go to raspberry pi resources and forums to get a proper kernel.


Offline Profile
PostPosted: Sat Sep 06, 2014 8:46 am Reply with quote
Posts: 5Location: Puteaux, FRJoined: Thu Sep 04, 2014 3:49 pm
OK, now I'm a little confused.

LOM, you wrote some time ago (http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=2001) that dwc_otg got rewritten (at least fiq_fsm) and that it got rid of most of the issues, and I read elsewhere that dwc2 did not get enough testing in comparison.


Offline Profile
PostPosted: Sat Sep 06, 2014 1:55 pm Reply with quote
Posts: 1108Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
mig wrote:
OK, now I'm a little confused.

LOM, you wrote some time ago (http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=4&t=2001) that dwc_otg got rewritten (at least fiq_fsm) and that it got rid of most of the issues, and I read elsewhere that dwc2 did not get enough testing in comparison.


Yes rewritten/bug fixed and name changed to reflect that it is an ehci (USB 2.0) driver.
(There is also a dwc3 for Designware silicon supporting xhci, ie USB3.0).

dwc_otg is gone already in 3.14.4 , 3.13 is end-of-life, and 3.12 did not get dwc2 backported, so
you need at least a 3.14.4 kernel.
The dwc2 driver has seen some modifications between 3.14.4 and 3.16 but the major problems in the old driver was solved already in 3.14 from what I could see in the patch descriptions.
I don't have that hardware so I have not tested it, you have to do that yourself, you don't have any other choice than dwc2 in the future.


Offline Profile
PostPosted: Sat Sep 06, 2014 4:15 pm Reply with quote
Posts: 5Location: Puteaux, FRJoined: Thu Sep 04, 2014 3:49 pm
Thanks LOM.
In fact (I just realized) Raspbian (http://www.raspbian.org) is NOT Debian, although for the most part packages are built from the same source. But Raspbian kernel, even upcoming one (3.14.y) is based on dec_otg, and I'm not quite sure, after all the work they've done, that I'm going to port dwc2 or dwc3 bare hands :-). Sounds like people at Cambridge know their stuff better than I do!


Offline Profile
PostPosted: Wed Mar 11, 2015 12:59 pm Reply with quote
Posts: 7Joined: Fri May 13, 2011 3:51 pm
Hello
I'm following the steps with TP-Link MA206, but after running usb_modeswitch but /dev not listed any ttyUSB device

Thanks

The process:

usb_modeswitch configuration file:

#######################################################
# TP-Link MA260
#
# Contributor: Bjørn Mork

DefaultVendor= 0x2357
DefaultProduct=0xf000

TargetVendor= 0x2357
TargetProduct= 0x9000

CheckSuccess=20

MessageContent="5553424312345678000000000000061b000000020000000000000000000000"

***********************************
Before run usb_modeswitch

lsusb

Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0002
Bus 002 Device 002: ID 0424:2514
Bus 002 Device 003: ID 2357:f000

***********************************

./usb_modeswitch -c TpLink_MA260
Look for target devices ...
No devices in target mode or class found
Look for default devices ...
product ID matched
Found devices in default mode (1)
Access device 003 on bus 002
Current configuration number is 1
Use interface number 0
Use endpoints 0x01 (out) and 0x81 (in)

USB description data (for identification)
-------------------------
Manufacturer: TP-LINK, Incorporated
Product: TP-LINK HSPA+ Modem
Serial No.: 863745010870604
-------------------------
Looking for active driver ...
OK, driver detached
Set up interface 0
Use endpoint 0x01 for message sending ...
Trying to send message 1 to endpoint 0x01 ...
OK, message successfully sent
Reset response endpoint 0x81
Reset message endpoint 0x01
Could not reset endpoint (probably harmless): -99

Check for mode switch (max. 20 times, once per second) ...
Search for target devices ...
product ID matched

Found target device, open it
Found correct target device

Mode switch succeeded. Bye!

*******************************


After run usb_modeswitch

lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0002
Bus 002 Device 002: ID 0424:2514
Bus 002 Device 004: ID 2357:9000


Offline Profile
PostPosted: Wed Mar 11, 2015 2:28 pm Reply with quote
Posts: 1108Location: Koh Samui, THJoined: Wed Jul 11, 2012 3:14 pm
load the serial driver option.ko, if you still don't get any devices created then yours is very outdated and needs an update.


Offline Profile
PostPosted: Wed Mar 11, 2015 4:12 pm Reply with quote
Posts: 7Joined: Fri May 13, 2011 3:51 pm
Yes, I have loaded serial driver option but the kernel not supports TP-Link MA260. I will try to recompile de option.c
Thanks


Offline Profile
PostPosted: Wed Nov 08, 2017 10:15 pm Reply with quote
Posts: 3Joined: Wed Nov 08, 2017 9:11 pm
Hi Experts,

i have also the TP-Link MA260 device.

In "principle" it is running on an ipfire-Raspberry-system (latest core update 116).

In principle means, when i log on as root, call TWICE:

#usb_modeswitch -v 2357 -p f000 -W -c /usr/share/usb_modeswitch/2357:f000
#usb_modeswitch -v 2357 -p f000 -W -c /usr/share/usb_modeswitch/2357:f000

it switches to :9000 and it is working.

Bus 001 Device 007: ID 2357:9000

When i call the command above only once (which is also done while the boot process), the device is not switched and stays at :f000.

See some log's attached:
nach_boot.txt log in /var/log/usb_modeswitch_xxx after boot
eins.txt output after first command-line-call
zwei.txt output after second command-line-call

What can i do to switch the mode automatically after booting?

Thanks a lot,
Andi
Attachments:
zwei.txt [801 Bytes]
Downloaded 7 times

eins.txt [2.04 KiB]
Downloaded 5 times

nach_boot.txt [3.05 KiB]
Downloaded 5 times

Offline Profile
PostPosted: Wed Nov 08, 2017 11:16 pm Reply with quote
Site AdminPosts: 6279Joined: Sat Nov 03, 2007 12:30 am
Which version of usb_modeswitch are you using?


Offline Profile
PostPosted: Thu Nov 09, 2017 7:19 pm Reply with quote
Posts: 3Joined: Wed Nov 08, 2017 9:11 pm
The ipfire-image for arm5 brings usb_modeswitch version 2.4.0


Offline Profile
PostPosted: Thu Nov 09, 2017 9:22 pm Reply with quote
Site AdminPosts: 6279Joined: Sat Nov 03, 2007 12:30 am
Strange. The second call of usb_modeswitch does absolutely nothing except the same thing that lsusb does.

Edit: The second call also does find the MA260 in modem mode. Maybe you just have to wait a little more? Or you have a non-standard version of lsusb installed.


Offline Profile
PostPosted: Thu Nov 09, 2017 9:53 pm Reply with quote
Posts: 3Joined: Wed Nov 08, 2017 9:11 pm
oops... you're right... sorry for that!!!

I just have to wait about 10 seconds... i allways tried the lsusb directly after the first usb_modeswitch call.

Now i added my usb_modewitch command mentioned above (only once ;-) ) in my /etc/sysconfig/rc.local and ... voila ... it works!!!

After booting the device is switched.

Thank you so much for your support!!!

Andi


Offline Profile

Display posts from previous:  Sort by:

All times are UTC + 1 hour [ DST ]
Page 2 of 2
28 posts
Go to page Previous  1, 2
Users browsing this forum: No registered users 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