The base of this guide will come from instructions you can get from https://github.com/Lucashsmello/GIMX-WebAPI
Start off by having a clean install on your Raspberry Pi
Make sure everything is updated by opening a terminal and typing the following
Code: Select all
sudo apt-get update
sudo apt-get upgrade
Code: Select all
git clone https://github.com/Lucashsmello/GIMX-WebAPI.git
Code: Select all
cd GIMX-WebAPI
Code: Select all
sudo apt install python3 python3-pip
sudo python3 -m pip install -U pip setuptools
sudo pip3 install -r requirements.txt
I opened a new terminal window or you can just go into the pi user directory and create a new directory and run the following
Code: Select all
mkdir install
wget https://github.com/Lucashsmello/GIMX-WebAPI/releases/download/0.7/installer.tar.gz
tar -xzf installer.tar.gz
Code: Select all
cd build
sudo dpkg -i gimx_7.12+-1_armhf_original.deb
sudo apt install –f
Code: Select all
sudo ./install.sh --install-dir /home/pi/install --dont-install-gimx
Now if you open the app on your phone you will have a option to choose a config file and start GIMX, if you click on the options button and select download config you can choose the ones you want to download. If it fails with a com.android.volley.servererror just follow the steps below.
You are going to create a directory for the config files and change the root password
Code: Select all
sudo passwd root
Code: Select all
su -l
mkdir .gimx
cd gimx
mkdir config
Share config directory over lan
If you want to have the option to exit your config files from another computer on your network you can install Samba and set it up to share your config directory.
Code: Select all
sudo apt-get install samba
sudo nano /etc/samba/smb.conf
[GiMX-Config]
path = /root/.gimx/config
browsable = yes
guest ok = yes
read only = no
force user = root
Safe and exit then restart Samba
Code: Select all
sudo service smbd restart
Onboard Uart
If you are planning on using the onboard uart as per instructions on the Wiki page you might find that the program will fail as its not detecting the port.
On the Raspberry Pi 3B+ the uart is ttyS0 so you have to create a symbolic link and set it to run on every boot.
To make the link and run the following to confirm
Code: Select all
sudo ln -s /dev/ttyS0 /dev/ttyUSB0
ls -lh /dev/ttyUSB0
Now press start and check if everything works, if it does make it run at boot by adding it to /etc/rc.local before the exit 0 line and saving the file.
Code: Select all
sudo nano /etc/rc.local
I decided to add two buttons as I am running a PoE Hat and dont want to leave my Pi on all the time nor do I want to constantly unplug the lan cable to start it.
I started by editing the /boot/config.txt file and added
Code: Select all
dtoverlay=gpio-shutdown,gpio_pin=17,active_low=1,gpio_pull=up
You can use any of the unused GPIO pins just make sure you change the number to the correct one. For reference you can use google to check GPIO header but GPIO 17 is Pin 11 on the 3B+
To start it from standby I used the RUN pin that's next to the PoE header.
Wiring wise all you need to do is add two momentary buttons from ground to the selected pins.
Trouble Shooting
After performing a update you are unable to connect to the Pi from your app
This is normally cause by another app using port 80 (normally apache web server) the solution is to edit the following file and changing the port number back to 51916
Code: Select all
sudo nano /etc/systemd/system/gimx-web.service
Code: Select all
sudo service gimx-web restart
The following is taken from the Wiki I just wanted to add them here to make it easier for people.
1. When using the onboard uart don't forget the voltage divider https://gimx.fr/wiki/index.php?title=RP ... _interface
2. Remember to add init_uart_clock=8000000 to /boot/config.txt (this is only when using the onboard uart)
3. If your mouse stutters edit /boot/cmdline.txt and set your polling rate usbhid.mousepoll=1 , the value can be 0-10 you can experiment to find one best suited to your setup. Remember to save file and reboot
4. Kill the Triggerhappy service
Code: Select all
sudo update-rc.d triggerhappy disable
That's it from me I hope this helps someone.
I just want to thank everyone involved in this project you guys are the best