Author Message

<  Everything Coding  ~  Patch for supporting Samsung Android USB Modem / here: SGS3

PostPosted: Wed Feb 19, 2014 1:29 pm Reply with quote
Posts: 2 Joined: Wed Feb 19, 2014 1:06 pm

as I had severe issues getting the Samsung Android Modem (/dev/ttyACM0) on the Samsung Galaxy S3 GT-I9300 running, here is why :

Loading the device in linux, it normally defaults to configuration 0 or 1, which will
only support mtp configuration, but not cdc_acm support. This needs switching to configuration 2.

I tried with usb_modeswitch -v04e8 -p6860 -u2 which obviously failed saying that the default configuration is already selected, which confused me a bit. After debugging the source code, I was quickly able to detect what's wrong : the current configuration is detected as 2, although 0/1 is active in fact. I needed to patch the wrong configuration detection in order to enable switching, see attached file
File comment: Patch for usb_modeswitch.c
patch.txt [1.1 KiB]
Downloaded 497 times

, to be patched against the version 2.1.0.

After that, the rest was easy :
first adding the following config to /etc/usb_modeswitch.d/04e8:6860 :

DefaultVendor=  0x04e8
DefaultProduct= 0x6860

TargetVendor=   0x04e8
TargetProduct=  0x6860


and adding the following line to /lib/udev/rules.d/40-usb_modeswitch.rules :

# Samsung Android
ATTRS{idVendor}=="04e8", ATTRS{idProduct}=="6860", RUN+="usb_modeswitch '%b/%k'"

After that, if not already running, do a modprobe cdc_acm and then plug the Samsung Android Device.

To test, use a terminal program of your choice, use as device /dev/ttyACM0 and send "AT+DEVCONFIG?", you should get some device information as answer. Kies protocol should then be also running fine as well.

Hope this will help all other as well struggeling with the modem.

PostPosted: Fri Feb 21, 2014 1:52 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
Thanks for the suggestion!

Funny thing is that I'm working on a new release which has the whole configuration query replaced by "libusb_get_configuration". The old function is a left-over from the libusb0 dependency.

The new function is much better as it does not need to ask the device - the value is stored in the device structure already.

PostPosted: Fri Feb 21, 2014 10:34 pm Reply with quote
Posts: 2 Joined: Wed Feb 19, 2014 1:06 pm
I will be happy to test, as I'm already actively using libusb1 :D


Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
3 posts
Users browsing this forum: No registered users and 1 guest
Search for:
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