GIMX on Raspberry Pi

General Chat, Feel Free To talk about anything here.
Post Reply
0uistyty
Posts: 54
Joined: Wed Nov 02, 2011 12:35 pm

Re: GIMX on Raspberry Pi

Post by 0uistyty »

I just ordered my Rasberry Pi board.
Just can wait to try this out !
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

tps wrote:
tps wrote: [ 1032.632610] Bluetooth: hci0 ACL packet for unknown connection handle 11
[ 1032.809612] Bluetooth: hci0 ACL packet for unknown connection handle 11
This looks like a kernel issue and I guess that's the reason you didn't recommend a newer version of Ubuntu. It seems I need a kernel update on Raspbian.
Same behavior with the latest Raspbian version from a couple days ago.
It seems this isse is several years old, nobody cared to find a fix for it, only workarounds are available.
Due to the use of gimx-bluetooth, no workaround would do.
This issue is in the linux kernel and on PI it might be related to the poor USB implementation.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX on Raspberry Pi

Post by Matlo »

tps wrote: It seems this issue is several years old, nobody cared to find a fix for it, only workarounds are available.
Could you give the source please ?
GIMX creator
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

Salut Matlo,
Meanwhile I have changed the BT dongle with the Hama and I still have an issue but the error is different.
The sources are several, Google spits out quite a few for "Bluetooth: hci0 ACL packet for unknown connection handle":
https://bugs.launchpad.net/ubuntu/+sour ... ug/1036401
http://forums.gentoo.org/viewtopic-t-92 ... art-0.html
http://www.linuxquestions.org/questions ... ed-496669/
Take your pick!

With Hama BT, I have "Bluetooth: hci0 link tx timeout", but there are other regarding "tx command timeout".
Not too many hits on this one but there's a discussion on Raspberry PI https://github.com/raspberrypi/linux/issues/66 and https://github.com/raspberrypi/firmware/issues/19

I guess this doesn't move because USB guys say it is BT stack issue, and BT stack guys say it is USB stack issue. The workarounds provided don't work in this context due to the way BT is used by GIMX. Not sure you could workaround this in the GIMX code, Matlo. It would be great if you could.

Tested with kernel 3.6 for raspbian and no luck on that either. It looks like 3.3 may have a fix, haven't tried yet because it needs back-porting all PI patches.
I have no solution so far considering patches or cmdline switches. With the patch on issue 66 I get a bit more gameplay: from 30sec to approx 2min but it is painful and useless.
I have ordered components for USB2Serial2USB but if the issue lies on USB, I'm screwed as I'll need to buy a PC too :-)=

Merci!
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: GIMX on Raspberry Pi

Post by Matlo »

Thanks, I will take a look asap.
GIMX creator
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

Merci Matlo, no rush. You've already done a great job with GIMX in the first place.
It would be great if we'd get it running properly on the PI. So far with BT it works great while it works. Any lag is quite acceptable and may only be an issue with fine-tuning some properties as there are a lot of interrupts generated by USB and/or SDHC gets in the way quite frequently. I'll give it a try with 'sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0' to see if that changes anything.
Let me know if I can help with anything. I also have access to an USB analyzer if that may be of any help but I guess you're covered. I'm volunteering for testing if needed as well and by the end of the week hopefully I'll be able to test the USB2Serial2USB option.

update: similar issue here http://www.raspberrypi.org/phpBB3/viewt ... 9&p=209327

Cordialement
McD0n3ld
Posts: 9
Joined: Mon Oct 29, 2012 8:30 am

Re: GIMX on Raspberry Pi

Post by McD0n3ld »

tps wrote:You mean that using gimx-serial and with that set-up the PS3 doesn't behave as having a sixaxis? Does it happen the same on a PC?
I'm willing to try the USB2Serial set-up with the PI but if that's the case then it may not make sense.
If I run GIMX like this:

Code: Select all

./consola/GIMX/core/emuclient --config default.xml --serial --port /dev/ttyUSB0 --sixaxis --precision 16 --refresh 16 --status --force-updates
it just goes crazy with buttons and axis. However, if I use this:

Code: Select all

./consola/GIMX/core/emuclient --config default.xml --serial --port /dev/ttyUSB0 --joystick --precision 16 --refresh 16 --status --force-updates
it works just fine.

Regards,
McD0n3ld
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

Salut Matlo,
An update to this: I've tried the 'dwc_otg.microframe_schedule=1 sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0' trick and I could get no BT timeout or other dmesg errors for BT, the behavior however is still there after approx 2min of gameplay.
About the behavior: it looks like when functionality breaks, the last movement event is repeated indefinitely (e.g.: the view spins indefinitely as if I was moving the mouse left or right indefinitely). I have found no way of recovering, even if I stop the emuclient the PS3 keeps spinning in the game.
I haven't have the time to dig in more but will do so this evening. I want to use hci tools to diagnose the BT dongle if possible. If you want some specific diagnostic I may run, please let me know.

About my set-up:
|rPI| <--> |PW-USB Hub1| <--> |PW-USB Hub2|
|rPI| <--> USB Keyboard
|PW-USB Hub1| <--> USB Mouse
|PW-USB Hub2| <--> USB BT Dongle (Hama)
|PW-USB Hub2| <--> PS3 Sixaxis
Note: I need to disconnect the Sixaxis after starting gimx-bluetooth because I get dmesg errors of USB reset for it. Anyhow, I believe it is only used to confirm the BT address (correct me if I'm wrong).
So it still looks like there is a USB power port issue but only for the Sixaxis since it tries to charge as soon as it is connected to an USB port.
I've measured the voltage between TP1 and TP2 and I have 5.00v stable.
Merci!
Last edited by tps on Tue Nov 06, 2012 8:29 am, edited 1 time in total.
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

McD0n3ld wrote:
tps wrote:You mean that using gimx-serial and with that set-up the PS3 doesn't behave as having a sixaxis? Does it happen the same on a PC?
I'm willing to try the USB2Serial set-up with the PI but if that's the case then it may not make sense.
If I run GIMX like this:

Code: Select all

./consola/GIMX/core/emuclient --config default.xml --serial --port /dev/ttyUSB0 --sixaxis --precision 16 --refresh 16 --status --force-updates
it just goes crazy with buttons and axis. However, if I use this:

Code: Select all

./consola/GIMX/core/emuclient --config default.xml --serial --port /dev/ttyUSB0 --joystick --precision 16 --refresh 16 --status --force-updates
it works just fine.

Regards,
McD0n3ld
Thanks for your feedback McD0n3ld!
I've received the USB to serial TTL converter and waiting for the minimus USB dev board (http://gimx.fr/forum/viewtopic.php?f=5&t=565)
I'll be able to test the serial option soon, hopefully. I'll let you know the behavior I get then.

Cheers!
tps
Posts: 29
Joined: Mon Oct 29, 2012 12:36 pm

Re: GIMX on Raspberry Pi

Post by tps »

tps wrote:Salut Matlo,
An update to this: I've tried the 'dwc_otg.microframe_schedule=1 sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0 dwc_otg.lpm_enable=0' trick and I could get no BT timeout or other dmesg errors for BT, the behavior however is still there after approx 2min of gameplay.
Tested again with both dongles and it seems the errors still appear in dmesg if I wait a bit longer.
For the Belkin I have:
lsusb: Bus 001 Device 012: ID 050d:0121 Belkin Components F5D5050 100Mbps Ethernet
dmesg:
Bluetooth: hci0 ACL packet for unknown connection handle 11
Bluetooth: hci0 ACL packet for unknown connection handle 11

For the Hama I have:
lsusb: Bus 001 Device 010: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
dmesg:
Bluetooth: hci0 link tx timeout
Bluetooth: hci0 killing stalled connection 00:0B:E4:54:4E:09
emu:
emu: error on data psm
cleaning up

Restarting the emu after any of these usually fails. I need to unplug/replug the dongle and restart gimx-bluetooth.
hciconfig query commands work even after the error.
It seems that the Hama dongle behaves better and I usually have a longer gameplay (2min) than with the Belkin (30-40sec).

Not sure what else I could try but hoping these issues are fixed from a Linux perspective as they should.
Meanwhile I'm waiting for the minimus to try the other (wired) option.
Post Reply