10.1 USB OTG accessories with 7? sorta.. but need help

rustyshack3

Senior Member
May 31, 2011
98
9
0
I am playing around with the Samsung 30-pin to USB female adapter and the 30-pin to SDHC adapter that my friend bought for her 10.1.

When I plug either of them in, dmesg indicates that an accessory-unknown is connected and online. When I unplug it, dmesg says accessory-unknown is offline.

Now I know from experience in the past with using cell phones as modems back in the good ol' days when there was no such support for Linux, I was able to instantiate the device using some sort of ID and creating a /dev/something for it. Does anyone know about this kind of experimentation? I believe, if I can figure this out, I can make a script for mounting storage connected via these adapters (at least for rooted tabs).



Sent from my Galaxy Cubed tab using Tapatalk.
 
  • Like
Reactions: Lilien

rustyshack3

Senior Member
May 31, 2011
98
9
0
USB OTG actually goes way back. My old Eclair tablet supports it! I think even my Cupcake one before that did too. Just depends on how the kernel is compiled. I think I will try seeing how the dev gets set with the Samsung keyboard, and go from there.
 

rustyshack3

Senior Member
May 31, 2011
98
9
0
Here is a snippet from another forum that shows what I am looking for:

Code:
You can look up the specific attributes to match in “/sys/bus/scsi/devices/[devicenumber]/”
When I connect the adapter, dmesg says ... ACCESSORY_ID : ADC value = 2741.
I believe this is the "devicenumber" from above, but I can't find a file with that name anywhere in /sys/bus/*

Still digging. If anyone else wants to join me, this may help.
 

lardman

Senior Member
Oct 20, 2007
125
28
28
Bath
Have you plugged something into the female usb port to get that value?

The message in question comes from Kernel/drivers/misc/30pin_con.c

One interesting line or two in there is the following:

Code:
#ifdef CONFIG_USB_S3C_OTG_HOST
		// check USB OTG Host ADC range...
		if(adc_val > 2700 && adc_val < 2799) {
			s3c_usb_cable(USB_OTGHOST_ATTACHED);
		}
#endif
 

rustyshack3

Senior Member
May 31, 2011
98
9
0
Have you plugged something into the female usb port to get that value?

The message in question comes from Kernel/drivers/misc/30pin_con.c

One interesting line or two in there is the following:

Code:
#ifdef CONFIG_USB_S3C_OTG_HOST
		// check USB OTG Host ADC range...
		if(adc_val > 2700 && adc_val < 2799) {
			s3c_usb_cable(USB_OTGHOST_ATTACHED);
		}
#endif
Yeah, the value is different if it is just the adapter vs the adapter with a usb device. I have a usb to microSD that I am plugging into the 30-pin to usb adapter.