[ICS] Help with Gamepad/Controller Support

Discuss anything Scroll Excel Tablet related here.

[ICS] Help with Gamepad/Controller Support

Postby Wully » March 13th, 2012, 11:19 pm

I found this on xda forums while trying to test my wireless 360 Controller using the OTG cable and the wireless adapter for windows, so far, the controller syncs to the adapter, but there is nothing happening on the tablet side.

Since ICS is to support controllers like this I thought it would work, I assume the modules are missing from the ICS 4.0.3 build that suggsy89 posted https://scrolltabletforum.sevo.uk/site/viewtopic.php?f=55&t=2155

The following post is from the XDA thread I found this. It is made for the asus eepad transformer TF101.
The modules thread:
http://forum.xda-developers.com/showthread.php?t=1517949

I'm not a developer myself though I am willing to learn, but would I be right in saying if we can get the modules, compile them for our version of ICS and make them into modules, it would work for us? As surely the ones in the above link are compiled for a completely different version/hardware?

Going by what dipje in xda forums has posted:
dipje from xda forums @ 26th February 2012
I took a vanilla 2.6.39.4 linux source tree, copied in the .config from /proc from my running ICS v9 build. And compiled it.
After that, turned on CIFS and XPAD support in the config and compiled them as modules.



Originally Posted by RobertZFord

I've fixed this issue on my TF101.

DISCLAIMER: This is absolutely a hack. I have no clue if it will survive future updates to the firmware, and I have no clue if it will work on TF201s. I have a TF101, followed these steps, and gamepads work in SNESoid now. Proceed at your own risk. Thanks go to the original authors of the components listed below.

You will need:

Ingredients
1. ViperMOD PrimeTime v4.5, found here: http://forum.xda-developers.com/show....php?t=1427125
2. ff-memless and xpad kernel modules, found here: http://forum.xda-developers.com/show....php?t=1517949

Steps
1. Follow the instructions in the ViperMOD PrimeTime thread to give yourself root access to the tablet. If successful, you will also have access to the adb shell.
I have a TF101, but the 3rd option, recommended for TF101s, did not work for me. Option #1 did, however. Confirmed by whoami in adb shell.

2. unzip the xpad-v2.zip to your SD card, for example, I unzipped mine to /sdcard/Download/xpad-v2

3. Run 'adb shell' in Windows, and run
Code:

su

to give the shell superuser privleges. Once you are working as root, your terminal prompt should switch from a $ to a #, but if you want to make absolutely sure, run 'whoami', and it should say 'whoami: unknown uid 0'. If this is the case, you are root and may proceed.

4. Remount the /system filesystem as read-write by running the following:
Code:

mount -o remount,rw /system

5. Copy the ff-memless and xpad modules to /system/lib/modules by doing the following:

Code:

cp /sdcard/Download/xpad-v2/ff-memless.ko /system/lib/modules/
cp /sdcard/Download/xpad-v2/xpad.ko /system/lib/modules/

6. !! OPTIONAL !!
you can test gamepad support by running the following commands:
Code:

insmod /system/lib/modules/ff-memless.ko
insmod /system/lib/modules/xpad.ko

at this point, js0 should appear in /dev/input, the two modules should be listed in lsmod, and gamepad support should work. I tested an Xbox 360 controller in GBCoid and SNESoid and it worked like it did in Honeycomb, with no problems at all.

But we're not done yet.

7. To make these modules autoload, you have to make a script that runs at boot. Run the following commands:
Code:

echo "#!/system/bin/sh" >> /system/etc/install-recovery.sh
echo "insmod /system/lib/modules/ff-memless.ko" >> /system/etc/install-recovery.sh
echo "insmod /system/lib/modules/xpad.ko" >> /system/etc/install-recovery.sh
chmod 777 /system/etc/install-recovery.sh

8. Reboot and your gamepads should work. I tested mine in SNESoid and it works perfectly.

Good luck!
User avatar
Wully
Serious Scroller
Serious Scroller
 
Posts: 92
Joined: January 2nd, 2012, 4:18 am
Location: Scotland
Scroll Version: Scroll Excel Android 4.0.3


Re: [ICS] Help with Gamepad/Controller Support

Postby Wully » March 14th, 2012, 12:53 pm

I tried looking into it, its way over my head haha, especially since the very first part I found on a tutorial, pulling the config.gz from the /proc directory on the tablet, wasn't even there. Stumped at step one :P
User avatar
Wully
Serious Scroller
Serious Scroller
 
Posts: 92
Joined: January 2nd, 2012, 4:18 am
Location: Scotland
Scroll Version: Scroll Excel Android 4.0.3

Re: [ICS] Help with Gamepad/Controller Support

Postby justb » March 14th, 2012, 3:57 pm

I tried a 360 wired joypa, no joy...lol

But one of my old microsoft ones works fine, an old Sidewinder. I also have an old Logitech Wingman that works.

There is an app that lets you use the 360 pad on the market, havent tried it yet..

https://play.google.com/store/apps/deta ... XNiam95Il0.
Scroll Excel, Suggsys ICS 4.0
User avatar
justb
Serious Scroller
Serious Scroller
 
Posts: 79
Joined: January 5th, 2012, 10:00 am

Re: [ICS] Help with Gamepad/Controller Support

Postby Wully » March 14th, 2012, 10:54 pm

justb wrote:I tried a 360 wired joypa, no joy...lol

But one of my old microsoft ones works fine, an old Sidewinder. I also have an old Logitech Wingman that works.

There is an app that lets you use the 360 pad on the market, havent tried it yet..

https://play.google.com/store/apps/deta ... XNiam95Il0.



I tested it, no joy either lol,

I think the problem is that we are missing those specific drivers for the majority of controllers.
User avatar
Wully
Serious Scroller
Serious Scroller
 
Posts: 92
Joined: January 2nd, 2012, 4:18 am
Location: Scotland
Scroll Version: Scroll Excel Android 4.0.3

Re: [ICS] Help with Gamepad/Controller Support

Postby Mitre » March 14th, 2012, 11:19 pm

plug your controller into excel OTG run terminal
Code: Select all
lsusb

should show vendor id and model id search for lynux drivers for that number
WHAT DO WE WANT?
A TIME MACHINE!
WHEN DO WE WANT IT?
IT DOESN'T MATTER
User avatar
Mitre
Moderator/Developer
Moderator/Developer
 
Posts: 1733
Joined: February 11th, 2011, 7:52 pm
Location: Hertfordshire
Scroll Version: 7" scroll resistive CWM4 Android 2.1
Scroll Excel 4.0.4 AOKP CWM5
Samsung Galaxy S2
Galaxy apollo Pulse mini

Re: [ICS] Help with Gamepad/Controller Support

Postby suggsy89 » March 14th, 2012, 11:23 pm

Then insmod the drivers by editing the kernel / boot image

http://linux.about.com/od/commands/l/blcmdl8_insmod.htm
User avatar
suggsy89
Trusted Developer
Trusted Developer
 
Posts: 971
Joined: June 28th, 2011, 4:33 pm
Real Name: John
Scroll Version: Scroll Excel - Jellybean 4.1.2
Yarvik Go Zetta - Scroll Extreme Jellybean 4.1.1

Re: [ICS] Help with Gamepad/Controller Support

Postby Wully » March 15th, 2012, 3:04 am

Mitre wrote:plug your controller into excel OTG run terminal
Code: Select all
lsusb

should show vendor id and model id search for lynux drivers for that number


Plugged in the Windows Wireless Receiver For Xbox 360 Controller
Code: Select all
8192cu 519648 0 - Live 0xbf0c9000
rtl8150 8910 0 - Live 0xbf0c2000
mcs7830 6557 0 - Live 0xbf0bc000
qf9700 8513 0 - Live 0xbf0b5000
asix 22500 0 - Live 0xbf0aa000
usbnet 23745 3 mcs7830,qf9700,asix, Live 0xbf09e000
sun4i_csi0 25689 0 - Live 0xbf093000
gt2005 14367 0 - Live 0xbf08b000
gc0308 13499 1 - Live 0xbf083000
videobuf_dma_contig 5659 1 sun4i_csi0, Live 0xbf07e000
videobuf_core 18067 2 sun4i_csi0,videobuf_dma_contig, Live 0xbf074000
bma250 6806 0 - Live 0xbf06e000
mali 130483 10 - Live 0xbf041000
ump 42486 19 mali, Live 0xbf030000
ft5x_ts 45006 0 - Live 0xbf000000


I've tried googling the above and can't find anything that relates to a xbox 360 wireless adapter, not sure if its not appearing on lsusb or something.
User avatar
Wully
Serious Scroller
Serious Scroller
 
Posts: 92
Joined: January 2nd, 2012, 4:18 am
Location: Scotland
Scroll Version: Scroll Excel Android 4.0.3

Re: [ICS] Help with Gamepad/Controller Support

Postby Wully » March 18th, 2012, 3:56 am

I've been at this solid all night, I need some insight guys!

Managed to compile the mips 3.0.8 kernel on arm architecture., the tutorial says to compile it for mips, but I couldn't get it working, that's most likely the main problem.
http://developer.mips.com/android/android-porting-guide/

I managed to make the ff-memless.ko and xpad.ko modules from the arm build though.

When I try to insmod them on the Excel I get the error "Exec format error"
I ran dmesg and it returned:
Code: Select all
ff_memless: disagrees about version of symbol module_layout

As far I am aware, that means they've been compiled in the wrong architecture.

So I guess what I really need help with is:
Is the kernel in the ICS 4.0.3 rom compiled on the MIPS architecture?
If so, I need help getting it to compile on mips, I keep getting errors that it can't find the arm-eabi-gcc compiler couldn't be found when it was definitely there! :lol:

Slowly but surely getting there, still learning ;)
User avatar
Wully
Serious Scroller
Serious Scroller
 
Posts: 92
Joined: January 2nd, 2012, 4:18 am
Location: Scotland
Scroll Version: Scroll Excel Android 4.0.3

Re: [ICS] Help with Gamepad/Controller Support

Postby Mitre » March 18th, 2012, 7:58 am

WHAT DO WE WANT?
A TIME MACHINE!
WHEN DO WE WANT IT?
IT DOESN'T MATTER
User avatar
Mitre
Moderator/Developer
Moderator/Developer
 
Posts: 1733
Joined: February 11th, 2011, 7:52 pm
Location: Hertfordshire
Scroll Version: 7" scroll resistive CWM4 Android 2.1
Scroll Excel 4.0.4 AOKP CWM5
Samsung Galaxy S2
Galaxy apollo Pulse mini

Next

Return to Scroll EXCEL - General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest

cron