VulcanSpider
Posts: 5
Joined: Sun Nov 27, 2022 7:41 pm

Installing Gertbot.

Sun Nov 27, 2022 8:36 pm

What's the trick getting Gertbot to install and run on the Raspberry Pi 3? We use one in our shop to control 4 trains on separate tracks in our shop window over Christmas. Earlier this year I had it displaying a video on a screen in the window. It wouldn't download anything in the Add/remove software when I was trying to install something. Bit of searching on the internet, my OS was no longer supported. Reinstalled the OS with Bullseye and got the video playing in the window. I made a copy of the files on the desktop to send commands to the Gertbot, so figured that should be ok. Setup the window yesterday, no Gertbot installed. The script files also didn't work. Managed to make the script files executable, but they complain that there's not enough space available or something and won't get the commands to the gertbot. Tried downloading Gertbot source code and installing, unable to install QT4 libraries. Downloaded the Gertbot Executable and tried running that, while it doesn't complain about anything, it doesn't start up a window, and just does nothing.

So now, we've got a Christmas winow, with a static train display, as I can't even run my original auto script to at least get the normal train setup working by bypassing the Gertbot software. Ticking me off big time, as last week I spent $330 on a DCC engine to have a go with some sounds etc as well.

Raspberry Pi is now sitting in time out in the car, I'll talk to it very sternly tonight. Better than it hitting the opposite wall, which was a distinct possibility this morning...

User avatar
neilgl
Posts: 5717
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Installing Gertbot.

Mon Nov 28, 2022 4:46 pm

Can you post the "original auto script to at least get the normal train setup working by bypassing the Gertbot software" ?

VulcanSpider
Posts: 5
Joined: Sun Nov 27, 2022 7:41 pm

Re: Installing Gertbot.

Mon Nov 28, 2022 9:34 pm

The Auto.sh is below, I've also Zipped up all of the files as an attachment.

======================
#!/bin/bash
sudo cp SetupFront /dev/ttyAMA0
echo SetupFront
sudo cp SetupRear /dev/ttyAMA0
echo SetupRear
sudo cp Setup3 /dev/ttyAMA0
echo Setup3
sudo cp Setup4 /dev/ttyAMA0
echo Setup4
while :
do
sudo cp FrontRight /dev/ttyAMA0
echo FrontRight
sleep 7
sudo cp 3left /dev/ttyAMA0
echo 3left
sleep 7
sudo cp RearRight /dev/ttyAMA0
echo RearRight
sleep 7
sudo cp 4left /dev/ttyAMA0
echo 4left
sleep 7
sudo cp FrontLeft /dev/ttyAMA0
echo FrontLeft
sleep 7
sudo cp 3right /dev/ttyAMA0
echo 3right
sleep 7
sudo cp RearLeft /dev/ttyAMA0
echo RearLeft
sleep 7
sudo cp 4right /dev/ttyAMA0
echo 4right
sleep 7
done
=======================================
Attachments
Gertbot files.zip
(2.35 KiB) Downloaded 7 times

User avatar
neilgl
Posts: 5717
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near The National Museum of Computing

Re: Installing Gertbot.

Tue Nov 29, 2022 3:25 pm

That script copies the contents of the files (e.g. SetupFront) to the pi serial port (on /dev/ttyAMA0) on the GPIO pins (i.e. using the pi uart). The Gertbot board is connected to the GPIO pins (in particular pins 14 and 15 - the TX/RX for the uart). The file contains various Gertbot commands as per section 6 and 7 of the manual "Each command must be preceded by the value 0xA0 and closed with the value 0x50." etc.
So, we need to enable the pi3 uart on GPIO. In a terminal, sudo raspi-config, Interface options, I6 Serial Port,
- Would you like a login shell to be accessible over serial? NO
- Would you like the serial port hardware to be enabled? YES
reboot, then check serial ports:

Code: Select all

ls -lah /dev/ser*
lrwxrwxrwx 1 root root 5 Nov 29 14:34 /dev/serial0 -> ttyS0
lrwxrwxrwx 1 root root 7 Nov 29 14:34 /dev/serial1 -> ttyAMA0
Now edit the Auto.sh and replace all /dev/ttyAMA0 with /dev/serial0
Run it and let us know what happens.
(tested on a pi3 running Bullseye but I dont have a Gertbot)

VulcanSpider
Posts: 5
Joined: Sun Nov 27, 2022 7:41 pm

Re: Installing Gertbot.

Thu Dec 01, 2022 3:57 am

Right, tried changing all that, no complaints about the missing space, but still no train movement. Downloaded the Gertbot manual, and made the changes to a couple of files, and changed back to ttyAMA0 and the script ran with no problems, but still no movement.

I'm wondering if it's down to a QT4 problem

From the Gertbot website:

The Jessie version no longer has the QT4 libraries. To install those use:
sudo apt-get install libqtgui4

Tried that, doesn't work, package not available, but is referred to by another package, but I can't find out what that is.

Is there another way of getting the libriries, or another version of linux that comes with it, as to be honest, Raspian is pissing me off and I need to get this display working n the window.

If I start up the executable version of Gertbot, nothing happens, no errors that I can see, it's like it ignores me clicking on it...
Attachments
QT4.jpg
QT4.jpg (191.34 KiB) Viewed 651 times

itsmedoofer
Posts: 607
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: Installing Gertbot.

Thu Dec 01, 2022 10:21 pm

Hi,

Try sudo apt install libqt5gui5...

Don't know if that will work but it seems to be the package name for 5....

I have a gertbot only ever used it a couple of times though....☹

VulcanSpider
Posts: 5
Joined: Sun Nov 27, 2022 7:41 pm

Re: Installing Gertbot.

Fri Dec 02, 2022 9:02 am

I installed the libqt5gui5, which I had managed to install already apparently, if I try qmake gertbot.pro, I get "Project ERROR: Unknown module(s) in QT: core gui"

No idea what that waffle means, other than more days down for the window display.

itsmedoofer
Posts: 607
Joined: Wed Sep 25, 2013 8:43 am
Location: Canterbury, Kent, UK

Re: Installing Gertbot.

Fri Dec 02, 2022 9:27 am

I really don't have any expertise here but have you tried installing qtbase5-dev, I think that will bring in all the qt furniture and may fix the missing module.....

VulcanSpider
Posts: 5
Joined: Sun Nov 27, 2022 7:41 pm

Re: Installing Gertbot.

Sun Dec 18, 2022 8:54 am

Well, I installed Raspberry Pi OS (Legacy), and reinstalled Gertbot again, I've at least got the Gertbot window starting up, I'll see what happens when I get to work tomorrow and plug it into the Gertbot and the rest of the train setup. Fingers crossed.

Return to “HATs and other add-ons”