G1 on linux gentoo - G1 General

Hi,all.
my system:
uname -a
Linux localhost 2.6.28-gentoo-r1
Click to expand...
Click to collapse
when my g-phone is connected
I get the message from dmesg
dmesg
[ 4648.550324] usb 2-6: New USB device found, idVendor=0bb4, idProduct=0c02
[ 4648.550326] usb 2-6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 4648.550328] usb 2-6: Product: Android Phone
[ 4648.550330] usb 2-6: Manufacturer: HTC
[ 4648.550331] usb 2-6: SerialNumber: HT848GZ72398
[ 4648.550336] hub 2-0:1.0: state 7 ports 10 chg 0000 evt 0040
Click to expand...
Click to collapse
then on g1 screen i choose "mount sd-card"
but KDE4.2.0 does not detect flash-card.
On windowsXP g1 as flashcard is working normally.
Ubuntu 8.04 \8.10 working norm too.
I think that the case in the kernel.
anyone can help with kernel .config?

You'd probably get better help on this from a Gentoo user forum, especially since you say it works fine under Kubuntu (as it does for me as well.)
I'd imagine it's a matter of hal configuration rather than the kernel. Search (on Google) for tips on enabling hal polling in Gentoo.

Do you have usb_storage loaded or enabled in your kernel? I don't see anything in your dmesg output about assigning your G1 to a device (/dev/sd#). Also - make sure you check the dmesg output AFTER you enable mounting the drive on the G1 - it won't present a USB storage device to gentoo until after this happens, so there might be additional output. If you do get additional output please post it here.
Do other USB drives work?
Try:
zcat /proc/config.gz | grep CONFIG_USB_STORAGE
If that doesn't work, try:
zcat /usr/src/linux/.config | grep CONFIG_USB_STORAGE
Make sure CONFIG_USB_STORAGE is set to "y" or "m". If not you'll need to rebuild your kernel. I'm sure a default kernel is going to include it - if you don't have it on then you most likely already know how to fix that.
I have to confess that I don't really use kde automounting much - I prefer the command line (especially since half the time I have more than one kde session open and I get all kinds of issues with dialog boxes opening up on a session I'm not looking at when I add a new device).

is hald service started?
Code:
/etc/init.d/hald status
if not, start it.
Code:
/etc/init.d/hald start
I have gentoo, and mounts fine (i use gnome).
For more help go to gentoo forums

rich0
zcat /proc/config.gz | grep CONFIG_USB_STORAGE
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
Click to expand...
Click to collapse
enlightener
/etc/init.d/hald status
* status: started
Click to expand...
Click to collapse
Do other USB drives work?
yes,it work for my psp and flash-disks

Related

USB Host mode on Defy

Has anyone tried Defy's USB Host mode?
Would like to attach USB devices onto Defy:
- USB keyboard / mouse
- USB disk drives
- Other types of USB 3G modems (like CDMA1x/EVDO)
- Arduino IO board
...
I haven't bought Defy yet, but want to do some pre-research before the purchase.
Could someone do me a favor to post the outputs of "dmesg" on Defy?
(Run dmesg command under the Linux console).
I expect to see something like:
Code:
...
OMAP3630 ES1.1
...
twl4030_usb twl4030_usb: Initialized TWL4030 USB module
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Sangoma WANPIPE r outer v1.1 (c) 1995-2000 Sangoma Technologies Inc.
Bluetooth: Core ver 2.15
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
musb_hdrc: version 6.0, musb-dma, otg (peripheral+host), debug=0
musb_hdrc: USB OTG mode controller at fa0ab000 using DMA, IRQ 92
...
I got above dmesg by Web searching for an OMAP3630 test board, not a Defy.
Just want to make sure Defy is equipped with USB OTG controller.
This function not supported in the kernel, so kernel we can not replace, because bootloader is locked.
_ReBoot_ said:
This function not supported in the kernel, so kernel we can not replace, because bootloader is locked.
Click to expand...
Click to collapse
Understood the bootloader is locked by Moto, and a kernel must be signed.
Instead of replacing kernel itself, can we just load new driver modules (*.ko via insmod command)?
Does Moto also prevent from loading customized driver modules?
Can someone help to get the outputs of "cat /proc/driver/musb_hdrc" ?
Something like:
Code:
#cat /proc/driver/musb_hdrc
Status: MHDRC, Mode=Peripheral (Power=60, DevCtl=80)
OTG state: b_idle; inactive
Options: musb-dma, otg (peripheral+host), debug=3 [eps=16]
Peripheral address: 30
Root port status: 00000000
Gadget driver: (none)
http://copytaste.com/e272
unrafa said:
http://copytaste.com/e272
Click to expand...
Click to collapse
unrafa, thanks a lot for your info.
One correction to my previous command line for current USB mode:
"cat /sys/devices/platform/musb_hdrc/mode"
Following dmesg of Defy shows the internal USB modem is attached to the USB Host for modem init. But later reset as b_peripheral:
Code:
<6>[ 8.118133] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
<4>[ 8.118347] IRQ 78/usbtll: IRQF_DISABLED is not guaranteed on shared IRQs
<6>[ 8.119018] ehci-omap ehci-omap.0: OMAP-EHCI Host Controller
<6>[ 8.119323] ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
<6>[ 8.119842] ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
<6>[ 8.134368] ehci-omap ehci-omap.0: USB 2.0 started, EHCI 1.00
<6>[ 8.135192] usb usb1: configuration #1 chosen from 1 choice
<6>[ 8.135650] hub 1-0:1.0: USB hub found
<6>[ 8.135833] hub 1-0:1.0: 3 ports detected
<6>[ 8.136688] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
<6>[ 8.137451] usbcore: registered new interface driver cdc_acm
<6>[ 8.137573] cdc_acm: v0.26:USB Abstract Control Model driver for USB modems and ISDN adapters
<6>[ 8.138244] usbcore: registered new interface driver usbserial
<6>[ 8.138366] usbserial: USB Serial Driver core
<6>[ 8.138641] USB Serial support registered for moto-modem
<6>[ 8.138946] usbcore: registered new interface driver moto-modem
<6>[ 8.139312] USB Serial support registered for QSC 6085 Modem Driver
<6>[ 8.139617] usbcore: registered new interface driver cdma-modem
...
<6>[ 80.229614] MUSB BUS RESET as b_peripheral
How about to use:
"echo b_host > /sys/devices/platform/musb_hdrc/mode"
to enable the Host mode again?
May run command "modinfo musb_hdrc" to get actual parameters we can use to enable the Host mode.
Something like "modprobe musb_hdrc mode_default=1".
$ cat /sys/devices/platform/musb_hdrc/mode
b_peripheral
# echo b_host > /sys/devices/platform/musb_hdrc/mode
# echo b_host > /sys/devices/platform/musb_hdrc/mode
# cat /sys/devices/platform/musb_hdrc/mode
b_peripheral
# ls
uevent
modalias
subsystem
power
driver
gadget
mode
vbus
srp
# cat power
power: invalid length
# ls
uevent
modalias
subsystem
power
driver
gadget
mode
vbus
srp
# cat mode
b_peripheral
# cat vbus
Vbus off, timeout 0 msec
# cat srp
srp: invalid length
# cat uevent
DRIVER=musb_hdrc
MODALIAS=platform:musb_hdrc
# cat modalias
platform:musb_hdrc
# cat subsystem
subsystem: invalid length
# modinfo musb_hdrc
modinfo: can't open '/lib/modules/2.6.32.9-ga649a2e/modules.dep': No such file or directory
# modprobe musb_hdrc
modprobe: chdir(/lib/modules): No such file or directory
by the way /lib/modules doesnt exist, there are 20 modules in /system/lib/modules
and no musb_hdrc module there
Inside android's menu if i change "motorola Phone portal" to "USB mass storage" dmesg got this
<3>[12344.262695] do_cmd_proc_msg: Acquisition cycle length overflow
<6>[12345.158843] musb_pullup - Disabling USB Pullups
<6>[12345.159606] usbnet_disable
<7>[12345.159881] mtp_function_disable(): disabled
<6>[12345.161651] adb_release
<6>[12345.163146] adb_open
<6>[12345.165618] Sending USBLAN disabled uevent
<6>[12345.279876] musb_pullup - Enabling USB Pullups
<6>[12345.389068] device_mode_change_write - Successfully enabled function - msc_adb
<6>[12345.594573] MUSB BUS RESET as b_peripheral
<6>[12345.674407] MUSB BUS RESET as b_peripheral
<6>[12345.705291] android_usb gadget: high speed config #1: android
<4>[12349.139770] mmc0: Starting deferred resume
<4>[12349.511322] mmc0: Deferred resume completed
/sys/module/musb_hdrc/parameters/debug exists. no more than that file
Would it be possible to connect an external hard disk to this phone?
MAPGPS said:
Does Moto also prevent from loading customized driver modules?
Click to expand...
Click to collapse
No, we really can load own driver modules....
sent from my moto defy with taptalk
It would be very great if this will work.
Is there any progress?
yeah, be nice to connect 2 usb hosts so i can copy my slr pictures from a 32gb sd card over to a 320gb hdd.
I have usb y cables so i can power the hosts with an external usb charger.
Any news on this?
It will be nice to see an USB host patch/mod on Defy
hi
I've seen that some phones will enable host mode if you boot them with the data pins shorted, done with a "dongle". anyone tried this on the defy? I'll make one and try it if no one has.
Sent from my MB525 using Tapatalk
hmm.. is that safe? I dont want to burn my usb port..
I doubt it will damage anything. they won't be able to source enough current.
I've checked and the omap3610 supports usb otg. I will try to test this weekend.
Sent from my MB525 using Tapatalk
http://www.tombom.co.uk/blog/?p=124
that page shows the 'dongle' I mean.
Sent from my MB525 using Tapatalk
drmouse81 said:
hi
I've seen that some phones will enable host mode if you boot them with the data pins shorted, done with a "dongle". anyone tried this on the defy? I'll make one and try it if no one has.
Sent from my MB525 using Tapatalk
Click to expand...
Click to collapse
Scratch that, it is not the data pins, you connect the "extra" pin (pin 4) to ground.
Maybe 2nd ini make this able...
Guys, i saw something on Blog.Makezine.
http://androidcommunity.com/ioio-fo...mples-from-usb-breakout-board-video-20110408/
http://ytai-mer.blogspot.com/2011/04/meet-ioio-io-for-android.html
Maybe this could help, would love to be able to play video files from a external HDD. Watching movies on the backseat while we drive to our vacation!
maybe we need another kernel,i think

CyanogenMod9 and AOKP for TF101G (NEW BUILD)

Working now. Check my rom
You mean you want to try if you can activate the 3G module?
I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA
Nebucatnetzer said:
I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
You can also put "ls /dev" in Terminal Emulator and give me the output
Nebucatnetzer said:
I flashed it but it doesn't work. There isn't even the mobile data option. You know where you can change APNs etc.
I couldn't grab the adb output though. Adb doesn't see my TF I'll try again in the evening.
Sent from my Galaxy Nexus using XDA
Click to expand...
Click to collapse
1. Make sure you have usb debugging enabled on the transformer (this is often not the case on new installs)
2. try the naked drivers
Naked drivers: http://forum.xda-developers.com/showthread.php?t=1379875
You can also put "ls /dev" in Terminal Emulator and give me the output
Click to expand...
Click to collapse
Here you go.
Code:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ ls /dev
accelirq
alarm
android_adb
ashmem
asusec
battery
binder
block
bus
compassirq
console
cpu_dma_latency
cpuctl
device-mapper
dsp_fm34
full
fuse
graphics
i2c-0
i2c-1
i2c-2
i2c-3
i2c-4
input
kmsg
knvmap
lightsensor
log
maXTouch
maXTouch_messages
max_online_cpus
mem
mi1040
mpu
mpuirq
mtp_usb
nct1008
network_latency
network_throughput
null
nvhdcp1
nvhost-ctrl
nvhost-display
nvhost-dsi
nvhost-gr2d
nvhost-gr3d
nvhost-isp
nvhost-mpe
nvhost-vi
nvmap
ov5640
port
ppp
ptmx
pts
random
rfkill
rtc0
snd
socket
tegra-crypto
tegra_avp
tegra_camera
tegra_dc0
tegra_dc1
tegra_mediaserver
tegra_rpc
tegra_sema
timerirq
touch_debug
touchpanel
tps6586x
tty
ttyHS1
ttyHS2
ttyHS3
ttyS0
ttyS1
ttyS2
ttyS3
ttyUSB0
ttyUSB1
ttyUSB2
ttyUSB3
ttyUSB4
ttyUSB5
tun
uinput
urandom
usb
usb_accessory
vga_arbiter
wm8903
xt_qtaguid
zero
[email protected]:/ $
do you have a public source tree for your work ?
Nebucatnetzer said:
Here you go.
Code:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ ls /dev
accelirq
alarm
android_adb
ashmem
asusec
battery
binder
block
bus
compassirq
console
cpu_dma_latency
cpuctl
device-mapper
dsp_fm34
full
fuse
graphics
i2c-0
i2c-1
i2c-2
i2c-3
i2c-4
input
kmsg
knvmap
lightsensor
log
maXTouch
maXTouch_messages
max_online_cpus
mem
mi1040
mpu
mpuirq
mtp_usb
nct1008
network_latency
network_throughput
null
nvhdcp1
nvhost-ctrl
nvhost-display
nvhost-dsi
nvhost-gr2d
nvhost-gr3d
nvhost-isp
nvhost-mpe
nvhost-vi
nvmap
ov5640
port
ppp
ptmx
pts
random
rfkill
rtc0
snd
socket
tegra-crypto
tegra_avp
tegra_camera
tegra_dc0
tegra_dc1
tegra_mediaserver
tegra_rpc
tegra_sema
timerirq
touch_debug
touchpanel
tps6586x
tty
ttyHS1
ttyHS2
ttyHS3
ttyS0
ttyS1
ttyS2
ttyS3
ttyUSB0
ttyUSB1
ttyUSB2
ttyUSB3
ttyUSB4
ttyUSB5
tun
uinput
urandom
usb
usb_accessory
vga_arbiter
wm8903
xt_qtaguid
zero
[email protected]:/ $
Click to expand...
Click to collapse
Many thanks for that, now I can see kernel supports it, so it should be possible to integrate 3G
I'll fix the build later
Cool looking forward to this. Maybe it stops my TF from rebooting when it's unconnected to a power source.
Sent from my Galaxy Nexus using XDA
new build on the first post
still no public source ?
rhaaa said:
still no public source ?
Click to expand...
Click to collapse
I'll provide it when everything is working
It doesn't work. I can't save any APNs because there is no save button.
And if I want to choose the network operator it fails at the search.
Do you need any specific logs?
Nebucatnetzer said:
It doesn't work. I can't save any APNs because there is no save button.
And if I want to choose the network operator it fails at the search.
Do you need any specific logs?
Click to expand...
Click to collapse
A logcat would be nice, when you try to search for networks
ricardopvz said:
A logcat would be nice, when you try to search for networks
Click to expand...
Click to collapse
Et voilà
10 char

Connecting Android to a serial device using USB-Serial Converter

I am attempting to connect to a serial device from a Android tablet, via
USB-Serial Converter. In order to interface with this particular serial
device, a linux library must be used as an interface.
This library takes an integer as an argument, and tries to connect to the
device at the following location : /dev/ttySx, where x is the arguement. If
2 is provided to the library, it will look for the device at /dev/ttyS2.
Very simple.
When I connect the device to Ubuntu, there's is one simple extra step for
this device to work with the USB-Serial convert. The converter is exposed
at the location /dev/ttyUSB1. I just need to create a simple soft-link with
the serial port pattern (etc "ln -s /dev/ttyUSV1 /dev/ttyS99"). It works
perfectly.
Now the problem arises for Android. The converter is seen at
/dev/bus/usb/01/01. I never seen this convention in other project. The
question is how can I direct the I/O from /dev/ttySX to /dev/bus/usb/01/01
ehpaul said:
I am attempting to connect to a serial device from a Android tablet, via
USB-Serial Converter. In order to interface with this particular serial
device, a linux library must be used as an interface.
This library takes an integer as an argument, and tries to connect to the
device at the following location : /dev/ttySx, where x is the arguement. If
2 is provided to the library, it will look for the device at /dev/ttyS2.
Very simple.
When I connect the device to Ubuntu, there's is one simple extra step for
this device to work with the USB-Serial convert. The converter is exposed
at the location /dev/ttyUSB1. I just need to create a simple soft-link with
the serial port pattern (etc "ln -s /dev/ttyUSV1 /dev/ttyS99"). It works
perfectly.
Now the problem arises for Android. The converter is seen at
/dev/bus/usb/01/01. I never seen this convention in other project. The
question is how can I direct the I/O from /dev/ttySX to /dev/bus/usb/01/01
Click to expand...
Click to collapse
Which android device are you using and with which kernel and android build? In my case I am using kernel 3.0.+ with CM9 on a Kindle Fire and I do see the /dev/ttyUSBx getting created along with the /dev/bus/01/01. It has been a month since I tried it but I was able to see the problem you see and here is what I remember. When you plug the serial convertor both /dev get created but since the Android USB support only uses /dev/bus/usb/01/01, the kernel in order to save power "unmounts" the unused /dev/ttyUSBx after a certain time period. You can try using dmesg to see if that is happening in your case also. There is a kernel build flag that tells the kernel not to "unmount" it but I dont remember it off-hand. Best would be to use the Android USB support to talk to your device instead of the linux library if you can.
--------Update after testing it out again and checking dmesg etc---------------------------
When I plug the FTDI cable this is what shows up in dmesg:
<6>usb 1-1: new full speed USB device number 8 using musb-hdrc
<3>usb 1-1: device v0403 p6001 is not supported
<6>ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
<6>usb 1-1: Detected FT232RL
<6>usb 1-1: Number of endpoints 2
<6>usb 1-1: Endpoint 1 MaxPacketSize 64
<6>usb 1-1: Endpoint 2 MaxPacketSize 64
<6>usb 1-1: Setting MaxPacketSize 64
<6>usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
At this point if I check the filesystem I see both /dev/ttyUSB0 and /dev/bus/usb/001/0xx [ xx being the current device number ]
I can work with /dev/ttyUSB0 and all is well. Now as soon as I invoke any app that uses Android USB Host Mode API to connect
to USB (for enumeration, connection or whatever) the /dev/ttyUSB0 gets disconnected with following message from dmesg:
<6>ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
<6>ftdi_sio 1-1:1.0: device disconnected
At this point /dev/bus/usb/001/0xx is still alive and if I enumerate the USB devices using android API I see the same as the adaptor
name. So looks like till the Android USB API takes over the FTDI is available as /dev/ttyUSB0 but not afterwards.
------------------------Update ends--------------------------------
(a) If you see a /dev/ttyUSB1 device node created, then you can try the following in an Android terminal:
Code:
stty -F /dev/ttyUSB1 raw
cat /dev/ttyUSB1
If this shows data from your device, then you can use directly the device node to read()/write(), POSIX-style, without needing any library.
(b) If you cannot see a /dev/ttyUSB1 in your Android device, this means that you need to load the ftdi_sio kernel module (check android.serverbox.ch/?p=285 for instructions).
Let me link that for you:
"How to enable FTDI Support for your USB Host featuring Honeycomb Tablet (including sample native application)"
Also have a look at FTDI's Android Paper:
"White Paper: Connecting Peripherals to an Android Platform"
and this relevant blog, from this XDA thread.
pankaj013 said:
Which android device are you using and with which kernel and android build? In my case I am using kernel 3.0.+ with CM9 on a Kindle Fire and I do see the /dev/ttyUSBx getting created along with the /dev/bus/01/01. It has been a month since I tried it but I was able to see the problem you see and here is what I remember. When you plug the serial convertor both /dev get created but since the Android USB support only uses /dev/bus/usb/01/01, the kernel in order to save power "unmounts" the unused /dev/ttyUSBx after a certain time period. You can try using dmesg to see if that is happening in your case also. There is a kernel build flag that tells the kernel not to "unmount" it but I dont remember it off-hand. Best would be to use the Android USB support to talk to your device instead of the linux library if you can.
--------Update after testing it out again and checking dmesg etc---------------------------
When I plug the FTDI cable this is what shows up in dmesg:
<6>usb 1-1: new full speed USB device number 8 using musb-hdrc
<3>usb 1-1: device v0403 p6001 is not supported
<6>ftdi_sio 1-1:1.0: FTDI USB Serial Device converter detected
<6>usb 1-1: Detected FT232RL
<6>usb 1-1: Number of endpoints 2
<6>usb 1-1: Endpoint 1 MaxPacketSize 64
<6>usb 1-1: Endpoint 2 MaxPacketSize 64
<6>usb 1-1: Setting MaxPacketSize 64
<6>usb 1-1: FTDI USB Serial Device converter now attached to ttyUSB0
At this point if I check the filesystem I see both /dev/ttyUSB0 and /dev/bus/usb/001/0xx [ xx being the current device number ]
I can work with /dev/ttyUSB0 and all is well. Now as soon as I invoke any app that uses Android USB Host Mode API to connect
to USB (for enumeration, connection or whatever) the /dev/ttyUSB0 gets disconnected with following message from dmesg:
<6>ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
<6>ftdi_sio 1-1:1.0: device disconnected
At this point /dev/bus/usb/001/0xx is still alive and if I enumerate the USB devices using android API I see the same as the adaptor
name. So looks like till the Android USB API takes over the FTDI is available as /dev/ttyUSB0 but not afterwards.
------------------------Update ends--------------------------------
Click to expand...
Click to collapse
are you using ftdi's code to modify it?
change /system/etc/permissions
this is from a question on stackoverflow titled "Android USB host and hidden devices" (sorry, i can't add external URLs yet). it worked like a charm on a micromax A120 canvas 2 phone (kitkat 4.4.2). now i can control my Arduino! i used busybox tools to do all the command line work (otherwise chmod wouldn't work). my steps (perhaps some were not required):
(0) install PDAnet drivers on my Windows 8 computer.
(1) root the phone using Vroot (now called iRoot). Very simple, only catch is that the su grant/deny page is partly in chinese, no big deal.
(2) install busybox and jackpal's Android-Terminal-Emulator available on github and the google play store (free).
(3) open a terminal window and become the superuser:
# su
(4) the file system may be read-only, so you might have to remount it:
# mount -o rw,remount -t yaffs2 /
or
# mount -o rw,remount -t rootfs /
or
# mount -o rw,remount -t rootfs rootfs /system
(5) make default.prop read/write:
chmod 666 /default.prop
(6) edit /default.prop, make the following changes:
ro.secure=0
ro.debuggable=1
persist.service.adb.enable=1
... And this is the real meat of it:
(7) To enable USB host API support you should add a file named
android.hardware.usb.host.xml and containing the following lines:
<permissions>
<feature name="android.hardware.usb.host"/>
</permissions>
into folder
/system/etc/permissions
in that folder find file named
handheld_core_hardware.xml or tablet_core_hardware.xml
and add
<feature name="android.hardware.usb.host" />
into <permissions> section.
(8) Reboot your device. Usb host api should work.

[CM9.0.0][Siyah v4.1rc1+] Prolific/FTDI Serial Terminal HowTo

[CM9.0.0][Siyah v4.1rc1+] Prolific/FTDI Serial Terminal HowTo
Hi everybody out there!
I just finally managed to use my Galaxy S2 as a serial terminal for my newly bought cubox (google for solid-run)
and as I found very little information on how to achieve that, I thought about telling the word to other folks like me.
As I am definitely not experienced with compiling kernels and stuff, I used a precompiled kernel and rom:
Siyah Kernel: Siyah-s2-v4.1rc1-CWM.zip
Cyanogenmod: cm-9.0.0-galaxys2.zip
I also installed Busybox from BusyBox Pro by Stephen (Stericson) which contains the tool microcom
Now I use Irssi Connectbot, open a session and enter the following commands:
For becoming root: su
Needed first: insmod /lib/modules/usbserial.ko
If I want the Prolific Adapter: insmod /lib/modules/pl2303.ko
If I want the FTDI Adapter: insmod /lib/modules/ftdi_sio.ko
Now I check, if the modules have been loaded: lsmod
That gives me the following:
dhd 399255 0 - Live 0xbf04e000
ftdi_sio 27902 0 - Live 0xbf044000
pl2303 11895 0 - Live 0xbf03e000
usbserial 24441 2 ftdi_sio,pl2303, Live 0xbf034000
j4fs 68207 1 - Live 0xbf00a000 (P)
Si4709_driver 24227 0 - Live 0xbf000000
ftdi_sio ... Live ... <- FTDI Module loaded
pl2303 ... Live ... <- Prolific Module loaded
Now I plug my Usb2Microusb cable into my device and my OTG Adapter and finally into my Galaxy S2
Because me OTG Adapter was a very cheap one,
I need to check if it is actually connected:
dmesg | grep usb
...
<6>[53402.191025] usb 2-1: Manufacturer: Prolific Technology Inc.
<6>[53402.237498] usb 2-1: pl2303 converter now attached to ttyUSB0
I now have a ttyUSB0 in /dev , which I can use with microcom:
microcom -s 115200 /dev/ttyUSB0
et voilà, im using a serial terminal connection to my device.
When I'm finished, I close microcom with Ctrl-x.
( I actually need to push the onscreen Ctrl in Connectbot and then press x on my touchscreen keyboard)
Now I unplug the OTG Adapter and unload the loaded modules with rmmod:
rmod pl2303
rmmod ftdi_sio
rmmod usbserial
Thats all. No more Bulky Laptops for Serial connections in cramped places!
PS: Thats my 1st post on this site and about my 10th post in forums in my lifetime.
So yeah, Im a "noob" in forumposting and a not so perfect english speaker.
Please feel free to correct and guide me
Thanks for the post. You can also create a script for faster execution.
Does it necessary to unload the modules after use?
Sent from my GT-I9100 using xda app-developers app
What do I have to do to get this working on rooted Xperia Z? I do not see any /lib folder in root.

U8800 not detected by pc

Hello,
I have an issue with my U8800.
It is not detected by my PC (Windows 7 x64). When I say it is not detected, I mean nothing happens. Tried all USB ports. In fact, I have tried the phone on 6 diferent PCs (4 with windows 7 x64, 1 with windows 7 x86 and one with Vista x86). The best I could get was usb not recognized (but very quickly) in one of them (x64) but not replicated. It doesn't matter if you go to Pink Screen, with battery, without battery, with sd card or without, etc. Have tried forcing all kinds of drivers, without success. Android SDK is fully installed, etc.
I also tried using 2 diferent Linux live OS's. On one of them, I was able to mount the "CD - the one with the drivers", but again, only once.
I was using Aurora with latest update when this issue started. Never partitioned. I have downgraded to Rom 136. Tried B517 and B528. I'm only able to root the device using Z4root with froyo.
Tried 3 different cables and all of them work without any issues with a Galaxy S3 and a ZTE Racer.
The funny thing is that the U8800 is detected by my car audio system (it uses windows CE 5.0) and plays media files fine. Even the USB Debugging shows up. On another car, with a "usb radio" it also works.
The device itself charges fine in every usb port i have tried
Any help would be appreciated.
Thank you
Hi guys, just an update.
I forgot to mention that the device itself does nothing while connected to the pc. No USB mount or USB Debugging icons. Just the charging message and the lightning icon.
I have tried the device on 5 more PCs and 3 more cables. Not much luck. I did get a few odd behaviours.
This is what I have found out:
Windows 7
With the phone OFF:
If I just plug in the usb cable, it will turn on and after a few seconds, the battery image will appear. While doing that, by using UsbDview, I can see USB Mass Storage Device with the idVendor=12d1, idProduct=1037.
Windows displays "Unrecognized usb device" and a pop up says that windows was unable to find/install drivers for the "unkown device" (error 45 - device is not connected).
Phone turned ON:
If I turn the phone on, no error is displayed and no attempts to install drivers are made. Nothing happens.
Ubuntu (12.0x) - Using the same method with the phone turned OFF:
Dmesg displays:
usb 5-1: new full-speed USB device number 5 using uhci_hcd
hub 5-0:1.0: unable to enumerate USB device on port 5
If I insist, by removing the usb cable, a few times, I get this:
"usb 5-1: new full-speed USB device number 2 using uhci_hcd
[ 2463.956220] usb 5-1: device descriptor read/64, error -71
[ 2464.180120] usb 5-1: device descriptor read/64, error -71
[ 2464.396215] usb 5-1: new full-speed USB device number 3 using uhci_hcd
[ 2464.516211] usb 5-1: device descriptor read/64, error -71
[ 2464.740204] usb 5-1: device descriptor read/64, error -71
[ 2464.956203] usb 5-1: new full-speed USB device number 4 using uhci_hcd
[ 2465.372073] usb 5-1: device not accepting address 4, error -71
[ 2465.484242] usb 5-1: new full-speed USB device number 5 using uhci_hcd
[ 2465.900220] usb 5-1: device not accepting address 5, error -71
[ 2465.900263] hub 5-0:1.0: unable to enumerate USB device on port 1
[ 2467.624209] hub 2-0:1.0: unable to enumerate USB device on port 1
[ 2467.876222] usb 5-1: new full-speed USB device number 6 using uhci_hcd
[ 2468.019363] usb 5-1: not running at top speed; connect to a high speed hub
[ 2468.038249] usb 5-1: New USB device found, idVendor=12d1, idProduct=1037
[ 2468.038262] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2468.038270] usb 5-1: Product: Android Adapter
[ 2468.038276] usb 5-1: Manufacturer: Huawei Incorporated
[ 2468.038283] usb 5-1: SerialNumber: 20XXXXXXXXXX
[ 2468.130459] Initializing USB Mass Storage driver...
[ 2468.130622] scsi5 : usb-storage 5-1:1.0
[ 2468.130718] usbcore: registered new interface driver usb-storage
[ 2468.130720] USB Mass Storage support registered.
[ 2469.133463] scsi 5:0:0:0: Direct-Access Android Adapter 0100 PQ: 0 ANSI: 2
[ 2469.136395] scsi 5:0:0:1: CD-ROM Android Adapter 0100 PQ: 0 ANSI: 2
[ 2469.139317] scsi 5:0:0:2: Direct-Access Android Adapter 0100 PQ: 0 ANSI: 2
[ 2469.141053] sd 5:0:0:0: Attached scsi generic sg2 type 0
[ 2469.170237] sr1: scsi3-mmc drive: 0x/0x caddy
[ 2469.170496] sr 5:0:0:1: Attached scsi CD-ROM sr1
[ 2469.170578] sr 5:0:0:1: Attached scsi generic sg3 type 5
[ 2469.170762] sd 5:0:0:2: Attached scsi generic sg4 type 0
[ 2469.372234] sd 5:0:0:0: [sdb] Attached SCSI removable disk
[ 2469.421238] sd 5:0:0:2: [sdc] Attached SCSI removable disk"
Phone turned ON:
Only when this information is displayed, If I turn the phone on, it will connect to linux. Usb debugging will come up and I'm able to mount the SD card.
This is very weird. Can anyone help me with this issue?
Hello again,
Over 100 views and not a single idea???
One thing, when I connect the phone to Ubuntu (not in pink screen, as it doesn't work), the internal memory is seen as unallocated. Is this normal? It say 2.0GIG but no file system. I have access to the internal memory on the phone itself. Could this be a clue (The external SD card is visible and accessable).
When i type adb devices, no device is present or if I use adb shell, error: device not found.
lsusb and dmesg show the device.
Bus 006 Device 028: ID 12d1:1037 Huawei Technologies Co., Ltd. Ideos
ls -l /dev/bus/usb/006/028
crw-rw-rw-+ 1 root gabriel 189, 667 Sep 3 09:41 /dev/bus/usb/006/028
A have, at this moment, B517 installed (tried 136, 138, 518, 526, 528 with the same results).
Come on guys, I don't believe this to be a hardware issue. Please help!!!!!!!!!
P.S. I still have IMEI, serial, etc.
jcpbs said:
Hello again,
Over 100 views and not a single idea???
One thing, when I connect the phone to Ubuntu (not in pink screen, as it doesn't work), the internal memory is seen as unallocated. Is this normal? It say 2.0GIG but no file system. I have access to the internal memory on the phone itself. Could this be a clue (The external SD card is visible and accessable).
When i type adb devices, no device is present or if I use adb shell, error: device not found.
lsusb and dmesg show the device.
Bus 006 Device 028: ID 12d1:1037 Huawei Technologies Co., Ltd. Ideos
ls -l /dev/bus/usb/006/028
crw-rw-rw-+ 1 root gabriel 189, 667 Sep 3 09:41 /dev/bus/usb/006/028
A have, at this moment, B517 installed (tried 136, 138, 518, 526, 528 with the same results).
Come on guys, I don't believe this to be a hardware issue. Please help!!!!!!!!!
P.S. I still have IMEI, serial, etc.
Click to expand...
Click to collapse
It is a strange behaviour. The only thing I could recommend you is dial *#*#2846579#*#* and see the usb port setting. On stock ROMs you should be able to change it to something like "normal" or "google".
Blefish said:
It is a strange behaviour. The only thing I could recommend you is dial *#*#2846579#*#* and see the usb port setting. On stock ROMs you should be able to change it to something like "normal" or "google".
Click to expand...
Click to collapse
Belfish, thank you for the reply. I have already tried that. Same result. Someone has suggested if the vold.fstab file has been moddified. I have never touched it so I don't know what I'm looking for. This is what's inside the file:
# Copyright (c) 2010, Code Aurora Forum. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials provided
# with the distribution.
# * Neither the name of Code Aurora Forum, Inc. nor the names of its
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# < DTS2010071700153 genghua 20100717 begin
# we modified this command according to our platform to support SD card recognization in user space
# dev_mount sdcard /mnt/sdcard auto /devices/platform/msm_sdcc.1/mmc_host/mmc0
## /* <DTS2010081001800 duangan 20100814 begin */
dev_mount sdcard2 /mnt/sdcard auto /devices/platform/msm_sdcc.4/mmc_host
dev_mount sdcard1 /mnt/sdcard 14 /devices/platform/msm_sdcc.2/mmc_host
## /* DTS2010081001800 duangan 20100814 end> */
# DTS2010071700153 genghua 20100717 end >
Is it supposed to be like that?
Thanks.
The vold.fstab shouldn't matter much. If it is wrong, then it would not let you mount sd card in android too.
I don't really know how to help you. I know there are some NV items that could alter the USB interface, but it's mostly in the kernel side. Maybe you can check your "dmesg" log on your phone. Using a Terminal Emulator, first write su for superuser and then dmesg. It gives you the kernel log messages in Android side (the phone).
Blefish said:
The vold.fstab shouldn't matter much. If it is wrong, then it would not let you mount sd card in android too.
I don't really know how to help you. I know there are some NV items that could alter the USB interface, but it's mostly in the kernel side. Maybe you can check your "dmesg" log on your phone. Using a Terminal Emulator, first write su for superuser and then dmesg. It gives you the kernel log messages in Android side (the phone).
Click to expand...
Click to collapse
Ok, I will do that. I just need to go back to 2.2 so I can root it. Once I have the Logs, I will post it. I really hope to solve this so I can try your new rom. Thank you Blefish
P.S. Is there anything I should be looking for?

Categories

Resources