yashsingh1/xdaforums huggingface dataset:
[Android General] sir_earl:
Change log:

- Controllers no longer vibrate on connect. Hopefully this will fix the issue of endless vibration on the fakes.

- Devices bluetooth address from driver passed back up to app, so the one shown in the app should now be the correct one to pair controllers with.

Fake controllers are still not disconnecting correctly, so you will need to correct them to a PC with the pair tool running to turn them off.

Let me know if the issues some of you had have been solved!
[Android General] dangerH:
This fixed the issue on my end, brilliant.

Hopefully it won't take too long to update the main sixaxis tool in the market, assuming there aren't any regressions for other people!
[Android General] Rdnaskela:
I have Gasia controller and it seems to be supported in Checker 0.3.1, but not in Sixaxis Controller 0.5.7.

The checker works with connection type 2, whereas Sixaxis Controller 0.5.7 uses type 1.

Is there a reason behind the fact that PlayMarket has old Sixaxis Controller Cheker (version 0.2.0)?

My controller doesn't understand the messages started with 0x92 used in initialization, but understands 0xA2 either sent to psm17 or psm19.

So if you were using 0xA2 buffer to initialize controller with vibration and then 0x92 buffer to set led lights and turn off vibration, then controller will not stop vibrating, the leds will be set as written in 0xA2 buffer.

Or hold PS button for about 10 seconds. Until it will switch off.

I noticed that MotioninJoy does not send any buffer to tell controller that it shoud switch off.

So there must be something in the order or the way shutdown(), and close() functions are called.

BTW, my controller replyes to buffer (0x53 0xF4 ...)(len 6) with 0x00 (len 1).

Hope this information will help.
[Android General] sir_earl:
Thanks for your post - there's some very informative information in there (I could have used you a few days ago!!)

Yes, version 0.3.1 is a beta version that was just posted for testing as I'm still ironing out bugs with the Gasia gamepads and new bluetooth drivers. Assuming I can fix the remaining bugs fairly soon both apps will be released on Google Play.

That's exactly the behaviour I was experiencing with my Gasia gamepad, so I switched to using 0xA2 for reports which worked for my fake, but not for others. I suspect there may need to be a longer delay between sending the second report, but I'm not using vibration yet, so turning it off completely will be fine for now.

Holding the power button doesn't work with my Gasia gamepad, so I guess there's some variation out there. My Gasia doesn't seem to respond to the l2cap disconnection request command at all, so I'll keep fiddling with different commands - something must work!

Yep, that's how I'm determining that the controller is a Gasia, so after I receive the single 0x00 byte back I send the 0xA2 hid report.

Edit: Looks like I have a fix for the fake controllers not disconnecting. Sending a HCI reset command when disconnecting seems to do it nicely. Well past bed time now, so I'll post another version tomorrow.
[Android General] sdemius:
Connection type 1 didn't works with my gasia gamepad.

In connection type 2 the checker app output "listening..." and nothing more.

Gamepad stops blinking faster than usual, and all. All leds off.

Can you tell what you are sending data buffers?
[Android General] sir_earl:
It will be helpful if you are able to run a utility called hcidump from a terminal, attempt the connection, then send me the output from that command. It may be installed on your device, if not you should be able to download it here -https://github.com/d34th4ck3r/Hcidump-in-Android/raw/master/libs/armeabi/hcidump
[Android General] zenisnotchosen:
My fake controller does connect and register button presses now on my Streak 7 with your updated Compatibility Checker app. Connection type 1 fails but connection type 2 is successful then controller pairs immediately and registers button presses within the app. Thanks for the great work!

Sent from my Streak 7 using witchcraft.

---------- Post added at 02:46 AM ---------- Previous post was at 02:43 AM ----------

Also, my fake controller does turn off when disconnected from the app.

Sent from my Streak 7 using witchcraft.
[Android General] the_fest:
Error

Attempting connection type 1...

Driver Starting...

Error: Failed to configure bluetooth

Attempting connection type 2...

Driver Starting...

Can't set line discipline

Error: Failed to configure bluetooth

Attempting to close server...

Restoring previous bluetooth state.

Disconnected

please help me. device htc evo 3d
[Android General] sir_earl:
It's unlikely that your device will work, but have you tried the test version (0.3.1) posted on the previous page?
[Android General] sdemius:
I uploaded hcidump on my phone:

root@android:/ # hcidump
hcidump
HCI sniffer - Bluetooth packet analyzer ver 1.41
Can't attach to device hci0. Invalid argument(22)

It is a bind error but why?
[Android General] sir_earl:
Not sure. Did you start the driver in the compatibility checker app first? I may need to add HCI logging to the app if you can't get hcidump working.
[Android General] the_fest:
no. i'll try it.

Also when i was at another rom, I'm running the Sixaxis controller App, he says "Listenning for controllers" and nothing hapent . Here screenshots of Sixaxis Controller and MotinionJoy(i'm also trying Sixaxis pare tool, but same result). Can you help me? Thanks.

PS sorry for my english
[Android General] sir_earl:
If you're using MotionInJoy, then you need to type the bluetooth address in reverse byte order, so you would need to enter "3b.8d.15.6d.20.d4".
[Android General] the_fest:
Yes, i know. but it is still not working

Sixaxis Compatibly checker from previous page ^

Driver starting...

Error : failed to configure bluettoh

Couln't load HCI library

Attempting connection type 2...

Driver starting...

Error : failed to configure bluettoh

Couln't set HCI raw mode

Attempting connection type 3...

Driver starting...

Error : failed to configure bluettoh

Couln't set HCI raw mode
[Android General] sir_earl:
That's not looking promising. I guess the only way your device will work is with the custom firmware you were using when it did work.
[Android General] sir_earl:
Sixaxis Compatibility Checker 0.3,2

Changelog:

- All controllers should now disconnect when the app is stopped.

- Fixed crash affecting some devices, relating to new bluetooth driver.

- Fixed crash when using multiple controllers and manually disconnecting them.

*** If anyone has any devices that previously used connection type 2 (which will now be type 3 in the new version), such as many Samsung devices, I'd appreciate some feedback from them to make sure it's still working with their devices.

Other than that, if nobody finds any major issues today I'll very likely upload the full update to Google Play tomorrow.
[Android General] spthacker:
Downloaded, connected to the 6axis just fine all buttons reported correctly and disconnected/turned off ok

Bricked/Rasbean N7
[Android General] Trunkam:
ok with your last update everything went smooth ..

so seems the even gasia fake are supported :) you

question for the future..: is there any way to make gama that have a steering weel as a touch command work better?

i can understand that the way as they act is different drom an analog movement.. bu, i think that having in profiles edit button the possibility to invert axis.. in left joy could help..
[Android General] wajih.boukaram:
New version works like a charm. Tried it on my samsung i9000, on my tablet, and on my chinese google tv sticks (bluetooth dongle and built-in both work great). Some of the buttons seem slow to respond sometimes, but other than that it connects and button presses register.
[Android General] Rdnaskela:
My Gasia Controller does not shutdown when I press stop button in the app.

Are you using the reset command (HCI OGF=0x03 OCF=0x0003)?

With my controller works better the disconnect (HCI OGF=0x01 OCF=0x0006). Maybe this will also work with other controllers.

Also a small question: do you know a way to get struct sock structure when you have only file descriptor returned by socket() function? (I am thinking of a way to get a handle number of ACL connection to use with hcitool)
[Android General] sir_earl:
All the racing games I've played treat the steering wheel as a slider rather than a wheel. By this I mean you don't have to rotate your finger around the wheel, you can simply slide left and right. By adding an analog touch button centered on the wheel I've found it works very well for the racing games I've tried. If you're having a specific issue, or know of a racing game that works differently, please let me know. One other thing you may need to do is add a couple of frames delay and reduce the speed slightly - this will ensure the turning is centered on the sticks neutral position.

By the way, you can already invert the x and y axes under the button properties, but I can't see why this would be required for racing games?
[Android General] sir_earl:
Were the buttons slow on all the devices you tried, or just some of them? Also, are you using a fake controller, or an original?
[Android General] sir_earl:
The newest version uses the reset command, but version 0.3.1 was attempting to use the correct procedure for disconnection, which is to send an l2cap disconnect request on the interrupt, then the control, then finally send an HCI disconnect (0x01 | 0x0006). This works fine with the original, but the fakes don't seem to respond to the l2cap reqests. I also tried just sending an HCI disconnect to my fake, but that also didn't work. I will try changing the code to first send the HCI disconnect, followed by the HCI reset command, which might have better luck.

If you hold the PS button on your controller, does it correctly disconnect from the app (you should see a "client 1 disconnected" message)?
[Android General] zenisnotchosen:
My fake controller pairs (using connection type 2), registers button presses, and turns off when I stop the app. I don't have to press and hold the power button to turn it off. This is with v0.3.1, I have not had a chance to try v0.3.2. I will soon to see if it works with connection type 3 as you stated it would need to previously.

Sent from my Streak 7 using witchcraft.
[Android General] wajih.boukaram:
It was inconsistently slow on all of them (as in sometimes the response is instant, sometimes it would lag a bit). This was with the fake controller (fully charged to be sure) and only with the analog stick. I tested them out for about 5 minutes.

The original is fine as far as I can see.
[Android General] sir_earl:
I experience this occasionally with my fake, including a 30 second period after the initial connect where no input registers at all, but it settles down after a minute or so. Not sure that there's anything that can be done. I could try messing around with link speeds, but it'll probably be hit and miss for different fakes.
[Android General] Weare138:
Has anyone had luck with a droid x2. I got mine connected and it works it just wont work with any key mappings on emulators
[Android General] cash_back:
I have the same problem, compatibility check works fine and it shows buttons registering, but when i go to bind them via key mappings in the emulators nothing works.
[Android General] sir_earl:
You need to explicitly turn on the input method within certain emulators. Namely Snesoid, N64oid and other *oid emulators.

Go to settings -> other settings and check "use input method".
[Android General] Weare138:
Ya i made sure i had those checked but same thing happens
[Android General] wyldstallyn:
same thing for me on the DX2. sixaxis is totally synced, but cant get it to control any of the emulators except up/down/left/right sometimes works with psx4droid. nothing else.
[Android General] VoodooXTC:
Evo 4G running CM7 7.0.3.1

My device passed the compatibility, I changed the Master, paired the control fine.

One problem though, everything works except for the Triangle, Square, X, Circle, and both right Triggers. I think i might need those somewhere down the line lol

Has anyone have this problem?

Thanks,

Awesome App :)
[Android General] tethtoril:
Works perfect on DHD with CM7.

But, when on Gensoid, 2 buttons the second controller dont work in game, but they do in the loading menus, i dont have the problem with a wii remote, so i dont think its emulator related. occasionally happens on first too.
[Android General] sir_earl:
Can everyone having the problem where only the left, right, up and down buttons are working let me know what type of controller they are using. I.e. Is it Sixaxis or DualShock 3, and is it an original controller or a clone.
[Android General] sir_earl:
To those experiencing the problem where they are using 2 controllers and some keys only work some of the time, could you please try going to Preferences->Input Mappings->2nd Controller mappings and change the problematic buttons to a different key binding. You may need to try a few until it works.
[Android General] wyldstallyn:
droid x2

dualshock 3 original/sixaxis original.

up/down/left/right only working(i believe with sixaxis - will re-confirm tonight)

and only works for me with psx4droid. no other emulators/programs recognize anything
[Android General] onthebridge:
First of all, i wanna thank you for this, i have been expecting it for ages :)

I have been reading the whole post and haven't encountered any reference about non original controllers.

Does anyone knows if they actually work?

Thanks!
[Android General] 0mie:
Try and let us know :) personally I buy all OEM controllers for my stuff...but that's just me
[Android General] onthebridge:
Right now mine is making its way to my house from China, and yes i will let you know when it comes if the answer hasn't aroused by then :)
[Android General] Weare138:
All the buttons work in the emulators main window but stop when i go to settings to try to add key mappings. Im using an original sixaxis controller
[Android General] equlizer:
Does this work with 3rd party wireless controllers?

EDIT: Works great with the sixaxis original controller on my Desire HD with CM7
[Android General] sketch2k278:
That didn't work so how do we restore the controller so we could use it for the system again?
[Android General] sir_earl:
That seems strange. Maybe try pressing the reset button on the back of the PS3 and try again. You may need a pencil or pen nib, as it's recessed.
[Android General] sketch2k278:
You mean the back of the controller? yup that did the trick lol, wonderful app by the way!!
[Android General] equlizer:
hope the next update you can map the analog sticks:o
[Android General] 0mie:
I've been able to use them to move around...
[Android General] sir_earl:
If nobody finds anything major between now and when I wake up, I'll upload the full app to Google Play.
[Android General] Trunkam:
i think your suggestion is what i was looking for :) what was happening to me was that sometimes id does not go back to center even if i 'm loving playing asphalt with your app.

thanks

it's a GO!

:)
[Android General] sir_earl:
It gets all the way to the special HID command and fails, which is where the fakes generally run into trouble. I'll upload another test build in a little while that skips straight to sending the Gasia HID command.
[Android General] lambstone:
I was trying to get sixaxis controller to work on my generic chinese android media player with bluetooth.

However, it is unable to start touch device which is needed for touch emulation. Do you reckon there is a workaround for devices without touchscreens to use the touch screen emulation? Games are able to work using the mouse cursor
[Android General] sir_earl:
You could try installing a '.idc' device configuration file into the /system/usr/idc/ folder. I know some people have managed to get it working on devices without touch screens by using this method.

Have a look at the documentation here:

http://source.android.com/tech/input/input-device-configuration-files.html

http://source.android.com/tech/input/touch-devices.html
[Android General] Larry94:
Hi, sir_earl. Do you think you could figure out a way to emulate these Android controllers out on the market such as the Moga? It works with newer gameloft games and it looks like trash. as well as being $80. :/
[Android General] sir_earl:
The issue with the Moga is that it's likely to be using a proprietary library that they're unlikely to like me using. Even if I could fake the interface, I'd still be worried about legal issues. I will probably look into it at some stage and see what would actually be involved, but I've got quite a few other things on my plate before I can get to that.
[Android General] lambstone:
Are those people on xda? I hope to be able to contact them to ask them how to go about doing that. I'm really not an android dev so I don't know how to port over touchscreens in the form of a idc file. I obtained an idc file from another forum and sixaxis still detects it as no touch screen.

EDIT: I just tested using the idc files from my s2 and still a no go.
[Android General] zenisnotchosen:
Tried updated app and I get FC right after it says Trying Connection Type 1... after pressing start. Compatibility Checker 0.3.2 worked fine just like 0.3.1.

Sent from my Streak 7 using witchcraft.
[Android General] spthacker:
Downloaded the updated app this morning and worked perfectly for me with a genuine ps3 controller and nexus7

Sent from my HTC One X
[Android General] sir_earl:
Just uploaded a fix. I recently made some changes to the starting mechanism of the service that was broken on some devices but not others (so I missed it on all my test devices). Doh!
[Android General] sir_earl:
Please try installing this version (it will only work with fakes) - If it's still not working for you, please send a new HCI dump.
[Android General] wajih.boukaram:
Hmm so the update does work with my fake controller, but the response is choppy at best and sometimes unresponsive. Is there any way you can make some of the settings that would affect performance available in some sort of Advanced menu in the app? That way we can tweak it ourselves for the controller that we're using.
[Android General] Rdnaskela:
Understood. Good luck with this.

In Checker 0.3.2 the last message is Client 0: DOWN - 3. So the answer is no.

BTW, for me it is not much of a problem, probably, for others that have the same gamepad as me also, because those can be shutdown by long press of P3 button. What I really wanted to hear is the answer for my last question about structures, even if the answer would be: I don't know.

Good luck with the development, hope you will make your program work with most sixaxis gamepads available on the market. As for me, I am almost finished with my own application that translates gamepad events the way I want it.
[Android General] sdemius:
Great work!!! Thank you! :good: Finally now my gamepad works. Disconnect works correct too, with output "client 1 disconnected".

I look forward to when the changes will be in the application on the Market. :)
[Android General] sir_earl:
Does the unresponsiveness remain even after a couple of minutes of waiting? My fake does this sometimes, but always comes right within a minute. I'll need to figure out what's causing this problem before I can think about exposing any advanced settings. I'll upload some test builds over the coming days that you can try out. I have a feeling it might be related to QoS (Quality of Service) commands, so I need to do some more studying of the spec.
[Android General] sir_earl:
The version on the market does an HCI disconnect followed by an HCI reset - is it still not working for you?

That's what I meant - even genuine controllers require you to hold down the power button to disconnect. I'll assume this is working correctly then.

The answer is I don't know, sorry - I have a vague intuition that the sock struct would be in kernel space, therefore probably not something you can mess around with from user space. There are some functions to interact with sockets such as setsockopt and getsockopt, but beyond that, I can't help you!

Any chance you could go into any more details about your project? I'm intrigued!
[Android General] sir_earl:
Interesting. I'll post another version soon that I'd like you to test - it will need to first try enabling genuine controllers, then wait for a little while and send the Gasia report if it doesn't hear back. Does the controller seem to be totally responsive?
[Android General] wajih.boukaram:
I tried using it under mouse emulation mode too, and the cursor would keep moving even after I physically let go of the button due to the lag.

I also tried it on several SNES emulators, but after five minutes of poor mario dying to my inability to control him properly :crying:, I decided to give it a break.
[Android General] sdemius:
Yes, everything seems to work fine.
[Android General] Rdnaskela:
After pressing stop button, terminal says

Attempting to close server...

Disconnected

But the controller stays on for about 20 seconds then turns off. So I have the choise either to wait 20 seconds or to hold P3 button for 10.

Well if genuine works that way then yes its is correctly working.

I just thought about the way Disconnect button works in MotioninJoy, where the controller turns off instantly. I was able to reproduce such behaviour only using:

# hcitool con
Connections:
> ACL 00:26:37:XX:XX:XX handle 1 state 1 lm MASTER
# hcitool cmd 0x01 0x0006 0x01
< HCI Command: ogf 0x01, ocf 0x0006, plen 1
01
> HCI Event: 0x0f plen 4
00 02 06 04

After running second command controller turns off. First one is needed to get the handle number, which is used as third parameter.

Main problem is when you have other connections, for this I needed to know if it is possible to get this handle number from socket file descriptor.

Thanks for answer! I really apreciate that. Now I will probably look for a workaround or just forget about this problem.

Well currently I have 3 projects related to Sixaxis controllers:

1) Server for the phone (analog of your application), which will use controller events to emulate:

* Xperia Play TouchPad

* TouchScreen presses (I am more thinking about constant press that even if the sticks are centered you still have your virtual fingers on the screen, with quick turn on/off using LThumb)

* Keys (Game keys, keyboard keys for compability with different games/programs)

* Mouse (Probably) (BTW good upgrade for your app: create mouse device only when you switch to mouse emulation mode and destroy device when you switch to other mode, this way many people won't have the cursor on their screens when it is not needed)

* Gamepad (I still need to figure out if my Xperia Pro (Stock 2.3.4) supports controllers' analog sticks (it emulates both of them as the directional pad keys, so now gamepad currently has 3x UP,DOWN,LEFT,RIGHT keys), will try with genuine DS3 later)

2) Client for the phone - emulates DS3 behaviour(currently Gasia) over Bluetooth. Ability to use phone as Sixaxis controller. Test with MotioninJoy are successful.

3) Pipe - this one runs on phone, listens to connections and creates connections to Server (MotioninJoy, PS3) so you can view all the data transfers between them (useful debugging tool).
[Android General] sir_earl:
I think that's all the person I helped had to do (install the idc file), so they wont be any more help.

You will probably also need to install a touch device under /dev/input/eventX. I think this is usually done with a kernel module, but there are other ways to achieve this. There is a good analysis found here.