Jump to content

USB Host mode driver


Guest vukodav

Recommended Posts

Guest vukodav

I found work of a guy who made USB host mode drivers for ZTe Blade, for stock ROMs. Since Blade and Racer have almost the same hardware, same chipset, Racer have hardware capabilities for that.

Here is the link Blade USB host mode drivers.

Is it possible to port his work to Racer ROM's? If so we'd have full fledged computer instead of phone :).

Thank you

Link to comment
Share on other sites

Guest vukodav

Anyone have thoughts, or suggestions how this can be done? I'd help but I'm not a developer.

If someone can point this out to Racer ROMs developers, it'd be great

Link to comment
Share on other sites

  • 3 weeks later...

HEllo world :)!

I finaly manged to make kernel with USB HOST mode enavled. EVerything works fine except Racer camera, since I used deadlink's old sources and configuration

BTw, I'm writing now from my PCkeyboard and using my mose on Racer

Link to comment
Share on other sites

Guest Racerboy

HEllo world :)!

I finaly manged to make kernel with USB HOST mode enavled. EVerything works fine except Racer camera, since I used deadlink's old sources and configuration

BTw, I'm writing now from my PCkeyboard and using my mose on Racer

NICE :)

isnt deadlinks kernal#64 source code available? camera works with that, any luck asking vamshistunner on his source code ?

Link to comment
Share on other sites

NICE :)

isnt deadlinks kernal#64 source code available? camera works with that, any luck asking vamshistunner on his source code ?

no luck with vamshistunner code

I don't know how to use git, and I downloaded sources from link on 4pda forum deadlink provided (it's Tom Giordano's sources). I also downloaded sources from his git repository, but after compiling kernel from those, I got stuck in booting loops

Link to comment
Share on other sites

Finally I managed to compile working kernel with usb hos mode enabled. Everything works fine now, camera, touchscreen.

Kernel is based on deadlink's source code. It has support for HID devices (mouse, keyboard) and mass storage devices (flash memory, usb sticks etc.), ntfs and fat file systems on storage devices.

If anyone is interested testing it I'll post it here.

Here is manual;

- First you'll need USB OTG cable/adapter, you can one make yourself -

is how, or you can buy one (google for it, or buy on amazon)

- Then you'll need powered usb hub which can provide upstream power to phone

- Kernel with host mode enabled

- Download attached usb_host_mode.zip. Unpack it and place usb_host_mode_kernel.zip and kernel_modules folder on root of your sdcard

- Flash usb_host_mode_kernel.zip with CWM, then reboot phone

After you get to desktop, use adb shell or terminal emulator (connect bot, or other) to load modules.

In shell type commands in following order:


su


 insmod /mnt/sdcard/kernel_modules/ntfs.ko


 insmod /mnt/sdcard/kernel_modules/scsi_wait_scan.ko


 insmod /mnt/sdcard/kernel_modules/usb-storage.ko  # ignore any errors when loading

As for using mouse and keyboard, just plug them into usb hub

is video how basicaly everything should look like

If anything goes wrong, don't hesitate to ask me.

Cheers :)

usb_host_mode.zip

Link to comment
Share on other sites

Guest mladenovic73

Finally I managed to compile working kernel with usb hos mode enabled. Everything works fine now, camera, touchscreen.

Kernel is based on deadlink's source code. It has support for HID devices (mouse, keyboard) and mass storage devices (flash memory, usb sticks etc.), ntfs and fat file systems on storage devices.

If anyone is interested testing it I'll post it here.

Here is manual;

- First you'll need USB OTG cable/adapter, you can one make yourself -

is how, or you can buy one (google for it, or buy on amazon)

- Then you'll need powered usb hub which can provide upstream power to phone

- Kernel with host mode enabled

- Download attached usb_host_mode.zip. Unpack it and place usb_host_mode_kernel.zip and kernel_modules folder on root of your sdcard

- Flash usb_host_mode_kernel.zip with CWM, then reboot phone

After you get to desktop, use adb shell or terminal emulator (connect bot, or other) to load modules.

In shell type commands in following order:


su


 insmod /mnt/sdcard/kernel_modules/ntfs.ko


 insmod /mnt/sdcard/kernel_modules/scsi_wait_scan.ko


 insmod /mnt/sdcard/kernel_modules/usb-storage.ko  # ignore any errors when loading

As for using mouse and keyboard, just plug them into usb hub

is video how basicaly everything should look like

If anything goes wrong, don't hesitate to ask me.

Cheers :)

usb_host_mode.zip

Exellent job man.Thanx.

Samo napred.

Link to comment
Share on other sites

Guest vamshistunner

@ vukodav Great Job man :)

it would be nice to make a video out too :D

connecting the racer to PC and see the screen there

Grats man . good work :D

You can also connect the mobile to your PC and control it.

checkout this cool application in market. there is a video too. It is just like an web OS. You can send messages, transfer files, etc from the PC. You can use the mobile screen on PC using this application, but its an add-on to the above application.

Edited by vamshistunner
Link to comment
Share on other sites

@ vukodav Great Job man :)

You can also connect the mobile to your PC and control it.

checkout this cool application in market. there is a video too. It is just like an web OS. You can send messages, transfer files, etc from the PC. You can use the mobile screen on PC using this application, but its an add-on to the above application.

thanks for tip :)

Link to comment
Share on other sites

it would be nice to make a video out too :D

connecting the racer to PC and see the screen there

Grats man . good work :D

As vamshistunner pointed there are apps on market for controlling phone on PC. There is also a way to add bigger screen to phone over USB, framebuffer devices. But you'll have to wait for that cause I have to buy some usb to vga video adapters and test it first

Link to comment
Share on other sites

  • 2 weeks later...

If anything goes wrong, don't hesitate to ask me.

Before I make anything stupid, I rather ask about things I can't seem to get clear about:

- my hub has B-type upstream port and does not provide power to the phone (it is not charging). What hub do you use in that video?

- does the phone automatically detect whether it is host or client based on the type of cable you plug in?

- can other kernel modules (e.g. Sven's for Blade) be used to experiment with other external hardware?

Some extra thoughts: managed to run Ubuntu in chroot - veeery slow but also very exciting. I can connect to it with VNC, but was wondering if it could use an external display connected to the phone directly via USB? I will throw out my laptop if that works ;)

And finally many thanks for this topic!

Link to comment
Share on other sites

  • 2 weeks later...
Guest vukodav

Before I make anything stupid, I rather ask about things I can't seem to get clear about:

- my hub has B-type upstream port and does not provide power to the phone (it is not charging). What hub do you use in that video?

- does the phone automatically detect whether it is host or client based on the type of cable you plug in?

- can other kernel modules (e.g. Sven's for Blade) be used to experiment with other external hardware?

Some extra thoughts: managed to run Ubuntu in chroot - veeery slow but also very exciting. I can connect to it with VNC, but was wondering if it could use an external display connected to the phone directly via USB? I will throw out my laptop if that works ;)

And finally many thanks for this topic!

First, sorry for late answer. I used common 4 port USB hub, and Y type USB cable. Y USB cable I used has two A male and one mini B plug. I plugged one A plug to phone charger (it provides power to phone and hub) and the other in OTG cable, mini B plug is for connecting hub.

As for your other question, you can't use Sven's kernel modules. Kernel modules have to be compiled along with kernel with which they are used. I didn't compile modules for USB VGA adapters because I don't have hardware to test them with

Link to comment
Share on other sites

Guest vukodav

Give someone a scheme of this cable, please! p.s Sorry for flood!

and who will be able to port the kernel to gen2!???

I don't have scheme for this cable. I googled how to make it.

Link to comment
Share on other sites

Guest vukodav

and the voltage only usb Hub should do, or on the phone too??

USB standard requires 5V and 500mA per port. Iknow Racer charger doesn't have 5V and has 700mA power but it all worked. Phone was charging and USB hub working

Link to comment
Share on other sites

First, sorry for late answer. I used common 4 port USB hub, and Y type USB cable. Y USB cable I used has two A male and one mini B plug. I plugged one A plug to phone charger (it provides power to phone and hub) and the other in OTG cable, mini B plug is for connecting hub.

As for your other question, you can't use Sven's kernel modules. Kernel modules have to be compiled along with kernel with which they are used. I didn't compile modules for USB VGA adapters because I don't have hardware to test them with

Thank you, I managed to connect and play with the mouse, but none of my flash drives is recognized. Since I do not have a proper hub, I drew power from the wall charger using a Y cable... This kernel is great!

Link to comment
Share on other sites

Guest vukodav

Thank you, I managed to connect and play with the mouse, but none of my flash drives is recognized. Since I do not have a proper hub, I drew power from the wall charger using a Y cable... This kernel is great!

thank you. I don't know why your flash drives don't work. Did you loaded kernel modules first?

Link to comment
Share on other sites

Guest vukodav

just at this the same cable and connect the mouse or do nothing except chargeproishidit, I installed the library. The reason?

I don't understand your question. Can you explain more about your problem?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.