command line - can't connect (usb)

Need help? Ask here and someone will help
Post Reply
ghury1
Posts: 4
Joined: Fri May 08, 2015 11:21 am

command line - can't connect (usb)

Post by ghury1 »

Hello,

I am trying to control my ps3 through the terminal ( or ssh ).
I tested it through the launcher. And that all works perfect.

I have a Raspberry pi with Raspbian. and an sitecom bluetooth 4.0 usb adapter.

Here is some documentation for using GIMX through the command line: http://gimx.fr/wiki/index.php?title=Command_line

So i run this command: gimx -p /dev/ttyUSB0 --event "cross(255)"
but it doesn't connect.

when i use /dev/tty1 for example. it says connected but no controller detected.
So i guess i am using the wrong path.

But how can i find mine?

Thank you in advance.
ghury1
Posts: 4
Joined: Fri May 08, 2015 11:21 am

Re: command line - can't connect (usb)

Post by ghury1 »

or any other idea how to send controls through the terminal/ssh?
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: command line - can't connect (usb)

Post by Matlo »

Hello,

The problem with the bluetooth method is that the connection establishment takes a few seconds.
You can try the remote connection options.
Run a gimx instance acting as a server:

Code: Select all

gimx --src 127.0.0.1:51914 --type Sixaxis --bdaddr XX:XX:XX:XX:XX:XX
Replace XX:XX:XX:XX:XX:XX with your PS3 address.
Send commands using a gimx instance acting as a client:

Code: Select all

gimx --dst 127.0.0.1:51914 --event "cross(255)"
GIMX creator
ghury1
Posts: 4
Joined: Fri May 08, 2015 11:21 am

Re: command line - can't connect (usb)

Post by ghury1 »

Thank you! that worked. but when i try for example:
gimx --dst 127.0.0.2:51914 --event "left(255)"

Then it goes all the end to left. like 10 times ( in the main menu (
How do i prevent that? so it does just do one time left. I've tried playing with the values but ain't working for me.

Thank you in advance.
User avatar
Matlo
Posts: 5768
Joined: Wed Jul 06, 2011 7:01 am
Location: France
Contact:

Re: command line - can't connect (usb)

Post by Matlo »

Just execute the following command to release the button:

Code: Select all

gimx --dst 127.0.0.2:51914 --event "left(0)"
And make sure to wait enough time between the two commands so that the input isn't missed.
GIMX creator
ghury1
Posts: 4
Joined: Fri May 08, 2015 11:21 am

Re: command line - can't connect (usb)

Post by ghury1 »

oh yhea ofcourse, 255 just is keydown and 0 releases it.

this worked for me: gimx --dst 127.0.0.1:51914 --event "left(255)"; sleep 0.1; gimx --dst 127.0.0.1:51914 --event "left(0)"

Thank you very much! Will consider to donate some money.
Post Reply