Raspberry Pi 4b and Picochess

1,165 views
Skip to first unread message

Scally

unread,
Jul 1, 2019, 10:34:27 AM7/1/19
to PicoChess
Hi all,

I’ve been attempting to get my new Raspberry Pi 4b working with Picochess and am having a couple of problems.
The First is with Bluetooth* connectivity the second with part speech, both using the new Raspbian Buster that the RPi 4b requires. The Bluetooth problem is intermittent on the RPi 3b+ running Buster.

*This could be that Lucas needs to supply a patch to dgtpicom and dgtpicom.so as was needed when the RPi 3b+ was introduced?

Basically I backed up my Picochess micro sd card using RPi Clone, then inserted my backup micro sd card and converted it from Stretch to Buster, which took 80+ minutes on my RPi 3b+ with cooling fan on.
(I will supply the method once it’s fool proof and the problems are fixed)

After the conversion and clean up, I needed to update the requirements in the Picochess folder, as several requirements were missing. Picochess then started ok, but I couldn’t connect to my Rev2 via Bluetooth. I removed my Rev2 from bluetoothctl and re-paired it and was able to connect, however I was back to the partial speech problem from a few weeks back. I knew how to fix that, but I wanted to try the micro sd card in my RPi 4b first. It booted fine but I couldn’t get it to connect to my Rev2. Like a couple of weeks ago I started back tracking through RPi-update to no avail with fixing speech. As soon as back tracked past the update for the the RPi 4b, it failed to boot, as expected. This update is 4.19.55 whereas the update for fixed speech is 4.19.36.

I placed the micro sd card back in my RPi 3b+ and it booted fine, I then back tracked RPi-update to 4.19.36 and speech returned. I’m still having intermittent problems with Bluetooth, hopefully Lucas can fix this.

Even once Bluetooth is fixed, we will still have the partial speech problem, so updating to Buster and using the RPi 4b for Picochess is currently not advised.


Cheers,

Al.






Lucas van der Ploeg | DGT

unread,
Jul 1, 2019, 11:31:34 AM7/1/19
to PicoChess
Hi all,

About the bluetooth:
I did find a good way to setup a Bluetooth connection from python. What I did was starting bluetoothctl and simulating key presses to control it. If anything has changed in bluetoothctl this probably won't work any longer and you have to setup the Bluetooth connection by hand. Can you connect by hand using bluetoothctl and start picochess with the correct port in the command line?

If you would want to replace the pi 3 with a pi 4 in your DGT Pi I see another problem. There used to be an I2C slave device on GPIO 18 and 19 (alt 3). We need this for direct communication to the DGT3000. Unfortunately it is no longer there. In fact I cannot find any I2C slave device on the new Pi 4.

Kind regards,

Lucas
--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/57f15735-b637-405b-98d5-784de1bbeadd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Al

unread,
Jul 1, 2019, 11:52:03 AM7/1/19
to PicoChess
Hi Lucas,

I’m out at the moment. I did try to connect manually, it worked 1 in 4 on the RPi 3b+ using Buster, but would not connect on the RPi 4b that’s why I thought you may to change something in those 2 dgtpicom files?

Here’s the output from /proc/cpuinfo

pi@RPi-4b:~ $ cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 1
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 2
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

processor : 3
model name : ARMv7 Processor rev 3 (v7l)
BogoMIPS : 108.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xd08
CPU revision : 3

Hardware : BCM2835
Revision : c03111
Serial : 10000000105c2285
pi@RPi-4b:~ $

Al.

Lucas van der Ploeg | DGT

unread,
Jul 2, 2019, 3:53:00 AM7/2/19
to PicoChess
Hi,

The dgtpicom files are for direct communication with the DGT3000. They have nothing to do with Bluetooth. The Bluetooth connection script is in dgt/board.py _open_bluetooth

Kind Regards,

Lucas
--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/f04f910d-94bb-4c01-a491-e42bf158ecad%40googlegroups.com.

Scally

unread,
Jul 2, 2019, 4:37:39 AM7/2/19
to PicoChess
Hi Lucas,

Thanks for the clarification, I must have miss-understood this fix for the RPi 3b+:

https://github.com/jromang/picochess/issues/272

However, with the voice problems on a normal RPi 4b (which must be on Raspbian Buster) and the connectivity problems with the DGT Pi with a RPi 4b within, it’s looking as though we will have to remain with Raspbian Stretch and a RPi 3b+ or lower.


Al.

Lucas van der Ploeg | DGT

unread,
Jul 2, 2019, 6:03:26 AM7/2/19
to PicoChess
Good news,

According to: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf page 10 there is no longer an I2C slave device on the pi 4. However there are 4 unused pin-function combinations. According to https://github.com/RPi-Distro/raspi-gpio/blob/master/raspi-gpio.c these pins do contain the I2C slave device! So with some changes in software and moving the wires to different pins it should be possible to us a pi 4 in a DGT Pi. Some mechanical modification to fit the new connector locations would be necessary.

I don't know yet about the Bluetooth and voice, but this should also be fixable.

Best regards,

Lucas



-----Original Message-----
From: pico...@googlegroups.com [mailto:pico...@googlegroups.com] On Behalf Of Scally
Sent: 02 July 2019 10:38
To: PicoChess <pico...@googlegroups.com>
Subject: RE: Raspberry Pi 4b and Picochess

--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/e417aae0-7aef-4125-9f26-dc97978dff42%40googlegroups.com.

Scally

unread,
Jul 2, 2019, 6:21:59 AM7/2/19
to PicoChess
Thanks Lucas,

Sounds promising, yes the swapping of the Ethernet and USB ports will require a case modification.


Al.

Claude

unread,
Mar 31, 2020, 5:26:05 PM3/31/20
to PicoChess
Hi Lucas,
I just installed a Pi 4 with my new DGT Smart Board and DGT 3000, tried to install the DGT Pi cable but it didn't work. After checking the problem and following different discussions and githubs, I landed here and saw that you already analyzed the problem and suggested a solution. Meanwhile were you able to do the necessary modifications to the DGTPI libraries? Is there a version ready for the Pi 4?
Best regards
Claude


On Tuesday, July 2, 2019 at 12:03:26 PM UTC+2, Lucas van der Ploeg wrote:
Good news,

According to: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2711/rpi_DATA_2711_1p0_preliminary.pdf page 10 there is no longer an I2C slave device on the pi 4. However there are 4 unused pin-function combinations. According to https://github.com/RPi-Distro/raspi-gpio/blob/master/raspi-gpio.c these pins do contain the I2C slave device! So with some changes in software and moving the wires to different pins it should be possible to us a pi 4 in a DGT Pi. Some mechanical modification to fit the new connector locations would be necessary.

I don't know yet about the Bluetooth and voice, but this should also be fixable.

Best regards,

Lucas



-----Original Message-----
From: pico...@googlegroups.com [mailto:pico...@googlegroups.com] On Behalf Of Scally
Sent: 02 July 2019 10:38
To: PicoChess <pico...@googlegroups.com>
Subject: RE: Raspberry Pi 4b and Picochess

Hi Lucas,

Thanks for the clarification, I must have miss-understood this fix for the RPi 3b+:

https://github.com/jromang/picochess/issues/272

However, with the voice problems on a normal RPi 4b (which must be on Raspbian Buster) and the connectivity problems with the DGT Pi with a RPi 4b within, it’s looking as though we will have to remain with Raspbian Stretch and a RPi 3b+ or lower.


Al.

--
You received this message because you are subscribed to the Google Groups "PicoChess" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pico...@googlegroups.com.

Lucas van der Ploeg | DGT

unread,
Apr 1, 2020, 7:32:38 AM4/1/20
to PicoChess

Hi,


I have made some changes to enable the I2C slave on the pi 4. These changes should work in theory, can you test them for me?


Replace the two attached files in /opt/picochess/dgt


Also move these wires:

- pin 12 BCM 18 to pin 19 BCM 10 (I2C slave SDA, green)

- pin 37 BCM 19 to pin 23 BCM 11 (I2C slave SCL, gray)

Keep these wires the same:

- pin 1 3V3 Power (VCC, red)

- pin 3 BCM 2 (I2C master SDA, blue)

- pin 5 BCM 3 (I2C master SCL, yellow)

- pin 9 Ground (GND, black)

see https://pinout.xyz, double check your work, you can destroy your pi by connecting to the wrong pins.


let me know if this works!


regards,


Lucas



From: pico...@googlegroups.com <pico...@googlegroups.com> on behalf of Claude <clwe...@gmail.com>
Sent: 31 March 2020 23:26:05
To: PicoChess
Subject: Re: Raspberry Pi 4b and Picochess
 
To unsubscribe from this group and stop receiving emails from it, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/1eef5afb-06fe-41d1-bf0f-5917847b82f2%40googlegroups.com.
dgtpicom
dgtpicom.so

Lucas van der Ploeg | DGT

unread,
Apr 2, 2020, 1:54:55 PM4/2/20
to PicoChess

Hi everyone,


Claude has tested for me and it looks like Picochess can now talk directly to the DGT 3000 from a Raspberry Pi 4b+.

Attached is the correct version, it should also still work on any other existing pi. For older pi's you still need to connect the wires the old way.


Enjoy!


Lucas


From: Lucas van der Ploeg | DGT
Sent: 01 April 2020 13:32:30
dgtpicom
dgtpicom.so
Message has been deleted

Eric Singer

unread,
Apr 26, 2020, 4:38:04 PM4/26/20
to PicoChess
HI,

It's been a long time since I posted in this group, however I just bought a Raspberry Pi 4B and was trying to get Picochess to work with it.  I loaded the most recent Raspbian Buster full Picochess image on an Micro SD.   I can get it to work fine on my DGT PI, however when I run the same image on the Pi 4B I'm having bluetooth problems connecting to my DGT e-board.

If I try to connect via the Bluetooth GUI.  It comes up with "Connection failed - No usable service on this device" when I try to connect.

If I try to connect via bluetoothctl, I get "Failed to connect: org.bluez.Error.NotAvailable"

[bluetooth]# devices
[bluetooth]# scan on
Discovery started
[CHG] Controller DC:A6:32:6C:27:B5 Discovering: yes
[NEW] Device 67:16:AE:DA:22:C3 67-16-AE-DA-22-C3
[NEW] Device 00:06:66:04:FD:17 DGT_BT_20336
[bluetooth]# pair 00:06:66:04:FD:17
Attempting to pair with 00:06:66:04:FD:17
[CHG] Device 00:06:66:04:FD:17 Connected: yes
Request PIN code
[agent] Enter PIN code: 0000
[CHG] Device 00:06:66:04:FD:17 UUIDs: 00001101-0000-1000-8000-00805f9b34fb
[CHG] Device 00:06:66:04:FD:17 ServicesResolved: yes
[CHG] Device 00:06:66:04:FD:17 Paired: yes
Pairing successful
[DGT_BT_20336]# trust 00:06:66:04:FD:17
[CHG] Device 00:06:66:04:FD:17 Trusted: yes
Changing 00:06:66:04:FD:17 trust succeeded
[CHG] Device 00:06:66:04:FD:17 ServicesResolved: no
[CHG] Device 00:06:66:04:FD:17 Connected: no
[bluetooth]# connect 00:06:66:04:FD:17
Attempting to connect to 00:06:66:04:FD:17
[CHG] Device 00:06:66:04:FD:17 Connected: yes
[CHG] Device 00:06:66:04:FD:17 ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:06:66:04:FD:17 ServicesResolved: no
[CHG] Device 00:06:66:04:FD:17 Connected: no
[bluetooth]# 
[bluetooth]# quit

Eric 

Scally

unread,
Apr 26, 2020, 5:16:09 PM4/26/20
to PicoChess
Hi Eric,

Is that a Revelation II you’re trying to connect to?

Anyway regardless, this should do the trick:

sudo crontab -e
Add this line to the bottom and save:
@reboot /bin/echo -e  'remove 00:06:66:04:FD \nquit' | bluetoothctl

This will then be actioned on every boot and your board should connect

or instead of the above and before you reboot just type: echo -e 'remove 00:06:66:04:FD \nquit' | bluetoothctl


Cheers,

Al.




Eric Singer

unread,
Apr 26, 2020, 6:59:03 PM4/26/20
to PicoChess
Hi Al,

I now have both an DGT Bluetooth e-Board and a Revelation II.   I can't get either to connect so far.

I placed these in the crontab

# Remove the bluetooth pair of the DGT e-Board
@reboot /bin/echo -e  'remove 00:06:66:04:FD:17 \nquit' |  bluetoothctl
# Remove the bluetooth pair of the DGT Revelation II
@reboot /bin/echo -e  'remove 00:06:66:49:1B:1E \nquit' |  bluetoothctl

However that didn't work.  On reboot Bluetooth doesn't scan for any devices.

[bluetooth]# devices
[bluetooth]# scan on
Discovery started
[CHG] Controller DC:A6:32:6C:27:B5 Discovering: yes
[NEW] Device 64:10:83:42:81:E8 64-10-83-42-81-E8
[NEW] Device 00:06:66:04:FD:17 DGT_BT_20336
[NEW] Device 00:06:66:49:1B:1E PCS-REVII-011025

I'm wondering if the fact the devices aren't scanned on boot up is the issue.

Thanks!
Eric

Scally

unread,
Apr 27, 2020, 12:33:54 AM4/27/20
to PicoChess
Hi Eric,

Good move on disabling both devices on boot, however don’t have both boards switched on together that will confuse the BT connectivity. Also you need dgtpi = False or comment out # dgtpi = True with the # in front within your picochess.ini file when not using the DGT Pi, i.e. when using the stand alone RPi 4.

I have a video showing me switching from a DGT Pi to a RPi 4 on another thread, I’ll find the link and forward it on.

I don’t have a separate DGT board just the superb Rev2, which depending which software version you have, can emulate the DGT Pi button presses.


Cheers,

Al.

Scally

unread,
Apr 27, 2020, 12:41:01 AM4/27/20
to PicoChess
..... RPi 4 pics & video of my switch from DGT PI to RPi 4:

https://www.dropbox.com/sh/hi06dymwlgcqdqb/AADJKU48tPM6iAGK7drrg_cZa?dl=0

Al.

Dirk

unread,
Apr 27, 2020, 2:07:16 AM4/27/20
to PicoChess

Hello Eric,


I also have an REV2 and eBoard and can confirm that there is still a severe problem with the bluetooth connection on a RPI4 with both of these devices.

With my system in less than 50% of the tries only a connection can be established, during the other 50% it does not work and I have to restart the PI4 to try again.

And it is definitely not (only) a software issue because the same SD card image in a (external) PI3 and 3B+ do work without any problems (and Al's fix did not help in my case either).

The problem sees to be that in 50% the bluetooth service is not running correctly (or has been stopped during the boot procedure) because in those cases when connection could not been established I could not run 

sudo bluetoothctl

The PI4 just hangs up when executing this command in these cases.

I googled the problem  and indeed you can find some threads about this issues - some could be fixed by switching off WIFI (not an option for me), some did a complete new installation (I tried that already - no success, it still fails 50% of the time.


Even with newest firmware it does not work and I tried lots of older firmwares which should be better for bluetooth bist also no success unfortunately :-(


Dirk

Eric Singer

unread,
Apr 27, 2020, 6:32:58 AM4/27/20
to PicoChess
Hi Dirk and Al,

I finally have Rev II working with Picochess on the Raspberry 4B.   Dirk as you mentioned, sometimes it completely fails to connect.   When that happens, I execute systemctl and I see the service hciuart has failed.  Starting it using ""Osystemctl start hciuart" fixes it.  Other times hciuart is running fine, but it doesn't connect.   That's when the old pairing still exists and that's when I remove it using Al's "/bin/echo -e  'remove 00:06:66:49:1B:1E \nquit' |  bluetoothctl" and it pairs with the Rev II and all is well.

So yes, there's definitely something wrong with the bluetooth connectivity with the Pi 4B.

There might be a way to script all this and make it seamless.   I'll see what I can come up with.

Thanks for you help!
Eric


Scally

unread,
Apr 27, 2020, 8:14:51 AM4/27/20
to PicoChess
Hi Eric,

I’m glad it works .... sometimes.

I often knock up bash files or scripts to make things easier, like to switch between Picochess versions or engine folders.

What version software version is your Revelation II and what emulations do you have? I’m on v3.33M and have everything. I know a later version is out but I’ve yet to contact Ruud.


Cheers,

Al.

Eric Singer

unread,
Apr 27, 2020, 8:38:02 AM4/27/20
to PicoChess

Hi Al,

We already had this conversation on Hiarcs forum LOL

http://www.hiarcs.net/forums/viewtopic.php?t=9923&postdays=0&postorder=asc&start=15

Wow, I just discovered Picochess still has my old bluetooth script in /opt/picochess/scripts/pico_dgt_bt.sh

I don't really know why it's even included anymore.  It looks list the Python scripts in /opt/picochess/dgt are doing the job now.

Eric

Dirk

unread,
Apr 27, 2020, 8:53:32 AM4/27/20
to PicoChess
Hello Eric,

good hints regarding the BT problems:

When connection failed and I type

sudo systemctl start hciuart

and eventually Al's hack removing the RevII BT address it works and connection is established.


Hmm - a script solution for this would be perfect (then we wouldnt have to restart the PI4 so often ;-)

I tried to add the lines to 
sudo nano /etc/rc.local


...

systemctl start hciuart

/bin/echo -e  'remove 00:06:66:65:83:6C \nquit' | bluetoothctl

exit 0


with no better result.

Also, adding the line

systemctl start hciuart

to the crontab script had no success...


But I am not a scripting guy ;-)


Dirk

Eric Singer

unread,
Apr 27, 2020, 9:15:04 AM4/27/20
to PicoChess
Hi Dirk,

I can script, just never really wrote anything in Python before.  I've been meaning to learn Python and maybe this is a good excuse...

However in the meantime, I'll see if I can write a shell script to solve this for the moment. 

Eric

Eric Singer

unread,
Apr 27, 2020, 2:09:43 PM4/27/20
to PicoChess
Here's a script I created that you can try for fixing the bluetooth issues

Copy the script into /opt/picochess/scripts
Make it executable using sudo chmod 755 /opt/picochess/scripts/fix_bluetooth_4b.sh
Edit the root crontab by sudo crontab -e
Add this line at the bottom of the crontab @reboot /opt/picochess/scripts/fix_bluetooth_4b.sh 1>/opt/picochess/logs/fix_bluetooth_4b.log 2>&1

The script logs it's execution in /opt/picochess/logs/fix_bluetooth_4b.log 
I made an assumption that all the DGT computers/boards have a beginning MAC address of 00:06:66 If that's not the case, then I can change it to look for DGT and REVII instead.

Hope this helps,
Eric
fix_bluetooth_4b.sh

Dirk

unread,
Apr 27, 2020, 2:22:11 PM4/27/20
to PicoChess
Eric, you the man!!!!!!!

That looks really good - tried it a few times and each time connection could be established!!!!!!!!!!!!!!!!!

You don't know what (or you probably know) what pain it was to restart several times until BT finally worked and this has caused big headache for me because the PI4 is my main machine already for running picochess (and this is absolutely necessary for mame engines etc.).

Thanks you sooooooooo much, Eric!


Regards
Dirk

Dirk

unread,
Apr 27, 2020, 2:23:33 PM4/27/20
to PicoChess
And yes: my REV2 and eBoard both start with MAC address  00:06:66 !

Thanks for the script!

Scally

unread,
Apr 27, 2020, 2:29:02 PM4/27/20
to PicoChess
Hi Eric,

I just applied your script to my RPi 3b+ in my DGT Pi.
The BT connectivity is now instant, great stuff.

I’ll apply this to my Raspberry Pi 4b when I next switch it on.


Thanks,

Al.

Eric Singer

unread,
Apr 27, 2020, 2:45:20 PM4/27/20
to PicoChess
Great Al,

It's should work fine with the 4B too.   Unfortunately I'm not a Python programmer (not yet at least).  So it really should be incorporated in the standard bluetooth scripts for Picochess.  This is just a bandaid.

Eric


Scally

unread,
Apr 28, 2020, 10:18:23 AM4/28/20
to PicoChess
Hi Eric,

Yes, my RPi 4b is fine too, but it did connect before.


Thanks,

Al.

DJ Dekker

unread,
Apr 29, 2020, 3:50:15 AM4/29/20
to PicoChess
Hi Eric,

Thanks for your scripting work!

I was hoping that your script would also solve another Bluetooth connectivity problem. My DGTPi won't reconnect to the Bluetooth board when waking up from standby mode (after pressing the on/off button the DGTPi does not shut down or reboot, but remains standby; see systemctl isolate dgtistandby.target in line 240 of /opt/picochess/utilities.py). It will only auto-reconnect after removing the Bluetooth connection manually with bluetoothctl.

Although your script does not solve this particular issue, it probably does point in the direction of a solution.

Greetings,
DJ


Op maandag 27 april 2020 20:09:43 UTC+2 schreef Eric Singer:

Eric Singer

unread,
Apr 29, 2020, 7:22:02 AM4/29/20
to PicoChess
Hi DJ,

I just started learning Python as of yesterday, so it'll take me a little while to get up to speed with it.   If the problem you're describing is similar, then the key is finding the bluetooth device that's paired and checking the connection status.  If it's connected then all is good, if not connected then remove the device and go through the pairing again.

So far Python looks pretty straight forward.   I'll look at the code session you're talking about and see if I understand it.

Thanks,
Eric

Eric Singer

unread,
Apr 29, 2020, 7:20:27 PM4/29/20
to PicoChess

Hi DJ,
Could you  give me some steps to go by?   I'm having problems reproducing the issue you're describing.

Al,
Don't know how to explain it right now, but you're correct, the startup time did decrease noticeably with my script. 

Getting a little further with Python,  I'm pretty close to being able to follow the code.

Eric

DJ Dekker

unread,
Apr 30, 2020, 4:01:52 AM4/30/20
to PicoChess
Hi Eric,

I'm using the Picochess 2.01 image for DGTPi that Tom posted in https://groups.google.com/forum/#!topic/picochess/kRj0vU1QlYA.
  1. Start the DGTPi — it connects correctly with the Bluetooth board.
  2. Then press the power button on the DGTPi — it goes into standby mode and the green Bluetooth light on the board starts flashing (connection lost).
  3. Now press the power button on the DGTPi again — it wakes up from standby mode, but keeps displaying "no e-Board" and the Bluetooth light keeps flashing.
  4. To restore the Bluetooth connection, issue bluetoothctl at the command line and remove the board manually — only now DGTPi sees the board as a "new" device and reconnects.
Somehow it should be possible to remove the Bluetooth connection automatically before the DGTPi goes into standby mode, so that it sees the board as a new device automatically when it wakes up.

Greetings,
DJ


Op donderdag 30 april 2020 01:20:27 UTC+2 schreef Eric Singer:

Eric Singer

unread,
Apr 30, 2020, 8:18:54 PM4/30/20
to PicoChess
Attached is a new version of my bluetooth fix script, I found a couple of mistakes and I corrected them.
fix_bluetooth_4b.sh

Eric Singer

unread,
Apr 30, 2020, 8:21:59 PM4/30/20
to PicoChess
Hi DJ,

I was able to reproduce the problem.   If you can find the correct place to run it, my fix_bluetooth_4b.sh will solve your problem.   

I'm not sure where to place scripts that need to be run after it comes out of the sleep mode.

Eric

Eric Singer

unread,
May 11, 2020, 8:24:59 AM5/11/20
to PicoChess

Here's a new version of my Raspberry Pi 4 Bluetooth fix script.   Now written in Python.

Copy the script into /opt/picochess/scripts
Make it executable using sudo chmod 755 /opt/picochess/scripts/fix_bluetooth_4b.py
Edit the root crontab by sudo crontab -e
Add this line at the bottom of the crontab @reboot python3 /opt/picochess/scripts/fix_bluetooth_4b.py 1>/opt/picochess/logs/fix_bluetooth_4b.log 2>&1

The script logs it's execution in /opt/picochess/logs/fix_bluetooth_4b.log 

I tried reading the _open_bluetooth function in the /opt/picochess/dgt/board.py  in hopes that I could fix things there, however it's going to take me more time to understand that code.

Eric
fix_bluetooth_4b.py

Etienne

unread,
May 31, 2020, 4:25:56 AM5/31/20
to PicoChess
Hello Al,
Pi 3B is working very well so does moving to 4B make sense? I guess 2gb would be good enough?
What is your thought on the benefits?
All the best,
Etienne

Le lundi 1 juillet 2019 16:34:27 UTC+2, Scally a écrit :
Hi all,

I’ve been attempting to get my new Raspberry Pi 4b working with Picochess and am having a couple of problems.
The First is with Bluetooth* connectivity the second with part speech, both using the new Raspbian Buster that the RPi 4b requires. The Bluetooth problem is intermittent on the RPi 3b+ running Buster.

*This could be that Lucas needs to supply a patch to dgtpicom and dgtpicom.so as was needed when the RPi 3b+ was introduced?

Basically I backed up my Picochess micro sd card using RPi Clone, then inserted my backup micro sd card and converted it from Stretch to Buster, which took 80+ minutes on my RPi 3b+ with cooling fan on.
 (I will supply the method once it’s fool proof and the problems are fixed)

After the conversion and clean up, I needed to update the requirements in the Picochess folder, as several requirements were missing. Picochess then started ok, but I couldn’t connect to my Rev2 via Bluetooth. I removed my Rev2 from bluetoothctl and re-paired it and was able to connect, however I was back to the partial speech problem from a few weeks back. I knew how to fix that, but I wanted to try the micro sd card in my RPi 4b first. It booted fine but I couldn’t get it to connect to my Rev2. Like a couple of weeks ago I started back tracking through RPi-update to no avail with fixing speech. As soon as back tracked past the update for the the RPi 4b, it failed to boot, as expected. This update is 4.19.55 whereas the update for fixed speech is 4.19.36.

I placed the micro sd card back in my RPi 3b+ and it booted fine, I then back tracked RPi-update to 4.19.36 and speech returned. I’m still having intermittent problems with Bluetooth, hopefully Lucas can fix this.

Even once Bluetooth is fixed, we will still have the partial speech problem, so updating to Buster and using the RPi 4b for Picochess is currently not advised.


Cheers,

Al.






Scally

unread,
May 31, 2020, 5:06:00 AM5/31/20
to PicoChess
Hi Etienne,

You attached an old post there.

Bluetooth, speech and everything is working with a stand alone RPi 4, so go with what you’re happy with, it eally doesn’t need the extra ram.

I bought another RPi 4 revision 1.2, with 4gb ram and was going to try and fit it in my DGT Pi. It arrived yesterday, but I fitted into my geekworm chassis with SSD boot and took out the original RPi 4 4gb (original not v1.2) to use that instead, however I spotted a small case on Amazon with a fan for £5.99 and ordered it. It arrived the same day and I really like it, it slots under my Rev2, so I don’t need the DGT Pi really, although I love the limited edition colour match with my Rev2. My Rev2 emulates the DGT Pi buttons, so I don’t really need it.

So I’m undecided myself.

What annoyed me was that 1 day after I ordered my revision 1.2 4gb version, the 8gb was announced. I might buy that as my SSD boot Pi 4, and then try the other one in the DGT Pi. I know the connectors are different so I may have to modify it slightly. My Geekworm chassis with 256gb drive SSD boot (no sd card) was initially for all my backups, rather the all the extra sd cards lying around, but it soon became my main RPi to compile MESS for MAME. This 2GHz overclocked with 4gb ram version does this in just over 2 hrs, whereas my RPi 3b+ took over 24 hrs. So this should benefit again with the the extra RAM. Picochess itself shouldn’t need it.

Anyway I digress, I’ll post pictures of my Geekworm chassis, my original DGT Pi setup and my small case with RPi 4 inside next ....


Al.
Message has been deleted

Scally

unread,
May 31, 2020, 5:25:42 AM5/31/20
to PicoChess

Pictures attached;


Geekworm chassis, with RPi 4 + 256gb ssd boot


DGT Pi (RPi 3b+) matching Rev2 board


RPi 4 inside small case with fan (£5.99 from Amazon)


Close up of new cheap case fitting under my Rev2



Al.

9CCD302E-D9AB-415F-B489-8E39C92E2FC5.jpeg
33966D90-82B4-4EAF-9BCD-936A35D89DA5.jpeg
56734077-2891-4E31-9389-5CF370774043.jpeg
22DB4149-1EC1-4DEB-9135-4A0F6D69CC64.jpeg

Etienne

unread,
May 31, 2020, 5:56:16 AM5/31/20
to PicoChess
Very nice indeed, We share the same taste for the DGT limited clock ... but I have a smartboard not a rev. II
I was wondering if the 4b improves significantly the start up time, the engine selection and overall comfort,.... elo strength.
Without overclocking, my understanding is a 30% performance increase but I maybe completely off.
All the best
Etienne

Scally

unread,
May 31, 2020, 6:46:35 AM5/31/20
to PicoChess
Hi Etienne,

Your stock RPi 3b is running at 1.2GHz, the stock RPi 3b+ is 1.4 GHz, the stock RPi 4b is 1.5GHz. So in your case it would be a 25% increase plus whatever the extra RAM may give you.

I’m running my stretch RPi 3b+ inside my DGT Pi at a slightly overclocked 1.5 GHz.
My RPi 4b in the new cheap plastic case running Picochess is overclocked to 2.0 GHz and my RPi 4b rev1.2 with SSD boot is overclocked to 2.1 GHz.
All have been thoroughly tested and are running smoothly with no issues.


Cheers,

Al.

Etienne

unread,
May 31, 2020, 10:34:33 AM5/31/20
to PicoChess
All right, It seems that a Rpi4 overclocked at 2ghz would really make the grade...
Thank you Al
Etienne

me isme

unread,
May 31, 2020, 1:16:24 PM5/31/20
to PicoChess
A bigger improvement would probably be running the bitboard engines (eg stockfish etc) as 64bit (on the pi 4 arm 8), but this would require a 64bit user-land - and 64 bit recompile. 
In the old days I remember the introduction of amd 64 bit cpu made a big difference to chess bitboard operations; and very quickly killed off other board representations.

Dirk

unread,
Oct 21, 2020, 10:46:07 AM10/21/20
to PicoChess
Hi DJ,

if you really don't want to cut the DGTPI from the power supply after pressing the Power on/off button, you could just replace the "systemctl isolate dgtistandby.target" 
by the "shutdown -h now" command. Then bluetooth reconnection will succeed.

When you first press the button in order to shutdown the system the PI will shutdown but the clocks stays alive.

Pressing the button a second time will then switch off the clock.

Pressing again for restart and picochess will successfully connect (at least on my system - I just checked).

Don't know if this would really helps with your problem!?

Dirk

esse...@gmail.com

unread,
Nov 6, 2020, 4:10:09 AM11/6/20
to PicoChess
Hello Al. Followed your instructions for Stockfish 12 Buster (copy 2 files etc). I just can not manage it. Because of my many inquiries to Henry, I noticed unpleasantly. Can you let me know when a finished IMG for Rasberry 4B Buster is ready. Greetings Peter

Etienne

unread,
Nov 26, 2020, 3:09:50 PM11/26/20
to PicoChess
Hello, hope you are doing well 
Now I am looking to move from stand alone to I2C connection to DGT3000 with either my 3B or 4. 
The point is to benefit from the 11 digits and speed....and get ready for Xmas (tree)...
The jack to gpio connection is well documented for Rasp 3
ground to pin 14
SDA to pin 3 and 12
SCL to pin 5 and 35
For rasp 4, Lucas has provided a solution in this thread (Apr 1st) regarding connection into a DGT PI
If  I read well this should be the same with a jack cable, right?
ground to pin 9 (or 14)
SDA to pin 3 and 19
SCL to pin 5 and 23
Plus copy two files in the appropriate directory
I would very much appreciate confirmation before risking to burn my Pis.
Any advice on whether I should convert Pi 3 or 4 (or both) would be welcome.
All the best,
Etienne

Scally

unread,
Nov 27, 2020, 6:10:27 AM11/27/20
to PicoChess
Hi Etienne,


It also links to Lucas’s notes and files.

I will be opening my DGT Pi with RPi4 inside on Sunday when some LEDs arrive. I’m going to add a Blue LED that lights when the RPi is on and flickers with activity, so I can take some pictures if you need them. Currently I have a fan with a switch, but I’m going to swap it with a self activating fan at certain temperatures and use the hole where the switch is for the LED.


Cheers,

Al.

Etienne

unread,
Nov 28, 2020, 3:08:13 AM11/28/20
to PicoChess
Hi Al,
Thank you I missed this important thread while I was focusing on my old mephisto & citrine improvements ...I2C with Rasp 4 is not so easy...
As soon as I get my GPIO pin connectors I will make a try
I will add the gpu min frequency line as recommended with the latest Lucas' files and will see
I think I should step back on the 2ghz overclocking as well (I have got the same cheap black plastic box with fan)
All the best,
Etienne

Etienne

unread,
Dec 2, 2020, 2:12:15 PM12/2/20
to PicoChess
Hi Al,
Very stange....I have built the jack connection to GPIO, removed the overclocking but didn't add any min frequency stuff,, add the two dgt files from Lucas (within the trehread).....and it worked right away!!!  Very fast start, 11 digits....Thank you guys
All the best,

Reply all
Reply to author
Forward
0 new messages