Mobile Action MA-8280P Linux / libusb "driver"

davy hollevoet

picture of cable

Story

Some time ago, I bought a "USB Data Cable" from Mobile Action to hook up my Samsung E250 to my computer. As suspected, it did not work out of the box on Linux, and there seemed to be no driver available anywhere.

It did however work well on Windows after installing the driver from Mobile Action. I noticed that when plugging in the device on a driverless box, a device identified as misc device

ID 0df7:0800 Mobile Action Technology, Inc. 

appears. After installing the driver from Mobile Action, this device disappears again, and an other device

ID 04e8:663e Samsung Electronics Co., Ltd

shows up. This new device is the modem of the cellphone. So it seemed that the Mobile Action driver only initialises the cable, and then passes control on to the phone itself.

Using a USB sniffer for Windows from Benoit Papillault, I captured the conversation between the Windows driver and the data cable. Then I stumbled upon the fine usbsnoop2libusb tool, which converts the output of USBSnoopy to a libusb program (I had to modify usbsnoop2libusb a bit to ignore URB_FUNCTION_GET_STATUS_FROM_ENDPOINT packets). To my surprise, it worked instantly.

Use when...

you have a Mobile Action MA-8280P USB Data Cable to connect your Samsung cellphone (list of supported models) to your computer. It works (for me (tm)) on Linux and OpenBSD, and I guess it should work on other BSDs and OSX as well (cf. below).

If you have a different type of cable, you can try the same trick with USBSnoopy and usbsnoop2libusb, it might work...

Files

ma8280p_us.c - This file is the output of usbsnoop2libusb. I cleaned it up a bit: removed some debug output etc.

One can compile this file with

gcc ma8280p_us.c -o ma8280p_us -lusb
As you can see, you need libusb-dev to compile the program. This is the only dependency, and thus I expect that it works on all platforms supported by libusb. I've successfully used it on Linux-2.6 and OpenBSD.

Demo

Plug in cable, phone attached to cable

tarzig:~# lsusb
...
Bus 002 Device 003: ID 0df7:0800 Mobile Action Technology, Inc. 
...

The data cable device appears on the host sytem.

Execute ma8280p_us as root (doesn't work as regular user on most configurations)

tarzig:~# ./ma8280p_us

The program takes a second or so to run, and short after that, a new device appears: the cellphone itself, which is a standard ACM device or a mass storage device, depending on the configuration of the phone.

tarzig:~# lsusb
...
Bus 002 Device 004: ID 04e8:663e Samsung Electronics Co., Ltd 
...

Dmesg shows this:

usb 2-1: new low speed USB device using uhci_hcd and address 4  # Cable connect to computer
usb 2-1: configuration #1 chosen from 1 choice                  #

usb 2-1: USB disconnect, address 4				# After running ma8280p_us, the 
usb 2-1: new full speed USB device using uhci_hcd and address 5 # cable device disappears, and a new 
usb 2-1: configuration #2 chosen from 1 choice			# device pops up, which is recognised 
cdc_acm 2-1:2.1: ttyACM0: USB ACM device			# as ACM modem.

usb 2-1: USB disconnect, address 5				# The cellphone is configured for mass
usb 2-1: new full speed USB device using uhci_hcd and address 6 # storage. The modem disappears and
usb 2-1: configuration #3 chosen from 1 choice			# a mass storage device is registered
scsi1 : SCSI emulation for USB Mass Storage devices		#
...

Further development

It would be nice to see a real driver for this USB cable, something kernelspace that really interacts with the device, interprets errorcodes etc. But I know nothing about USB drivers, so I'm not up to that challenge. It works for me, with good reliability, so it is good enough for me. I don't have plans to develop this further.

Also, a nice hotplug script or something like that would be nice

Still, if you have questions about it, you can reach me with my full name on the domain of natox dot be.

-06/01/2008 Added result on OpenBSD
-25/12/2007 First version