Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
linux usb driver?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1543

PostPosted: Sun Jul 31, 2016 9:05 am    Post subject: linux usb driver? Reply with quote

Looking for a linux usb driver for device 0e8d:2000

When I plug it in, this happens (which basically repeats ad infinitum):

Code:

Jul 31 05:22:36 system kernel: usb 1-1.5: new full-speed USB device number 4 using ehci-pci
Jul 31 05:22:36 system kernel: option 1-1.5:1.1: GSM modem (1-port) converter detected
Jul 31 05:22:36 system kernel: usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
Jul 31 05:22:41 system kernel: usb 1-1.5: USB disconnect, device number 4
Jul 31 05:22:41 system kernel: option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Jul 31 05:22:41 system kernel: option 1-1.5:1.1: device disconnected
Jul 31 05:22:43 system kernel: usb 1-1.5: new full-speed USB device number 5 using ehci-pci
Jul 31 05:22:43 system kernel: option 1-1.5:1.1: GSM modem (1-port) converter detected
Jul 31 05:22:43 system kernel: usb 1-1.5: GSM modem (1-port) converter now attached to ttyUSB0
Jul 31 05:22:48 system kernel: usb 1-1.5: USB disconnect, device number 5
Jul 31 05:22:48 system kernel: option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
Jul 31 05:22:48 system kernel: option 1-1.5:1.1: device disconnected


During a brief moment of connection, I managed to get (from lsusb -v):

Code:

Bus 001 Device 007: ID 0e8d:2000 MediaTek Inc. MT65xx Preloader
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x0e8d MediaTek Inc.
  idProduct          0x2000 MT65xx Preloader
  bcdDevice            1.00
  iManufacturer           1 MediaTek
  iProduct                2 MT65xx Preloader
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           70
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          3 USB CDC ACM for preloader
    bmAttributes         0xc0
      Self Powered
    MaxPower              500mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass        10 CDC Data
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              4 CDC ACM Data Interface
      Endpoint Descriptor:
        bLength                 8
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 8
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              5 CDC ACM Communication Interface
      CDC Header:
        bcdCDC               1.10
      CDC ACM:
        bmCapabilities       0x0f
          connection notifications
          sends break
          line coding and serial state
          get/set/clear comm features
      CDC Union:
        bMasterInterface        1
        bSlaveInterface         0
      CDC Call Management:
        bmCapabilities       0x03
          call management
          use DataInterface
        bDataInterface          0
      Endpoint Descriptor:
        bLength                 8
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              16
Device Status:     0x0001
  Self Powered


I have enabled the usual suspects in my .config (CONFIG_USB_SERIAL_OPTION, CONFIG_USB_ACM), but it had no effect. Is there any way to get this recognized under linux? Thank you in advance.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 31, 2016 9:25 am    Post subject: Reply with quote

curmudgeon,

Post the output of lsusb. I'm interested in the USB device tree.
A USB2 root hub can provide 500mA for all connected devices.
Your GSM Modem says
Quote:
MaxPower 500mA
so it needs to be an a USB bus on its own.
Try it in each USB port and look at lsusb.

A lot of these GSM modems are three devices in one. A CDROM, with the windows drivers, a USB stick, if you fit a microSD card and a GSM modem.
Is the device going away, in which case it may be power limiting, or becoming another device?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1543

PostPosted: Sun Jul 31, 2016 10:14 am    Post subject: Reply with quote

NeddySeagoon wrote:
Post the output of lsusb. I'm interested in the USB device tree.


Nothing there at the moment (I even have a ps/2 keyboard and ps/2 mouse on this machine):

Code:

Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


NeddySeagoon wrote:
A USB2 root hub can provide 500mA for all connected devices.
Your GSM Modem says
Quote:
MaxPower 500mA

so it needs to be an a USB bus on its own.
Try it in each USB port and look at lsusb.


I don't think this is a power problem.

NeddySeagoon wrote:
A lot of these GSM modems are three devices in one. A CDROM, with the windows drivers, a USB stick, if you fit a microSD card and a GSM modem.


I saw the virtual cdrom (when the device is powered on, I can set the connection protocol, but I am trying to connect when it is powered off so I can flash it). It strangely had only one file on it - a pdf of the 2007 specifications for micro USB cables.

NeddySeagoon wrote:
Is the device going away, in which case it may be power limiting, or becoming another device?


In the windoze world, there is something called a vcom usb driver.

I eventually got the kernel to see it as an ACM device, but I don't even know if that is what I want (and it still kept disconnecting after five seconds):

Code:

Jul 31 08:37:45 system kernel: usb 1-1.5: new high-speed USB device number 8 using ehci-pci
Jul 31 08:37:45 system kernel: cdc_acm 1-1.5:1.1: ttyACM0: USB ACM device
Jul 31 08:37:48 system kernel: usb 1-1.5: USB disconnect, device number 8
Jul 31 08:37:50 system kernel: usb 1-1.5: new high-speed USB device number 9 using ehci-pci
Jul 31 08:37:50 system kernel: cdc_acm 1-1.5:1.1: ttyACM0: USB ACM device
Jul 31 08:37:53 system kernel: usb 1-1.5: USB disconnect, device number 9
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sun Jul 31, 2016 11:12 am    Post subject: Reply with quote

Did you check it's not a feature from the phone?

If your provider disallow tethering or allow it on conditions, you plug the phone, device detect, device set, device disconnect as per your provider wish.
So it might not be your computer that disconnect the device, but the device that shut it off itself until the conditions to keep it enable are met.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 31, 2016 11:56 am    Post subject: Reply with quote

curmudgeon,

When its there, its a fake serial port of sorts.

Do you have two drivers fighting over the device?
Sometimes its /dev/ttyACM0, sometimes /dev/ttyUSB0 ...
Make both drivers as modules and make sure only one is loaded at a time.

What do you mean by 'flash it'?

My 3G modem appears as three different USB devices. The fake serial port is the modem.

krinn,

For the mobile carrier to determine that tethering is being attempted, a mobile link is required.
Its not got af far as attempting to dial yet.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1543

PostPosted: Sun Jul 31, 2016 12:40 pm    Post subject: Reply with quote

krinn wrote:
Did you check it's not a feature from the phone?

If your provider disallow tethering or allow it on conditions, you plug the phone, device detect, device set, device disconnect as per your provider wish.
So it might not be your computer that disconnect the device, but the device that shut it off itself until the conditions to keep it enable are met.


I don't think it has anything to do with that. I am trying to write to the device when it is POWERED OFF. I am following several tutorials (including one by the manufacturer of the device).

There is a linux flashing tool here (but it is worthless without the driver):

http://spflashtools.com/linux/sp-flash-tool-v5-1624-for-linux
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1543

PostPosted: Sun Jul 31, 2016 12:49 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Do you have two drivers fighting over the device?
Sometimes its /dev/ttyACM0, sometimes /dev/ttyUSB0 ...
Make both drivers as modules and make sure only one is loaded at a time.


I have (and have had "forever") CONFIG_USB_SERIAL_OPTION built into the kernel.
When that didn't work for this (just purchased) device, I tried adding CONFIG_USB_ACM as a module.
I don't know of any way of removing CONFIG_USB_SERIAL_OPTION without recompiling the kernel and rebooting (not something I can do right now).

NeddySeagoon wrote:
What do you mean by 'flash it'?


"Flash it" means update the firmware.

NeddySeagoon wrote:
My 3G modem appears as three different USB devices. The fake serial port is the modem.


I only see one device when it is powered on (and so far no devices when it is powered off :( ).
Back to top
View user's profile Send private message
krinn
Watchman
Watchman


Joined: 02 May 2003
Posts: 7071

PostPosted: Sun Jul 31, 2016 2:55 pm    Post subject: Reply with quote

The device might expose more than one device, but it might not expose them all at the same time ; did you check the device have a kind-off usb mode option?
Did you also try to see what it gave when using a livecd (livecd should lack acm and modem option, but have good chance to have mass storage feature)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43178
Location: 56N 3W

PostPosted: Sun Jul 31, 2016 3:03 pm    Post subject: Reply with quote

curmudgeon,

Googling tells that the right device is /dev/ttyACM0.
It appears that it may be a while before the device node appears when you connect the phone in off mode.
Wait for it to start charging, then look.

The phone appears to use an incomplete proprietary protocol, which generates a timeout if its not followed.
Be sure nothing probes /dev/ttyACM0, or it will timeout and go away.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1543

PostPosted: Sun Jul 31, 2016 9:15 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Googling tells that the right device is /dev/ttyACM0.


Is there some way of blocking a built in the kernel module? I guess if I am getting ACM0, it is picking up the right (or I should say best) driver.

NeddySeagoon wrote:
It appears that it may be a while before the device node appears when you connect the phone in off mode.
Wait for it to start charging, then look.


The tutorials all say connect with the battery removed (which yields what I got before). I did put the battery in (just to see what would happen), and got something different (but not helpful):

Code:

Jul 31 20:56:41 system kernel: usb 1-1.5: new high-speed USB device number 10 using ehci-pci
Jul 31 20:56:41 system kernel: usb-storage 1-1.5:1.0: USB Mass Storage device detected
Jul 31 20:56:41 system kernel: scsi host8: usb-storage 1-1.5:1.0
Jul 31 20:56:41 system kernel: cdc_acm 1-1.5:1.2: This device cannot do calls on its own. It is not a modem.
Jul 31 20:56:41 system kernel: cdc_acm 1-1.5:1.2: ttyACM0: USB ACM device
Jul 31 20:56:42 system kernel: scsi 8:0:0:0: Direct-Access     Linux    File-CD Gadget   0318 PQ: 0 ANSI: 2
Jul 31 20:56:42 system kernel: sd 8:0:0:0: Attached scsi generic sg4 type 0
Jul 31 20:56:42 system kernel: sd 8:0:0:0: [sdb] Attached SCSI removable disk


Then, attempting to run the flash program produced:

Code:

QThread::setPriority: Cannot set priority, thread is not running
"06-30-2016"
QObject::moveToThread: Cannot move objects with a parent
Connecting to BROM...
Scanning USB port...
Search usb, timeout set as 3600000 ms
SearchUSBPortPool failed!
Failed to find USB port
Connect BROM failed: S_TIMEOUT

[eventually gave up here]

Disconnect!
User stopped.
comboTimeout index(3) saved.


NeddySeagoon wrote:
The phone appears to use an incomplete proprietary protocol, which generates a timeout if its not followed.
Be sure nothing probes /dev/ttyACM0, or it will timeout and go away.


Can't think of anything that would be probing that. Aside from the fact that I don't have access to a windoze machine, all of the drivers seem to come from dubious sources - some of them are very small (about 5kb), and some are over 5mb. Would much rather be doing this with something known.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
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 vote in polls in this forum