yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy SL i9003] vishal24387:
@ loSconosciuto

Buddy can u recreate modules for me??? I am attaching modules which were created by Amit for xxkph rom. I think one or two modules are missing in ur zip file of module.

Strange thing is that one member successfully read memory card using card reader. That member followed instruction given in OP. That member is using xxkph rom with Amit modules.

For reference take a look at this thread

http://xdaforums.com/showthread.php?t=1814716
[Samsung Galaxy SL i9003] loSconosciuto:
My bad, it's:

# cat /proc/kmsg

Anyway, the missing modules are already in your ramdisk and they are not related with USB OTG:

/lib/modules/2.6.35.7/kernel/drivers/bluetooth/btwilink.ko
/lib/modules/2.6.35.7/kernel/drivers/scsi/scsi_wait_scan.ko
/lib/modules/2.6.35.7/kernel/drivers/misc/ti-st/st_drv.ko

I rebuilt the modules enabling verbose debugging.

I also added fuse.ko and ntfs.ko (read-write support).

Here a (not tested) flashable zip with an init.d script (load-otg.sh) to automatically load the modules on boot (the "missing" modules are there but the init.d script won't load them). It will place the modules in /system/lib/modules/otg/, so that you can remove them easly (not all are necessary for USB OTG).

Check if they are loaded with:

# lsmod
[Samsung Galaxy SL i9003] vishal24387:
Oh really thanx buddy. I tried new modules. But still no result :( I doubt that whether that was really able to read memory card reader or not. App developer also told me to use add these modules to kernel itself. May be that member have used Amit kernel which had these modules inbuilt in it.
[Samsung Galaxy SL i9003] loSconosciuto:
This one?

I extracted the ramdisk and the modules are there. That means he built them as loadable modules, so it should be the same.

Could you try with a USB 1.0 device?

USB 2.0 devices should work as USB 1.0 devices when the proper modules are missing, but who knows, maybe that's the problem and that's why the other user can use his SD card reader. I tried to build ehci_hcd.ko but it tries to compile also some stuff for OMAP4 and it fails.

Post some dmesg logs as I explained in my previous post.
[Samsung Galaxy SL i9003] vishal24387:
I dont have usb 1.0 devices like mouse or keybord. I just have a small pen drive to test. Card reader is usb 1.0 device or is it a usb 2.0 device???

I have attached dmesg file. One is when external power source is connected & one is when external power source is not connected with pen drive.
[Samsung Galaxy SL i9003] vishal24387:
@ loSconosciuto

I have tried in every every every every...every possible way. I flashed xxpe rom & then clean ddlf2 rom. Then flashed xda bam kernel to root it. I installed latest version of busybox. I loaded ur given modules in system/lib/modules/ folder. I loaded them using module loader app. I checked in terminal emulator using "lsmod" command & showed me that all modules are loaded correctly. Then finally I tried to use otg helper app with otg cable & memory card reader (I have choosen this purposefully because for one member memory card reader is working). But finally NO RESULT :(

I doubt that loading modules manually really help or not because that member is using xxkph rom Amit kernel which has these modules inbuilt in that. I think modules in built in kernel makes a difference which causes it actually working. In present we dont have a single kernel in which these modules are preloaded.

Also one more thing I doubt that is my otg cable is really working or not. This is because I dont have any other phone which really support usb otg feature on which I can test my otg cable. But fortunately my friend have galaxy s2 phone on which today I will test my cable. It will ensure me that is this a software ug or my otg cable fault. I am 99% sure that cable is working perfectly (but still testing is necessary).

If cable wotks correctly then we must have to look in Amit kernel source that exactly what changes he has made to work otg helper correctly.
[Samsung Galaxy SL i9003] hillbeast:
lsusb shows USB hubs as well and root hubs. As an example, from my Linux server I get:

hillbeast@kyorabuilder:~/devel/galaxy3/kernel-3.4$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Now obviously on Android there is no USB ID database and therefore it won't show names for devices, but it should at least show IDs and bus information. If you get nothing showing up then the USB driver isn't working at all. An example from the Galaxy S2:

$ lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 058b:0041

And when I connect the USB OTG dongle (just the dongle, not the USB drive itself), I will get another device (another USB hub) shows up in lsusb.

I'm going to put money that the USB driver is incomplete or is missing some information telling it how to work. The USB switch in this phone, the FSA9480 does support USB OTG and so does the SoC itself, so the issue with devices not working is only software.
[Samsung Galaxy SL i9003] vishal24387:
Thats means are u sure that in present condition otg is not working is only because software limitation??? If we able to create drivers will it work??? :eek:

Here one member has got memory card reader working on our phone. He has attached screenshots also.

http://xdaforums.com/showthread.php?t=1814716

If u have usb otg cable then can u try & see will it work for u??? Also can u tell me that keeping modules inbuilt in kernel has any advantage OR loading these modules manually???
[Samsung Galaxy SL i9003] hillbeast:
I can't find the link to the modules in that page let alone sources. It's not a good idea to be using modules anyway as modules suck. You want to add them to the kernel itself.
[Samsung Galaxy SL i9003] vishal24387:
Here u will get modules. In that file u will get some extra modules also which are not related to usb otg.

http://d-h.st/8ns

This file is flashable zip file but in my opinion

dont flash it. Instead of that just extract it & use it to murge it in kernel. Can u create a test kernel having these modules included in it & test it with usb otg cable??? Take DDLF2 latest rom (as modules are for DDLF2 rom) & xda bam v14fix cf root kernel as base kernel to create test kernel.

Otg helper app u will get here.

http://xdaforums.com/showthread.php?p=29479707
[Samsung Galaxy SL i9003] hillbeast:
I can't add it to the kernel without the sources for these. Whoever compiled this, please send me the source codes or a patch for the stock kernel so I can get this going.
[Samsung Galaxy SL i9003] vishal24387:
I dont have sources or patches related to modules. loSconosciuto member has given me those modules. Sorry buddy :( Anyway can u create ur own otg modules same as that of I have given u (using xda bam kernel)?? Xda bam kernel source code u will get in his thread's OP.
[Samsung Galaxy SL i9003] vishal24387:
I just checked my usb otg cable on my friend's galaxy s2 phone. Thank god. My otg cable is working working absolutely fine :)

So now I am 99% sure that usb otg is not working DDLF2 rom only because I am using xda bam kernel which doesnt have otg modules inbuilt. Amit kernel works on xxkph for usb otg only because it has inbuilt usb otg modules.

Please any kernel developer help me to create a kernel with otg modules inbuilt in it. We are close to our achievement.
[Samsung Galaxy SL i9003] shriom_manerker:
just a suggestion cishal.. c if it works on xxkph with the exact same config as the guy who got the card reader working .. if that works then bang we hav a lead !
[Samsung Galaxy SL i9003] vishal24387:
Ya I did exact same thing that guys have did. I have done & cross checked myself 1000 times. You can check all my posts above :) Only difference is kernel. That guy is using Amit kernel having usb otg modules inbuilt in it on xxkph rom & I am using xda bam v14fix cf root kernel for DDLF2 rom which doesnt have these modules.
[Samsung Galaxy SL i9003] shriom_manerker:
yes i know ! i've been following all ur posts on otg ! m a fan too :) al the best :) seems like we're close :D
[Samsung Galaxy SL i9003] vishal24387:
Thanx buddy. I am sure we will get this feature working. If it can work on xxkph rom then why not on DDLF2 rom which is much advanced rom...! But I am little disapponted because very few developers are taking interest in this development. Anyway its everone's choice.
[Samsung Galaxy SL i9003] loSconosciuto:
I simply did some changes in the kernel cofig. I used XDA_Bam's kernel sources.

Could it be that there's no output from lsusb because there are no EHCI/OCHI drivers?

I can't understand why the other user can use his SD card reader. Can a USB 1.0 device work without them? It's the only thing I could think of, he also said he can't use his USB flash drive.

@vishal

As I said, if amit's kernel is the one I posted, the modules are not inbuilt, but they are included in the ramdisk and loaded from there. It shouldn't be different from properly loading the modules with insmod AFAIK.
[Samsung Galaxy SL i9003] vishal24387:
I am also confused because of this. I know that Amit kernel just load modules. It does nothing extra. I have tried to get output from terminal emulator using lsusb command but always I get nothing output. I have only two devices. One is pen drive & other memory card reader.

I was thinking that may be my otg cable is faulty but when ai tried all these devices with galaxy s2 then otg cable, pen drive & memory card reader everything worked perfectly. Means cable & other devices are absolutely fine.

Memory card reader is USB 2.0 device (searched on google)

EDIT: Does Amit's universal kernel also have these modules???
[Samsung Galaxy SL i9003] hillbeast:
Okay. I guess a Kyorakernel is in order for the SL...
[Samsung Galaxy SL i9003] hillbeast:
Okay, I just tested the modules and it gave me a kernel module magic error which means the kernel that built it doesn't match the one I'm using... meaning the module won't work. This is most likely why it's not working for you.

This is why I hate modules.
[Samsung Galaxy SL i9003] vishal24387:
I am not getting ur point. You mean to say that the modules which I had provided u is giving error with ur own kernel??? It means that if we take a kernel like UC kernel then modules should be built from UC kernel & tested on UC kernel only??? loSconosciuto has given me modules on basis of xda bam kernel (I think). But I never faced any problem or error while loading modules like u have said.

I also hate modules as we have to load them on each n every boot. But otg helper app works on the basis of modules as we have to use modules. Have u tested ur own built modules??? I think they will work with otg cable (I hope u have otg cable for testing).
[Samsung Galaxy SL i9003] :
Goodluck
[Samsung Galaxy SL i9003] vishal24387:
Amit kernel is the key to otg feature

Ok guys now I am 110% damn sure that I was doing all the things in correct way. The problem is in kernel or modules definitely. Hillbeast also said this. Zerocool420 (thanks to him) is the first member who actually showed us a proof that otg helper app is actually working (with help of memory card reader) on xxkph rom. Most imp thing is that he was using Amit's kernel which has inbuilt usb otg modules & saperate modules which has to be load manually. But when he flashed DDLF2 rom with ganesh's universal CF root kernel & followed all procedure for otg given in OP then bang...now its not working on his phone.

Now we have to create correct modules which can load correctly with corresponding kernel. I am damn sure that if we can create correct modules then otg feature will definitely work :)
[Samsung Galaxy SL i9003] bscraze:
Oh yea :D. If you have spare time(IF!), could you release kyorarom? It was the best rom for g3 :p
[Samsung Galaxy SL i9003] raj.amalw:
Hey dude. Have anyone tried to port nook colour usb otg kernel.Both has twl4030.
[Samsung Galaxy SL i9003] vishal24387:
Ok I will again insmod modules manually without using loading app :)

What is that unknown symbol error?
[Samsung Galaxy SL i9003] Skander1998:
I'd definitely support Kyorakernel and Kyorarom on our device..
[Samsung Galaxy SL i9003] luiseteyo:
I can help with porting, so that hillbeast has less work and can think in more important things...
[Samsung Galaxy SL i9003] hillbeast:
It wouldn't be a port. It would be a completely fresh kernel from scratch. I'm having trouble trying to get the thing to work though. I've managed to get it to boot but the STL drivers are f**ked beyond belief. Thanks Samsung.
[Samsung Galaxy SL i9003] vishal24387:
@ loSconosciuto

Ok buddy I loaded manually all modules (without using module loader app) in this order.

usbcore.ko

usbhid.ko

usbmon.ko

usb_storage.ko

.

.

.

.

and so on.....!!

Is this.order.correct??? Anyway app developer had told me that all modules are correct but usb_storage module is creating errors. Ur above post also shows that.

<4>[ 67.790344] usb_storage: Unknown symbol usb_alloc_urb (err 0)
<4>[ 67.790802] usb_storage: Unknown symbol usb_free_urb (err 0)
<4>[ 67.791320] usb_storage: Unknown symbol usb_alloc_coherent (err 0)
<4>[ 67.791839] usb_storage: Unknown symbol usb_register_driver (err 0)
<4>[ 67.792205] usb_storage: Unknown symbol usb_sg_init (err 0)
<4>[ 67.792785] usb_storage: Unknown symbol usb_sg_cancel (err 0)
<4>[ 67.793121] usb_storage: Unknown symbol usb_reset_device (err 0)
<4>[ 67.793395] usb_storage: Unknown symbol usb_submit_urb (err 0)
<4>[ 67.794006] usb_storage: Unknown symbol usb_free_coherent (err 0)
<4>[ 67.794403] usb_storage: Unknown symbol usb_control_msg (err 0)
<4>[ 67.794860] usb_storage: Unknown symbol usb_deregister (err 0)
<4>[ 67.795104] usb_storage: Unknown symbol usb_lock_device_for_reset (err 0)
<4>[ 67.795471] usb_storage: Unknown symbol usb_unlink_urb (err 0)
<4>[ 67.795898] usb_storage: Unknown symbol usb_kill_urb (err 0)
<4>[ 67.796234] usb_storage: Unknown symbol usb_reset_endpoint (err 0)
<4>[ 67.796813] usb_storage: Unknown symbol usb_sg_wait (err 0)
<6>[ 67.905242] NTFS driver 2.1.29 [Flags: R/O MODULE]

Are u sure its due to wrong order of loading modules?

EDIT :-

I talked to dhiru. He also said same thing that hillbeast has said. Dhiru said that

So its clear that modules need to recompile so that it should not give such error & those modules need to match with kernel version.
[Samsung Galaxy SL i9003] loSconosciuto:
I'm pretty sure of that. The unknown symbols are exported by usbcore.ko, if you don't load it, they are not avaible. I even tried to load them in the wrong order and I got these errors.

What amit did was to include the modules in his ramdisk and add the dependencies in modules.dep:

...
kernel/drivers/media/video/gspca/gspca_main.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/bluetooth/btwilink.ko: kernel/drivers/misc/ti-st/st_drv.ko
kernel/drivers/hid/usbhid/usbhid.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/usb/core/usbcore.ko:
kernel/drivers/usb/mon/usbmon.ko: kernel/drivers/usb/core/usbcore.ko
kernel/drivers/usb/storage/usb-storage.ko: kernel/drivers/usb/core/usbcore.ko
...

With the dependencies defined you don't have to care about the order, because the needed modules are automatically loaded.

The important thing is that you load usbcore.ko before any other modules. Then you can load the others as you prefer.

Anyway what I meant with my post is: Did zerocool420 try the modules I gave you with a universal kernel? I saw that he is going to flash BCK. If he'll do that, he could try the modules I built.

I know what's the vermagic issue. I used the correct one and your dmesg confirmed that, there are no errors and the modules are loaded.

Read my previous post:

...
... vermagic=2.6.35.7-CL709629
...

Now go to Settings->About phone->Kernel version. You'll see that the version is "2.6.35.7-CL709629 bla bla bla".

This is XKPQ vermagic. All our universal kernels are built with that vermagic (now you know why devs say "this kernel is for KPQ"). Each stock kernel has a different vermagic, as soon as you flash a custom kernel, that string changes.

EDIT:

And that's why ganesh made a different normalboot.img for each ROM. He didn't rebuild the kernels, he repackaged them adding stuff in the ramdisk. The vermagic is not changed and that's why my modules won't work in his DDLF2 kernel.
[Samsung Galaxy SL i9003] vishal24387:
Does this means that if modules u have created are actually for xxkpq stock kernel vermagic which dont match with DDLF2 rom stock kernel???
[Samsung Galaxy SL i9003] loSconosciuto:
Yes, you need a kernel with that vermagic.

If you are using XKPQ with the stock kernel, you can use them. If you are using a different ROM, you need to flash a kernel with that vermagic (BCK is built with XKPQ vermagic)
[Samsung Galaxy SL i9003] vishal24387:
Ya but then why even with proper order of loading modules its still giving same error???
[Samsung Galaxy SL i9003] Skander1998:
There, again.
[Samsung Galaxy SL i9003] loSconosciuto:
From your last dmesg log I can see that the modules are loaded before you touch the screen and it's not an init.d script to do that because init.d script are executed very early (when there's the Galaxy SL screen).

That means Module Loader did that for you and without dependencies written somewhere, it fails.

However, from your dmesg output I can see that usb-storage.ko is loaded after you touched the screen, so you did that manually and because Module Loader app already loaded usbcore.ko, you don't have the error when you do that the second time.

Now, to end this, try it on your own (bold=command, italic=comment/output):

[B]cd /system/lib/modules
insmod usb-storage.ko[/B]
[I]# [strike]insmod: init_module 'usb-storage.ko' failed (No such file or directory)[/strike] something[/I]
[B]dmesg[/B]
[I]# you should get as last thing all the errors with "unknown symbols"[/I]
[B]lsmod[/B]
[I]# no usb-storage in the list[/I]
[B]insmod usbcore.ko[/B]
[I]# no output[/I]
[B]dmesg[/B]
[I]#...
#<6>[ XXX.XXXXXX] usbcore: registered new interface driver usbfs
#<6>[ XXX.XXXXXX] usbcore: registered new interface driver hub
#<6>[ XXX.XXXXXX] usbcore: registered new device driver usb[/I]
[B]lsmod[/B]
[I]# usbcore is in the list[/I]
[B]insmod usb-storage.ko[/B]
[I]# no output[/I]
[B]dmesg[/B]
[I]#...
#<6>[ XXX.XXXXXX] Initializing USB Mass Storage driver...
#<6>[ XXX.XXXXXX] usbcore: registered new interface driver usb-storage
#<6>[ XXX.XXXXXX] USB Mass Storage support registered.[/I]
[B]lsmod[/B]
[I]# usb-storage is in the list[/I]

It's clear that I can't help you that much and because I really don't care about USB OTG, I'm out of this. Hillbeast will surely be more helpful than me.
[Samsung Galaxy SL i9003] vishal24387:
No problem buddy. You helped me alot. Really thanks buddy :) And I am sorry because I tortured u alot for debugging dmesg log files.

Anyway I hope dhiru will get otg cables soon to test otg feature.
[Samsung Galaxy SL i9003] hillbeast:
I have my OTG cable here. I would have worked on it last night if I didn't have my own module issues with trying to find matching modules for the kernel sources I downloaded. I hate how Samsung manages their source codes.

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] vishal24387:
Means are u not able to create proper modules???

Can this be useful to u???

http://xdaforums.com/showthread.php?t=1459892

http://xdaforums.com/showthread.php?t=1105497
[Samsung Galaxy SL i9003] hillbeast:
I'm absolutely not and never will make modules. They are terrible and a stupid idea for embedded platforms. Modules have no purpose on a cellphone. I will be compiling the drivers into the kernel the correct way.

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] vishal24387:
XXKPH rom wont help me

Now I am really fed up of trying this usb otg with help of modules. I tried XXKPH rom with modules uploaded in OP but no success :eek:

This is my procedure

1. I did a clean install of XXKPH rom with xxkpe rom as base.

2. Then I tried to flash Amit's universal CF root but guess what phone start to bootloop. Means universal CF root dont work on XXKPH rom :eek:

3. So I flashed this CF root of Amit

http://xdaforums.com/showthread.php?t=1252969

4. As expected this cf root has otg modules. Even though I copied modules at /system/modules/ folder location. When I tried to insmod otg modules manually then I got message in terminal emulator that modules are already exist.

5. When I opened OTG helper app it showed me that busybox not installed. So I installed busybox installer. It installed latest busybox version in /system/xbin/ folder location successfully.

6. After this I rebooted the phone.

7. When I connected OTG cable with pen drive type memory card reader & when I opened OTG helper app, after pressing mount button I got message that no drive found :(:(:(:(

I am really confused because with above configuration zerocool420 member has successfully mouned drive using otg helper app. But I am not able to do that.

Is this due to following reasons???

1. busybox location & version???

--This is because I have installed busybox at /system/xbin/ folder location. While zerocool420 has installed busybox at /system/sbin location. I have installed latest version of busybox. Dont know about zerocool420's busybox version

2. Different OTG cable???

--zerocool420 is using xperia S otg cable while I am using modded otg cable of nokia n8 (but my cable works perfectly on galaxy s2 then why not on SL??)

3. Different type of memory card reader???

--I have used exact same type of memory card reader as that of zerocool420. Even I have used external power source also but no use.

I think I have to contact zerocool420 member & I have to tell him that he will have to flash XXKPH rom & he has to repeat whole procedure & once again if he successfully mounted drive then using logcat or dmesg file we can invistigate more in this.
[Samsung Galaxy SL i9003] hillbeast:
Well I would like the person who posted these modules in the first place to comply with the rules of the XDA and post the source codes. That's right, its actually in the rules that you must follow the source licenses, in this case the GPL. If he/she hasn't posted them within a week, I will report them to a moderator.

Sent from my Serenity Galaxy S2
[Samsung Galaxy SL i9003] vishal24387:
No need to report & no use of report buddy. Because Amit who had actually created modules has left xda site.

Anyway any progress on creating necessary drivers of usb otg???
[Samsung Galaxy SL i9003] vishal24387:
I was searching around on xda site for phones having same chipset with usb otg enabled by developer. I found motorola defy on which developers tried to enable usb otg (but not successful). But good thing is that their developer had developed module which makes phone to supply power to external device by itself :D

Can we use this in our phone for giving power supply to external device???

This is the post of motorola defy usb otg development
[Samsung Galaxy SL i9003] crk1995:
I found something related to USB_otg in the latest source code released by samsung (ICS misconception one)

In that file, under kernel,

/drivers/usb/otg/

Images:
[Samsung Galaxy SL i9003] dhiru1602:
https://github.com/teamhacksung/and...ona/tree/ics-samsung-2.6.35.7/drivers/usb/otg

There are even on the older kernels. For some reason the device doesn't switch to host mode. I have spent few hours on it but I couldn't figure out why the device doesn't switch modes.
[Samsung Galaxy SL i9003] crk1995:
Can it be related to the problems hillbeast is facing with uart