Easy Automated Raspbian Image for using G27 as G29 with USB

Discuss everything to do with GIMX here
Dasato
Posts: 40
Joined: Thu Apr 07, 2016 6:54 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by Dasato »

superbalza wrote:I'm downloading the new image, and tomorrow I will try it!

I'm thinking about an improvement: it's easy to power up everything, just by plugging in the wheel power supply and the rpi power supply (or using one ps4 usb ports).

BUT

when I want to stop playing, is not a good idea to turn off the rpi by cutting the power supply (turning off the ps4 if you use a usb supply)... the sd card data can be corrupted!

SO

I read about a simple script that waits for a keyboard button combination and execute a command, like:
http://cagewebdev.com/index.php/raspber ... o-hotkeys/
and the command maybe could be a like: "sudo shutdown -r now"

BUT

if you use the rpi headless, you don't have a keyboard hooked on it!

BUT (i promise is the last one :lol: )

maybe you can use a wheel button combination instead a keyboard button combination... am I wrong?

Sorry for my english, and for my linuxish :lol:


UPDATE:

I made some test (in office, no wheel), and I found that you can use the command:

sudo nano ~/.config/openbox/lxde-pi-rc.xml

to edit the "interface" config file (if I understood correctly), and add a line like:

<keybind key="C-F7">
<action name="Execute">
<command>sudo shutdown -h now</command>
</action>
</keybind>

to bind for example, the Control + F7 key to shutdown the Rpi... and it works!

I discovered (for me everything in linux is a brand new discover), that with the command "xev" you can catch keypresses! The only thing remaining is to get home, hook the wheel, catch the button presses, create a button combination for shutdown, and voilà!
And you can use also button chains! Like you first press L1+R1, release, and then L2+R2, and it execute something!

Sono un fottuto genio :lol: :lol: :mrgreen: :mrgreen:
That could be extremely useful. I'm going to put the Pi behind PS4 with no other conection but the DIY, Wheel and DS4.
cortega1
Posts: 34
Joined: Wed Mar 30, 2016 3:34 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by cortega1 »

I've been just turning off the PS4 via the wheel (navigate to power options and turn off the system) and it hasn't corrupted my image yet. I'll let you guys know if that changes though. Even yesterday when I was running the test and played for 45+ minutes, I actually just left everything on and when my PS4 went into rest mode a couple hours after I had finished with my last race, it apparently cuts power to the USB for a second and turned off the RPi. I figure since my wheel went through both its normal startup calibrations shortly after the PS4 went into rest mode.

I am going to try connecting back to a PC to run GIMX to turn off my system and see at what point the PS4 disconnects itself from the GIMX program. I don't think the GIMX program has to do any reading from, or writing to the SD card after its been loaded into ram and is running (if you don't have it setup to keep a log), so I'm personally not too concerned about corrupting the image on my SD.
superbalza
Posts: 13
Joined: Fri Jan 29, 2016 2:52 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by superbalza »

Ok, I made some tests but nothing happened... with the "xev" command, there are no catches of the wheel in raspbian... I will keep trying!

BTW, I noticed a lot of difference between using a PC and a Rpi with GIMX, especially about force feedback! The FF with PC is smooth and realistic, while the FF with Rpi is stronger but really "strange"... Same car, same track, in a straight line with the Rpi the wheel pushes on one side or the another, like the FF is locked to one side... and I noticed that while in that state, the Rpi is at 100% cpu usage...
Am I wrong with some settings?
I have a DFGT
Dasato
Posts: 40
Joined: Thu Apr 07, 2016 6:54 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by Dasato »

Hi,

I've just received my PI3 and I've "burn" the image to the SD. I've put it into the PI but nothing happens, there are two leds on the PI, one stays on and the other one blinks a few times.

There is no signal at the TV and even the Ethernet is enabled, no led for link status at the Ethernet connector.

Is the imaga compatible with the Pi3? Have I done something wrong?

Regards
lukeyboi89
Posts: 1
Joined: Wed Apr 13, 2016 11:09 am

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by lukeyboi89 »

hi guys,

i am very new to this so have a couple of noob questions.

i will be using a raspberry PI version 1, with just the 2 USB slots.

so i know i have to plug the DS4 and G27 into this, so my question is how do you connect the PI to the DIY USB adapter as there will be no spare USB ports?

secondly, i am in the UK and it is hard to get hold of the teensy usb board as mentioned in the GIMX diy thread here

http://gimx.fr/wiki/index.php?title=DIY ... or_dummies

so what else can i use instead ?

thanks
cortega1
Posts: 34
Joined: Wed Mar 30, 2016 3:34 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by cortega1 »

superbalza wrote:Ok, I made some tests but nothing happened... with the "xev" command, there are no catches of the wheel in raspbian... I will keep trying!

BTW, I noticed a lot of difference between using a PC and a Rpi with GIMX, especially about force feedback! The FF with PC is smooth and realistic, while the FF with Rpi is stronger but really "strange"... Same car, same track, in a straight line with the Rpi the wheel pushes on one side or the another, like the FF is locked to one side... and I noticed that while in that state, the Rpi is at 100% cpu usage...
Am I wrong with some settings?
I have a DFGT
I haven't really notice a difference in force feedback between either of the PC's I used or the RPi setup. I am using a G27 which the image was originally created for, so it could be something with the implementation of the DFGT..? Another difference could be that I do keep the FFB settings below 50% because I don't like the notchy feel of the helical gears in the G27. (I turn my T300 up a lot more :D ) I run my RPi headless so that it doesn't use any CPU cycles trying to process video (which for all I know it could be doing anyway...).

Originally I was planning to look into running an RPi image in terminal mode (no GUI for less cpu cycles) and writing an autostart program myself, but ran into Waveforms image before I got a chance to give that a try, and his image worked "out of the box" for me. You could look into running in terminal mode, if the image isn't already setup to do so. (I have not clue because I haven't had any type of monitor hooked up to my RPi since using Waveforms image)
Dasato wrote:Hi,

I've just received my PI3 and I've "burn" the image to the SD. I've put it into the PI but nothing happens, there are two leds on the PI, one stays on and the other one blinks a few times.

There is no signal at the TV and even the Ethernet is enabled, no led for link status at the Ethernet connector.

Is the imaga compatible with the Pi3? Have I done something wrong?

Regards
This image probably won't work with your RPi3 since the new processor in it will most likely require the image to have a different kernel. You can just use one of the images provided by RPi.org ( :arrow: hopefully @ https://www.raspberrypi.org/downloads/) and just add the file Waveform mentioned on the first page to the designated location.

here is is...
Waveform wrote:How I set GIMX to AutoRun using G27_G29 config file:

I created the following directory:

/home/pi/.config/autostart

I created a file called GIMX.desktop with Nano in the directory.

The contents of GIMX.desktop is:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=GIMX
Comment=
Exec=gimx --nograb --config LogitechG27_G29.xml --port /dev/ttyUSB0
StartupNotify=false
Terminal=false
Hidden=false
There is also a file called X11VNC.desktop in the autostart directory for VNC to run.

I'm a Linux Noob so I just used google for the info, but it works!


In the future I would like to create an automated image for using the G27 over Bluetooth, but I need to order a dongle with the CSR8510 chip first.

I am using a Model B Raspberry Pi which only has 2 USB ports, so i think using the bluetooth method would be much neater.
lukeyboi89 wrote: ...
i will be using a raspberry PI version 1, with just the 2 USB slots.

so i know i have to plug the DS4 and G27 into this, so my question is how do you connect the PI to the DIY USB adapter as there will be no spare USB ports?

secondly, i am in the UK and it is hard to get hold of the teensy usb board as mentioned in the GIMX diy thread here

http://gimx.fr/wiki/index.php?title=DIY ... or_dummies

so what else can i use instead ?

thanks
You'll need a hub to connect at least two of the components to the RPi. The DS4 and G27 with be connected to the USB's on the RPi, like you mentioned. As far as your DIY adapter goes, you'll plug the USB 2.0 to UART end into the RPi, and the teensy (or alternative arduino) will be connected to a usb port on your PS4.

I'm in the US and just ordered mine from ebay, so you could always try to see if there is seller that ships to the UK. There is also a link to a site in the DIY adapter for dummies ( :arrow: @ http://pjrc.com/store/teensy_pins.html), and when I checked out postal cost, it did have a dropdown for the United Kingdom, so you might be able to order from that site. I went with the Teensy 2.0, since it had everything needed, was the smallest option, and it seemed to be the most straight forward to setup in my opinion. Literally most of the steps it had me do were to get me used to how to set it up.

I know nothing about arduino, so I can't really help with that, but if you check out the GIMX wiki ( :arrow: @ http://gimx.fr/wiki/index.php?title=DIY_USB_adapter), there is info under "3.2.1 Using the Arduino Builder tool" that should show you what you need to set it up for GIMX.
Dasato
Posts: 40
Joined: Thu Apr 07, 2016 6:54 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by Dasato »

Tanks Waveform.

I just installed Noobs and Raspbian after that. I've everything running but only for a while. After a few minutes the Wheel's LED begins to blink and it doesn't response. No FFB and none of the buttons work. All components are connected to the Pi3 so I suppose there is not enough power for everything; I’m using a tablet charger with about 2.0A output.

I’ve lot of LIBUSB_TRANSFER_TIMED_OUT at GIMX’s log, but lsusb looks normal with all components recognized.

One more tip for beginners, don’t do sudo raspi-update with PI3, then GIMX starts without and error but when red button’s wheel is pressed nothing happens.

Regards
cortega1
Posts: 34
Joined: Wed Mar 30, 2016 3:34 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by cortega1 »

Dasato wrote:Tanks Waveform.

I just installed Noobs and Raspbian after that. I've everything running but only for a while. After a few minutes the Wheel's LED begins to blink and it doesn't response. No FFB and none of the buttons work. All components are connected to the Pi3 so I suppose there is not enough power for everything; I’m using a tablet charger with about 2.0A output.

...
I remember hearing that its advised to use a 2.5A power supply with the RPi3.
cortega1
Posts: 34
Joined: Wed Mar 30, 2016 3:34 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by cortega1 »

I made a Youtube! I had major performance anxiety during the driving portion, so don't pay attention to that part :D . I showed how I connected the setup and its basic operations.

https://youtu.be/HjVOQaFLNDU

Check out at least the first 2 and a half minutes and let me know what you think.
minWi
Posts: 7
Joined: Sun Apr 17, 2016 5:18 pm

Re: Easy Automated Raspbian Image for using G27 as G29 with

Post by minWi »

Just in case, I had gimx working at boot also without X documented here http://gimx.fr/forum/viewtopic.php?f=3&t=1617

HTH!
Post Reply