PicoChess not connecting to bluetooth DGT e-board.

921 views
Skip to first unread message

Peter Hazen

unread,
Nov 10, 2022, 5:56:02 AM11/10/22
to PicoChess
Hi,

I had downloaded and installed PicochessLite v3 but similar to other posts I've read, I receive the "no-eboard" message on the dgtpi on second and subsequent boots.  I have the bluetooth e-board as well.  The stock v0.9l image from DGT connects successfully on all boots.  Has the software been updated to correct this issue?  If so, where can I find the link to download?

Regards,

Peter

RandyR

unread,
Nov 10, 2022, 9:49:37 AM11/10/22
to PicoChess
Hi Peter,

Did you use my latest image? See this post for the links. It sounds like you have an older version.

If you are still having issues, I would suggest doing the following:

1. Connect to the Pi using SSH (or keyboard and monitor) and log in. Type the following:

sudo service picochess stop
sudo rm -rf /var/lib/bluetooth
sudo shutdown -h now

2. Wait 10 seconds and unplug the Pi.

3. Reset Bluetooth on your board by turning it off, then press and hold the power button for 10 seconds, then let go.

4. Plug in the Pi. It should connect, but may take up to a minute the first time. Subsequent connections should be quicker.

Randy

Peter Hazen

unread,
Nov 11, 2022, 5:18:14 AM11/11/22
to PicoChess
Randy,

Thank you very much.  It worked without further command execution.

I have a number of further questions. If you can advise that would be great.

1) Is this version considered to be an "official" release?
2) Is there a website or another means of access besides google groups?
3) To connect to my DGT Pi on my mac through a browser, I have created the supplicant.conf file to connect to my wi-fi network.  Is there any other file I need to have at the root level?
4) I have a DGT Pi v3b.  I have my image on a 16GB micro-sd card.  Is this sufficient for Stockfish 15?
5) Where can I always find the latest version of PicoChess?  Google groups?

Regards,

Peter

PS.  I am not a programmer (I'm a chess player) so please forgive me if my questions are stupid.

RandyR

unread,
Nov 11, 2022, 10:30:00 AM11/11/22
to PicoChess
Hi Peter. Glad it's now working for you. And there aren't any stupid questions. :^)

I'll try to answer them.

1) Is this version considered to be an "official" release?

I would not consider any images as official since they are all based on open-source code found (for the most part) on Github. You can read through the old posts in this forum to get an idea of the history of the project. The original project was adopted by DGT who then released the DGTPi. The software (image) is still available for download from DGT (as far as I know). However, it is based on an old version of the Raspberry Pi OS and has not been updated. The original programmer (Jean-Francois Romang) is no longer active on the PicoChess project. Jurgen Precour became the main programmer but decided to continue the project in private and charge a subscription for further updates. I'm not sure he is still actively working on PicoChess. Another of the original group of programmers is Dr. Shivkumar Shivaji, who still drops by the group and (I hope) is currently working on a portable book/game server solution for PicoChess. However, we have been blessed with the continuing work of Dirk Mollman (a user like you and me) who decided to learn some Python programming and was able to add some wonderful features (PicoChess v3) that we enjoy today. My images are just Dirk's code added to an up-to-date version of Raspberry Pi OS which allows people who might not want to create their own images to have a more plug-and-play solution. Finally, there have been many others who have contributed to the project (e.g. Al Cooper does most of the chess engine compiles used in my images) and more recently have been working on adding support for chess boards other than DGT (shout out to Gerhard Kalab).

2) Is there a website or another means of access besides google groups?

See the links in the previous answer. This forum is the best place to keep up with developments, but there is also an active community of (mostly German speaking users) on schachcomputer.info. I'm a Google Translate lurker there. :^)

3) To connect to my DGT Pi on my mac through a browser, I have created the supplicant.conf file to connect to my wi-fi network.  Is there any other file I need to have at the root level?

No other changes are required. Just place the wpasupplicant.conf file onto the boot partition before inserting into the Pi.

4) I have a DGT Pi v3b.  I have my image on a 16GB micro-sd card.  Is this sufficient for Stockfish 15?

Even an 8 GB card is sufficient if using the Lite image.

5) Where can I always find the latest version of PicoChess?  Google groups?

See answer 2.

Randy

Peter Hazen

unread,
Nov 11, 2022, 1:13:35 PM11/11/22
to PicoChess
Thanks Randy!  Your help is most appreciated.

I put the wpa_supplicant.conf file on my SD card at the root level.  Restarted the DGP Pi but when I go to SYSTEM>INFORMATION>IP ADDRESS it still says NO-IP.  My file is as below but I replaced my PW with * for this case.  Can my SSID contain spaces?  What could be the issue?

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CA

network={
        scan_ssid=1
        ssid="ROC Hotspot Media_Ext"
        psk="********"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP
        auth_alg=OPEN
}

Regards,

Peter

Randy Reade

unread,
Nov 11, 2022, 1:22:40 PM11/11/22
to pico...@googlegroups.com
Peter,

Can you confirm you placed the file in the boot partition? That partition also contains the config.txt and cmdline.txt files.

--
You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/eeee7e8d-da12-49a7-8b58-d561ca718b1dn%40googlegroups.com.

Randy Reade

unread,
Nov 11, 2022, 1:24:02 PM11/11/22
to pico...@googlegroups.com
Oh, and spaces are allowed.

On Fri., Nov. 11, 2022, 12:13 p.m. Peter Hazen, <phaz...@gmail.com> wrote:
--

Peter Hazen

unread,
Nov 11, 2022, 1:49:41 PM11/11/22
to PicoChess
Randy,

Yes, it's at the same location.  Do I perhaps have to change any other file?

Thanks,

Peter

DannyN

unread,
Nov 11, 2022, 2:07:15 PM11/11/22
to PicoChess
If you do: sudo nano /etc/wpa_supplicant/wpa_supplicant.conf on the command line, is the file empty or does it contain the information you expect? 

Alternatively you can set wifi by typing: sudo raspi-config on the command line; choose 1. system options and then 1. wireless lan and then fill in your SSID and password. 

Op vrijdag 11 november 2022 om 19:49:41 UTC+1 schreef phaz...@gmail.com:

Randy Reade

unread,
Nov 11, 2022, 2:12:25 PM11/11/22
to pico...@googlegroups.com
No. That should be it. As Danny mentioned, you can connect a monitor and keyboard and use raspi-config to set up wifi.

You may need to reflash the image, add the wpa_supplicant.conf file and then boot the first time.

Randy

RandyR

unread,
Nov 11, 2022, 2:17:21 PM11/11/22
to PicoChess
I wonder if you are having the same issue that Dirk mentioned. See this post. I don't know if or how he fixed it.

Maybe he can respond?

DannyN

unread,
Nov 11, 2022, 2:27:53 PM11/11/22
to PicoChess
You don't need a keyboard and monitor for raspi-config, just a wired connection to the Pi so that you can log in with ssh.

Perhaps Peter did not copy the wpa_supplicant.conf file to the SD card before first boot? 
Op vrijdag 11 november 2022 om 20:17:21 UTC+1 schreef RandyR:

RandyR

unread,
Nov 11, 2022, 2:38:09 PM11/11/22
to PicoChess
Another thought - perhaps try this:

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CA

network={
    ssid="ROC Hotspot Media_Ext"
    scan_ssid=1
    psk="your_password"
    key_mgmt=WPA-PSK
}

But I don't see anything wrong with yours... 
On Friday, November 11, 2022 at 12:49:41 PM UTC-6 phaz...@gmail.com wrote:

RandyR

unread,
Nov 11, 2022, 2:38:17 PM11/11/22
to PicoChess
Ah, yes. True enough, Danny.

Dirk

unread,
Nov 11, 2022, 2:41:45 PM11/11/22
to pico...@googlegroups.com
Yes - I could fix it be creating another wpa-suppliment file - although both of my wpa file looked idententical the new one suddenly worked. Don't know if some invisible characters caused the problem...

Von meinem iPad gesendet

Am 11.11.2022 um 20:17 schrieb RandyR <randy...@gmail.com>:

I wonder if you are having the same issue that Dirk mentioned. See this post. I don't know if or how he fixed it.
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/dea6c3d0-288f-44c9-bb44-8662d14fab02n%40googlegroups.com.

Randy Reade

unread,
Nov 11, 2022, 2:42:55 PM11/11/22
to pico...@googlegroups.com
Thanks for replying, Dirk!

Peter Hazen

unread,
Nov 12, 2022, 10:08:17 AM11/12/22
to PicoChess
Hi,

I really appreciate all of your help but there are significant issues here.

1)  I re-flashed a new image to the SD card and immediately added the wpa_supplicant.conf file before first boot.
2)  On first boot, still no IP address displayed on the DGT Pi.
3). When trying to access the configuration menus on the DGT Pi, it never stays on the selection and returns me continuously to the game time clock.
4) Continuously reports "set pieces" on the display even though all pieces are set.
5) I disconnected and shut-off the DGT Pi and I reset the board.
6) I started up the DGT Pi and still could not stay in a config menu and still received  "set pieces" on the display.
7)  Prior to all of this, after upgrading to V3, I notice that when I turn off the DGT Pi from the bottom button that the DGT Pi starts up again immediately.  I have to disconnect the power adapter first and then press the bottom button to turn off.  The system then stays off.  On 0.9L, I could shutoff the DGT Pi with the bottom power button and it would stay off even though the adapter was still plugged in.  I would think v0.9L is the desired operation sequence.

I have returned to v0.9L in the interim.

Regards,

Peter

Randy Reade

unread,
Nov 12, 2022, 10:24:52 AM11/12/22
to pico...@googlegroups.com
Hi Peter.

Are you able to hook up a monitor to the DGTPi so we can see what's happening?

It sounds like there are a few different issues going on.

Also, what chess board are you using and does wifi work with the 0.9l version?

Randy

Peter Hazen

unread,
Nov 13, 2022, 6:54:44 AM11/13/22
to PicoChess
Randy,

I am using a DGT bluetooth e-board.  I don't believe 0.9l has wi-fi capability.  I'll have to check.

Regards,

Peter

Randy Reade

unread,
Nov 13, 2022, 10:18:29 AM11/13/22
to pico...@googlegroups.com
Peter,

v0.9l does have wifi. I don't remember if SSH is enabled so you might want to add an empty file called ssh to the boot partition just in case, along with the wpa_supplicant.conf file.

Your setup is the same as mine. As a test, yesterday I downloaded the Lite image using Windows 11 (I normally use Linux), I had to use Disk Management to assign a drive letter for some reason (my laptop has a built-in SD-card reader), used Notepad++ to create the wpa_supplicant.conf file for my network, and it worked as expected in my DGTPi (except for the Bluetooth issue explained in the other thread).

In my images, the button on the bottom will shut down the Pi (not just go to run level 0) to allow you to disconnect power. If you leave power connected, pressing the button again will start the Pi.

Randy

Peter Hazen

unread,
Nov 14, 2022, 10:11:01 AM11/14/22
to PicoChess
Hi Randy,

"v0.9l does have wifi. I don't remember if SSH is enabled so you might want to add an empty file called ssh to the boot partition just in case, along with the wpa_supplicant.conf file."

It's disconcerting that since DGT issued v0.9L that they don't have documentation regarding this feature (unless I am mistaken).  Does the 3.0 build require an empty ssh files well?  What is the suffix of the ssh file?

I am using a Mac to create the build to my SD card using Apple Pi Baker on Catalina.  Am using Textedit in plain text mode to create the file.

With regards to the power button, mine just restarts the dGt Pi immediately as stated previously.

Regards,

Peter

Randy Reade

unread,
Nov 14, 2022, 10:28:06 AM11/14/22
to pico...@googlegroups.com
v3 has SSH enabled so ssh file not required. No, there is no file extension.

Documentation was basically discontinued after v0.9l. You can read the old docs here:


but things have changed since Dirk developed his v3.

I don't use a Mac so not familiar with the procedure, but it sounds like you've got it correct.

Randy

--
You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.

Trace Travlr

unread,
Nov 16, 2022, 8:54:03 PM11/16/22
to PicoChess
Greetings Randy & Dirk,

I'm hoping one, or both, of you may be able to help me with PicoChess connecting to a REVII AE.  I previously had downloaded the PicoChess Web image (quite a few months ago) from the Schachcomputer web site.  I used the 720p image & installed it on my Raspberry Pi 3B+, then after some initial configuration details was able to connect it to my REVII AE.

Since I've been periodically reading about the newer developments, including use of a local opening book, I recently downloaded Randy's latest image, and also Dirks PicoChess Web image.  Unfortunately, I've run in to an issue with each of them and am not able to use them with my REV II AE (yet).  I will try to describe what occurs with each separately, below.

Randy's image:   Was unable to locate my REV II AE initially in Bluetooth.  I ended up installing the Bluetooth Manager, and although it "saw" the REV II AE, it did not connect.  So I went to terminal & used Bluetoothctl. Found the MAC address of the REVII after using the "scan on" command, then tried pairing, trusting & connecting there.  Those seemed successful, however, I'm still not getting any communication with the REV II.  And when I went back to Bluetooth Manager, I can find a message there about "Failed to connect" org.bluez.Error.NotAvailable".  I seem to recall when I had connected previously using the Schachcomputer pico chess web image, I did it in Bluetooth Manager & was prompted for the pairing key for the REV II -- but that has not come up for me this time.  Any suggestions on how to proceed?

Dirk's image:  I cannot get Bluetooth working at all, even after installing Bluetooth manager.  I did go through the RaspPi configuration to properly set country, time zone, keyboard, etc.  I've tried using bluetoothctl also, but it acts like bluetooth isn't turned on & it doesn't let me turn it on with the manager, nor bluetoothctl.  

Please note that I'm a relative newcomer to Raspberry Pi & Linux, so any specific instructions would be greatly appreciated!

Thanks,
Paul

Randy Reade

unread,
Nov 16, 2022, 9:58:12 PM11/16/22
to pico...@googlegroups.com
Hi Paul,

No extra software is required. Can you try turning on the board then powering on the Pi. Wait up to 2 minutes (should be way more than enough) and if it doesn't connect, in the terminal type:

systemctl status hciuart

Any errors? If not, type:

systemctl status bluetooth

Oh, and make sure picochess.ini is edited to comment out the 'dgtpi = true' line:

#dgtpi = true

If your Pi is on your network, open up a browser and type in the ip address of the Pi to see if it says 'no e-board'.

Randy


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/2ec11f55-2525-447e-88f4-903aafccb07cn%40googlegroups.com.

Trace Travlr

unread,
Nov 17, 2022, 10:01:42 AM11/17/22
to PicoChess
Hi Randy,

Thanks for the speedy reply!  I just did a fresh install of your image and the Bluetooth “add new device” still fails to see any BT devices, despite waiting many minutes.

No error on running the hciuart.
There IS, however, some odd stuff shown when I ran the Bluetooth status.  There are quite a few lines having to do w Picochess, and 3 of them seem to involve some sort of error as they are in a red/pink color.  They appear shortly after the “Starting SDP server” line, & indicate the following:
Profiles/sap/server.c:sap_server_register() Sapdriver initialization failed.
Sap-server: Operation not permitted (1)
Then 2 lines about endpoint registration (seem ok, not in red), then the last line in red says Failed to set privacy: Rejected (0x0b)

I’m ALSO unable to use the wireless at the moment, it is indicating “No wireless interfaces found”.  I don’t recall what I did to get that running on the previous install of your image, but it had done the same thing.  Just letting you know in case there is any relationship.  I’m not going to alter anything else on this install until I hear from you w further suggestions.

Thanks,
Paul

Scally

unread,
Nov 17, 2022, 10:18:01 AM11/17/22
to PicoChess
Hi Paul,

I’ll be getting one of Revelation II’s out tomorrow so I can test Randy’s latest image to see what happens if you don’t get it sorted by then.

Al.

Scally

unread,
Nov 17, 2022, 10:20:13 AM11/17/22
to PicoChess
Paul,

As a matter of interest is your Revelation II an AE version or the prior version?

Al.

RandyR

unread,
Nov 17, 2022, 11:10:09 AM11/17/22
to PicoChess
Hi Paul,

Thanks for the feedback. Those errors are normal. The ones about the SAP server are due to the Pi not having a SIM card. The last one is under investigation as far as I know. I'll supress the SAP ones in a future update but you can do it yourself by following these steps (from a terminal):

sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service

Add --noplugin=sap to the ExecStart line (Line 9):

ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap

Save and exit:

Ctrl-o, y, Ctrl-x

Restart Bluetooth:

sudo systemctl daemon-reload
sudo service bluetooth restart


Or just reboot.

Two questions:

1. What do you see when you type:

rfkill

2. It sounds lie you are using the Desktop image. You shouldn't need to connect to the board via the GUI. I'll have to check that again as I have been using the Lite image recently for most of my testing, and the Desktop version only in headless mode (no monitor attached but via VNC). Can you test the Lite version?

Randy

RandyR

unread,
Nov 17, 2022, 11:10:55 AM11/17/22
to PicoChess
Thanks, Al. I appreciate that.

Randy

Trace Travlr

unread,
Nov 17, 2022, 11:59:56 AM11/17/22
to PicoChess

Hi Randy and Al,

Al: my rev Ii is the AE version.

Randy: I will try using the light version. i’m currently using your desktop version (or at least trying to!). I’ll try flashing the card with your light version to see how that goes. Without the desktop though, is there anything that I will need to do in order to start the picochess interface? Or does that just come up automatically?  If the latter, I guess that will be self evident once I flash the card and start it up.

Thanks,
Paul

Trace Travlr

unread,
Nov 17, 2022, 12:04:03 PM11/17/22
to PicoChess
Hi again Randy,

Sorry, I forgot to mention about the rfkill results. It shows both the wlan and Bluetooth are unblocked in both the soft and hard columns.

Thanks,
Paul

Trace Travlr

unread,
Nov 17, 2022, 12:56:27 PM11/17/22
to PicoChess
Hi Randy,

I have now installed the pico chess light image. made the changes listed in the README file. Rebooted. Now I’m left at the terminal command prompt. At this point, I’m completely ignorant about what to do next. Without the GUI, how do you start picochess from the terminal command prompt? And how do you set up the Bluetooth connection with the rev ii AE board?

At a bit of a loss at the moment.

Thanks,
Paul

Randy Reade

unread,
Nov 17, 2022, 1:34:49 PM11/17/22
to pico...@googlegroups.com
Sorry for the delay, Paul. Life got in the way.

I'm glad you were able to follow the standalone instructions. Did you connect your Pi to the network? If so, what does the web server show on another PC using the Pi's ip address (or use picochess.local) in the browser address line?

At the terminal prompt it should show Login. Use pi as the username, picochess as the password.

Then type:

systemctl status picochess

Randy

--
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.

Peter Hazen

unread,
Nov 17, 2022, 1:50:12 PM11/17/22
to PicoChess
Hi Randy,

Strange, I used a different Mac to burn a new image along with the wpa_supplicant.conf file.  The bluetooth board and the interface locally seem to be working correctly.  The power off issue I had seems to be resolved.  Only still cannot obtain an ip address from the dgt pi.  I have noticed that the "modes" listing in the menu has changed from 0.9L.  Are there any docs available to describe the new options?

It would be great to have access to the Pi through ip to my Mac though.

Regards,

Peter

RandyR

unread,
Nov 17, 2022, 1:58:14 PM11/17/22
to PicoChess
Hi Peter.

Well, that's progress. I think your only option is to use raspi-config to set up wifi. That will require either a monitor and keyboard, or hook up via an ethernet cable to your router/modem and use SSH. We really need to see what's going on, on the Pi.

Just to be sure, I'm assuming your located in Canada (like me :^) ) since your country code was CA.

Randy

Trace Travlr

unread,
Nov 17, 2022, 3:19:50 PM11/17/22
to PicoChess
Hi Randy,

I added the wpa_supplement.CONF file, configured for my wireless network, then rebooted.  I’m still not finding evidence of it being connected to my Wi-Fi network. Maybe there is more that I need to do here?

I did login at the pi prompt using the pi ID and picochess password. That left me at the terminal prompt.I then entered the system CTL status command you suggested, which indicates that the service is active and running. The last two lines on it indicate it is starting pico chess and then that pico chess was started. That’s followed by some highlighted text that says llines 1–17/17 (END)” followed by a flashing cursor. Nothing else happens at that point. If I hit CTRL break on my keyboard, it drops me back to the terminal prompt. I have absolutely no idea if this is expected behavior, or if I’m just doing something incorrectly here. Any suggestions?

By the way, if I use the raspberry pi configuration tool from the command line, then try to enter wireless lan information, it comes back with a message “could not communicate with WPA_supplicant“, which seems quite odd since the wpa_supplicant.CONF file is placed in the proper directory (/etc/wpa_supplicant) and contains all the SSID info that I had previously entered manually. I’m not sure if that’s expected behavior here, or if there’s maybe some subtle aspect of the wireless configuration that I’m just missing out on.

Thanks so much for your patience, as well as your ongoing help in trying to troubleshoot this for me. Ultimately though, I’d prefer to be able to use the desktop version. So I’m not sure if you want to suggest more options to get the light version running for me, or see if there’s something else we could do to get the desktop version working correctly.

Greatly appreciate all the help,
Paul

Trace Travlr

unread,
Nov 17, 2022, 3:28:41 PM11/17/22
to PicoChess
Hey Randy,

One other observation and question for you: I noticed in the WPA_ supplicant .conf file that there’s an entry for CTRL_interface=/var/run//WPA_supplicant

When I did a directory listing of the /var/run/ directory, I don’t see anything there named WPA_supplicant. So now I’m wondering if there is a missing file of some sort, such as a python script or something. Let me know what you think or suggest here.

Thanks,
Paul

Randy Reade

unread,
Nov 17, 2022, 3:55:35 PM11/17/22
to pico...@googlegroups.com
Hi Paul,

I suggested using the Lite version as it should be easier to troubleshoot (less moving parts). The error you are seeing (could not communicate with WPA_supplicant) is almost certainly caused by a bad wpa_supplicant.conf file (illegal character, wrong encoding, hidden character, etc.). I would suggest creating it directly on the Pi from the terminal using the nano editor:

sudo nano /boot/wpa_supplicant.conf

Enter your credentials (alter country/ssid/psk as necessary):

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=CA

network={
    ssid="your_network_name"
    scan_ssid=1
    psk="your_password"
    key_mgmt=WPA-PSK
}

Then save with:

Ctrl-o, y, Ctrl-x

Then reboot:

sudo reboot

And see if it's connected to your network using one of the following:

ifconfig        <---- does it show you have an ip address?
ping -c 4 www.google.com         <---- should show 0% packet loss
iwconfig wlan0       <---- should see your wifi name

Also, no need for ctrl-break in the terminal (usually).

Randy

RandyR

unread,
Nov 17, 2022, 4:00:41 PM11/17/22
to PicoChess
/var/run/wpa_supplicant doesn't exist until there is a connection, which you currently don't have.

Randy

Trace Travlr

unread,
Nov 17, 2022, 4:36:36 PM11/17/22
to pico...@googlegroups.com
Hi Randy,

Thanks!  I’ll try editing the conf file this evening and will report back.  Although I did create it using your lite image, in terminal, I see a couple small differences compared to what I recall seeing in the Raspberry Pi site.  So I will make those changes in a few hours and hope for the best.

By the way, since the lite version doesn’t have the Pi GUI, what should I see if PicoChess is actually up?  Some kind of graphic interface?

Thanks,
Paul

Sent from my iPhone

On Nov 17, 2022, at 3:00 PM, RandyR <randy...@gmail.com> wrote:

/var/run/wpa_supplicant doesn't exist until there is a connection, which you currently don't have.
--
You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.

Randy Reade

unread,
Nov 17, 2022, 4:51:20 PM11/17/22
to pico...@googlegroups.com
I think you should see something on the RevII screen, but I don't own one. If PicoChess is running, and connected to the network, you should be able to access the web server to see a chessboard and operate the virtual clock buttons. You just need the ip address of the Pi and put it in any PC browser on the network (or use picochess.local as the ip address).

Does the old image still work for you? I know you had BT connected from your old posts.

Randy

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/F4077B83-9DC0-4A41-9F2D-94FC043FF4F7%40gmail.com.

Trace Travlr

unread,
Nov 17, 2022, 8:00:33 PM11/17/22
to pico...@googlegroups.com
Hi Randy,

I’m still not having success connecting to the wireless network. I made the wpa_supplicant.conf file match the format that you provided, simply updating the wireless details to match my local wireless set up annd chug country to US.  After rebooting though, I’m still not connecting up. I also just tried the rasp pi configuration tool, and setting my country in there to US, then rebooting. It’s still not connecting up. There must be some small bit that I am missing here, but I’ve looked over that configuration file so many times, I don’t believe there’s an error in it. I did do the editing within the pi environment using the nano editor. 

Color me confused,
Paul. 

Sent from my iPhone

On Nov 17, 2022, at 3:51 PM, Randy Reade <randy...@gmail.com> wrote:



Randy Reade

unread,
Nov 17, 2022, 8:12:40 PM11/17/22
to pico...@googlegroups.com
Paul,

If you run raspi-config now, does it still show the error?

Randy

Trace Travlr

unread,
Nov 17, 2022, 9:12:33 PM11/17/22
to pico...@googlegroups.com
Hi Randy,

I decided to give it another go.  I took a look at the WPA_supplicant file on the working version of Picochess Web that I had previously obtained from the Schachcomputer website. The only difference I saw in that one is that the GROUP= netdev entry is at the end of the same line as the ctrl_interface entry, so I made that change (it was previously on a separate line). After rebooting, I’m happy to say I actually do show a wireless network connection using your light configuration!!  I was pleasantly surprised, and I’ll certainly take it. 😀

Now, for another question: I am using a Windows 7 laptop, and connected up successfully to the Picochess Web server. However, the space for the board itself is blank, and the DGT clock space is also blank (I’m used to seeing these populated in the version I have been using before). Is that normal? 

I haven’t yet tried to link up with the rev II AE, but I’ll probably try that tomorrow.

Despite all this, my personal preference is still to use the GUI interface and avoid having to also have a laptop hooked up. I’m hoping you might be able to sort out why I am not having success with the desktop version.

Thanks so much for all your input,
Paul.

Sent from my iPhone

On Nov 17, 2022, at 7:12 PM, Randy Reade <randy...@gmail.com> wrote:



Randy Reade

unread,
Nov 17, 2022, 9:31:17 PM11/17/22
to pico...@googlegroups.com
Ah, good to hear. Yes, the syntax is very important.

The web server should definitely be showing the chess board and everything else (if you are using my images). All that should be showing is 'no e-board' on the clock 'display' until it connects to the board. Perhaps try a different browser? Although all the ones I've tried work. The display for the PicoChessWeb image I believe is made for a 7-inch display so can't comment on how that might look in a normal web browser.

So tomorrow, leave the RevII turned OFF, use a fresh Desktop version, add the corrected wpa_supplicant.conf file to the boot partition after flashing the SD card (before inserting into the Pi). Insert into the Pi and power ON. After the desktop loads, make the rest of the changes as stated in the Standalone.txt file. Reboot and turn ON the RevII after you see the Desktop.

Hopefully Bluetooth will work for you. Let me know how it goes.

Randy

On Thu, Nov 17, 2022 at 8:12 PM Trace Travlr <nashhe...@gmail.com> wrote:
Hi Randy,

Scally

unread,
Nov 18, 2022, 10:07:49 AM11/18/22
to PicoChess
Hi Paul and all,

I have dug out my Revelation II AE Version and downloaded Randy’s latest image, here are my findings and suggestions:

I placed the unaltered Micro SD Card into my DGT Pi and plugged in an Ethernet Cable rather than go through the Wireless set-up which we know works.

I put my Rev II into BT mode and powered up my DGT Pi, after a short while we got to the ‘no e-board /‘ screen which remained and it didn’t connect to my Rev II. I tried a few things and it connected, but on any reboot it wouldn’t reconnect. Eventually I found a solution so this is what I did to connect to a Revelation II.

To get your Revelation II Bluetooth ID do the following:

Power on the Revelation II in normal mode

Press Up arrow once to Options

Press right arrow to turn Options to Yes

Press Up arrow 9 times to Bluetooth Status

Note your BX- number (mine is 000666491DCB)

Press the Clear and Enter Buttons simultaneously to put your REV II to sleep

Press the Up arrow and Enter Buttons simultaneously to enter BT Mode


Power on your RPi/DGT Pi

SSH into your RPi/DGT Pi using it’s IP Address to add some commands

Type bluetoothctl and hit Enter

Type power on and hit Enter

Type agent on and hit Enter

Type default agent and hit Enter

Type scan on and hit Enter

Type pair 00:06:66:xx:xx:xx  where xx’s is your BT Id from earlier, in pairs separated by colons

  i.e. pair 00:06:66:49:1D:CB

PIN is 1234

Type trust 00:06:66:xx:xx:xx  where xx’s is your BT Id from earlier, in pairs separated by colons

Type exit and hit Enter


Type sudo nano /etc/systemd/system/picochess.service

Alter  sleep10  to sleep12 on line 6 and save via CTRL-X and Y


Type  sudo reboot and hit Enter to Reboot

Your RPi/DGT Pi should automatically connect to your Revelation II from now on


Cheers,

Al.

Randy Reade

unread,
Nov 18, 2022, 10:22:34 AM11/18/22
to pico...@googlegroups.com
Hi Al,

Thanks alot for testing. I see the issue is that PicoChess is starting before Bluetooth is running. I noticed that as well. I was initially using sleep 20. Then I dropped down to sleep 15 and finally sleep 10, which seemed to connect for me consistently so I left it there. Anything lower and it wouldn't connect.

I suspect that is the only thing needed. The BT commands are handled in the board.py code and I have observed that trusting is not required.

If you could retest with just the picochess.service modification (sleep 12, but I'll probably use 15 in my images) I would be grateful. Remove the bluetooth settings in the pi first:

sudo rm -rf /var/lib/bluetooth
sudo reboot

Randy

--
You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.

Scally

unread,
Nov 18, 2022, 11:20:15 AM11/18/22
to PicoChess
Hi Randy,

Having deleted the bluetooth folder it failed to connect to my Rev II on a reboot, however it connected on the 2nd reboot and all subsequent reboots and power-ups.

So it looks as though all that is needed is the last paragraph of my original comments:

Type sudo nano /etc/systemd/system/picochess.service

Alter  sleep10  to sleep12 on line 6 and save via CTRL-X and Y


Type  sudo reboot and hit Enter to Reboot

Your RPi/DGT Pi should automatically connect to your Revelation II from now on


Cheers,

Al.


Randy Reade

unread,
Nov 18, 2022, 12:23:34 PM11/18/22
to pico...@googlegroups.com
Yea, the first boot sometimes won't connect. I had that happen a few days ago and while it was trying I SSH'd in and saw that the hciuart.service failed to initialize (timed out). Not 100% sure that's what's happening with everyone but the only way to fix it is to reboot or restart the hciuart and bluetooth services.

Thanks for the follow-up testing, Al.

Randy

Trace Travlr

unread,
Nov 19, 2022, 8:09:15 AM11/19/22
to PicoChess
Hi Randy and Al,

Sorry I didn’t get you an update yesterday. I spent quite a few hours trying to use Bluetooth with Randy’s desktop image. Unfortunately, still back to where I started with it. I’m sure there’s got to be an explanation for the behavior I’m seeing, but I am at a complete loss. Basically, what I see is that the GUI Bluetooth interface launched from the taskbar never shows me any Bluetooth devices in the area. However, when I use Bluetooth CTL from the terminal, after turning scan on it is listing quite a few Bluetooth devices. RFKill indicates nothing is blocked on the Bluetooth side. So it almost seems like the GUI Bluetooth tool isn’t receiving proper communication from the Bluetooth service, although that’s just based on what I described above.  Out of curiosity, I decided to install the Bluetooth manager packet. What’s really strange is that the Bluetooth manager tool in the GUI does show a number of Bluetooth devices in the area and they show up immediately. Yet The native Bluetooth tool doesn’t show anything.

Another comment, in case it helps troubleshooting: after doing a fresh install of Randy’s image, I have to change the localization information to set my location for US, central time zone, etc. When I did that from the GUI interface, more often than not the system ended up rebooting and then freezing prior to displaying the GUI again. I finally decided to try changing those settings from terminal instead, and that seemed to result in a successful restart. I know that the Wi-Fi connections won’t behave properly until setting your proper Wi-Fi country. I don’t know if, behind the scenes, that is also something that gets passed along to Bluetooth or not. Since it’s another form of a wireless broadcast though I just thought I’d mention it in case something is misbehaving there.

I’d be happy to try any further suggestions that you may have.

Thanks again for your patience and input,
Paul

Randy Reade

unread,
Nov 19, 2022, 9:47:42 AM11/19/22
to pico...@googlegroups.com
Hi Paul,

You shouldn't connect to the RevII using the GUI. The DGT boards use Bluetooth Serial to communicate via RFCOMM (although I'm not sure about the newer boards).

When you use bluetoothctl do you see the RevII in the scan?

Randy

Trace Travlr

unread,
Nov 19, 2022, 1:48:12 PM11/19/22
to pico...@googlegroups.com
Hi Randy,

Yes, it does see the REVII AE in scanning using Bluetooth CTL. However, when I attempt to pair it there, it comes back with message “failed to pair: org. bluez.Error. ConnectionAttemptFailed.“

Paul

On Nov 19, 2022, at 8:47 AM, Randy Reade <randy...@gmail.com> wrote:



Randy Reade

unread,
Nov 19, 2022, 1:57:59 PM11/19/22
to pico...@googlegroups.com
Hi Paul,

That's normal. It should be working then. At least you have access.

Are you able to start with a fresh image and set up wifi? Then we can run some commands and see what's failing.

Randy

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/872E9CD4-DA37-4E74-92F9-6BD56F2FA2F8%40gmail.com.

RandyR

unread,
Nov 19, 2022, 5:04:12 PM11/19/22
to PicoChess
As I'm updating my images, I see I made an error in that post. Here's the correction:

sudo nano /usr/lib/systemd/system/bluetooth.service

Add --noplugin=sap to the ExecStart line (Line 9):

ExecStart=/usr/libexec/bluetooth/bluetoothd --noplugin=sap

Save and exit:

Ctrl-o, y, Ctrl-x

Restart Bluetooth:

sudo systemctl daemon-reload
sudo service bluetooth restart


Or just reboot.

Randy

On Thursday, November 17, 2022 at 10:10:09 AM UTC-6 RandyR wrote:
Hi Paul,

Thanks for the feedback. Those errors are normal. The ones about the SAP server are due to the Pi not having a SIM card. The last one is under investigation as far as I know. I'll supress the SAP ones in a future update but you can do it yourself by following these steps (from a terminal):

sudo nano /etc/systemd/system/bluetooth.target.wants/bluetooth.service

Add --noplugin=sap to the ExecStart line (Line 9):

ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap

Save and exit:

Ctrl-o, y, Ctrl-x

Restart Bluetooth:

sudo systemctl daemon-reload
sudo service bluetooth restart


Or just reboot.

Dirk Sommerfeld

unread,
Nov 21, 2022, 7:39:36 AM11/21/22
to PicoChess
Randy, working with sleep is a little life hack. 
Based on a idea from Gerhard !!, this new startscript solve this issue without a sleep command.  I test it this morning and it works again and again.
have fun Dirk 

[Unit]
Description=PicoChess stand alone chess computer based on DGT board
After=bluetooth.service

[Service]
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/pi/.Xauthority"
Type=simple
ExecStart=/usr/bin/python3 /opt/picochess/picochess.py
ExecStop=/usr/bin/pkill -f picochess.py
WorkingDirectory=/opt/picochess/

[Install]
WantedBy=bluetooth.target
WantedBy=graphical.target

Scally

unread,
Nov 21, 2022, 8:09:45 AM11/21/22
to PicoChess
Hi Dirk,

That works for me, I only had a 4 second sleep, but now it works without

Thanks,

Al.

Scally

unread,
Nov 21, 2022, 8:37:56 AM11/21/22
to PicoChess
Hi Randy,

I tried Dirk’s changes on your latest Image, it now connects to the Revelation II much quicker.

Al.

Randy Reade

unread,
Nov 21, 2022, 8:39:38 AM11/21/22
to pico...@googlegroups.com
Hi Dirk,

I originally was doing that but when checking journalctl it was showing that picochess was starting before bluetooth target was reached. It was quite a while back now but I was pretty sure it wasn't just the picochess.service that was starting, I checked the time that picochess.py started by looking at systemctl status bluetooth.

From you, Gerhard and Al's testing I should definitely revisit that. It's a better solution than a hack for sure.

Thanks.

Randy

--
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.

Randy Reade

unread,
Nov 21, 2022, 8:43:32 AM11/21/22
to pico...@googlegroups.com
Al, if you have the time, can you add a 15 second sleep to the bluetooth service and see if picochess is really waiting for bluetooth? If not, I'll check after breakfast.

Randy

--
You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/0e8c6330-1660-41c0-9099-1482991d1ca9n%40googlegroups.com.

Scally

unread,
Nov 21, 2022, 9:21:18 AM11/21/22
to PicoChess
Hi Randy,

With Dirk’s changes?

Al.

Randy Reade

unread,
Nov 21, 2022, 9:31:14 AM11/21/22
to pico...@googlegroups.com
Sorry. Yes, with the changes from Dirk.

Randy

Scally

unread,
Nov 21, 2022, 11:36:27 AM11/21/22
to PicoChess
Hi Randy,

I cocked up, I had left the Sleep in the picochess.service using your image.

It does NOT connect with Dirk’s changes using your non-graphical image, it does connect with a 12 or 15 second sleep parameter with or without Dirks changes, here’s the picochess.service I tried on your image:

[Unit]
Description=PicoChess stand alone chess computer based on DGT board
After=bluetooth.service

[Service]
Type=simple
ExecStart=/usr/bin/python3 /opt/picochess/picochess.py
ExecStop=/usr/bin/pkill -f picochess.py
WorkingDirectory=/opt/picochess/

[Install]
WantedBy=bluetooth.target
WantedBy=graphical.target

Yet strangely on my Picochess system it connects very soon after the “no e-board /“ message using Dirks change without a sleep parameter:

[Unit]
Description=PicoChess stand alone chess computer based on DGT board
After=bluetooth.service

[Service]
Type=simple
#ExecStartPre=/bin/sleep 4
ExecStart=/usr/bin/python3 /opt/picochess/picochess.py -w

ExecStop=/usr/bin/pkill -f picochess.py
WorkingDirectory=/opt/picochess/

[Install]
#WantedBy=multi-user.target
WantedBy=bluetooth.target
WantedBy=graphical.target

Your sleep parameter definitely works though.

On both systems it takes 13 seconds from Power Up to the DGT Pi message.

Then on my system a further 10 secs to no e-board and 7 more seconds to fully up and running.

On your system it takes a further 23 secs to no e-board with a 12s delay and 26 secs with the 15s delay.

I hope this helps

Al.

Randy Reade

unread,
Nov 21, 2022, 12:10:53 PM11/21/22
to pico...@googlegroups.com
Hi Al,

I'm seeing the same. I did a test with bluetooth.service delayed and picochess does not wait:

pi@picochess:~ $ systemctl status picochess
picochess.service - PicoChess stand alone chess computer based on DGT board
     Loaded: loaded (/etc/systemd/system/picochess.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-11-21 09:32:06 CST; 1min 33s ago
   Main PID: 399 (python3)
      Tasks: 32 (limit: 1596)
        CPU: 24.336s
     CGroup: /system.slice/picochess.service
             ├─ 399 /usr/bin/python3 /opt/picochess/picochess.py
             ├─1030 /opt/picochess/engines/armv7l/a-stockf
             ├─1891 /bin/sh -c rfcomm connect 123 68:27:19:F8:9E:51
             ├─1892 rfcomm connect 123 68:27:19:F8:9E:51
             ├─1897 /opt/picochess/engines/armv7l/a-stockf
             └─1899 /opt/picochess/engines/armv7l/a-stockf

Nov 21 09:32:06 picochess systemd[1]: Started PicoChess stand alone chess computer based on DGT board.

pi@picochess:~ $ systemctl status bluetooth
bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-11-21 09:33:00 CST; 53s ago
       Docs: man:bluetoothd(8)
    Process: 612 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
   Main PID: 1456 (bluetoothd)
     Status: "Running"
      Tasks: 1 (limit: 1596)
        CPU: 253ms
     CGroup: /system.slice/bluetooth.service
             └─1456 /usr/libexec/bluetooth/bluetoothd --noplugin=sap

Nov 21 09:32:15 picochess systemd[1]: Starting Bluetooth service...
Nov 21 09:33:00 picochess bluetoothd[1456]: Bluetooth daemon 5.55
Nov 21 09:33:01 picochess bluetoothd[1456]: Starting SDP server
Nov 21 09:33:00 picochess systemd[1]: Started Bluetooth service.
Nov 21 09:33:01 picochess bluetoothd[1456]: Excluding (cli) sap
Nov 21 09:33:04 picochess bluetoothd[1456]: Bluetooth management interface 1.21 initialized
Nov 21 09:33:05 picochess bluetoothd[1456]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSink/sbc
Nov 21 09:33:05 picochess bluetoothd[1456]: Endpoint registered: sender=:1.28 path=/MediaEndpoint/A2DPSource/sbc
Nov 21 09:33:05 picochess bluetoothd[1456]: Failed to set privacy: Rejected (0x0b)

And from the picochess.log:

2022-11-21 09:32:26.036   DEBUG  picochess - main: #################### PicoChess v3 ####################

But this is strange (from journalctl):

Nov 21 09:33:00 picochess systemd[1]: Reached target Bluetooth.
Nov 21 09:33:22 picochess systemd[594]: Reached target Bluetooth.

So I disabled the bluetooth.service and bluetooth is still being started, so something else appears to be starting bluetooth, even with picochess disabled. Perhaps it's something with a 'Wants=' entry.

The systemd.unit man page has alot of info but wrapping your head around it (or at least MY head) is not easy. There are so many options (After, Wants, WantedBy, Requires, Before, RequiredBy, etc.).

Maybe here?:

pi@picochess:~ $ systemctl list-dependencies bluetooth --reverse
bluetooth.service
● ├─bthe...@hci0.service
● └─bluetooth.target
●   └─sys-devices-platform-soc-3f201000.serial-tty-ttyAMA0-hci0.device

I guess the delay is probably warranted (as you also saw). What's a few more seconds. :^)

Randy

On Mon, Nov 21, 2022 at 8:21 AM Scally <scall...@gmail.com> wrote:

Dirk Sommerfeld

unread,
Nov 21, 2022, 12:35:45 PM11/21/22
to PicoChess
/lib/systemd/system/bluetooth.service  will also call bluetooth.target
WantedBy=bluetooth.target
That's the reason that it starts with disabled service.

Dirk


Randy Reade

unread,
Nov 21, 2022, 12:50:23 PM11/21/22
to pico...@googlegroups.com
Hi Dirk.

Even with picochess.service and bluetooth.service disabled, bluetooth still starts.

I think it's here (but I could be mistaken):

/var/lib/systemd/deb-systemd-helper-enabled/bluetooth.target.wants/bluetooth.service

pi@picochess:~ $ systemctl status bluetooth
● bluetooth.service - Bluetooth service
     Loaded: loaded (/lib/systemd/system/bluetooth.service; disabled; vendor preset: enabled)
     Active: active (running) since Mon 2022-11-21 10:39:42 CST; 1min 27s ago
       Docs: man:bluetoothd(8)
    Process: 635 ExecStartPre=/bin/sleep 30 (code=exited, status=0/SUCCESS)
   Main PID: 1378 (bluetoothd)

     Status: "Running"
      Tasks: 1 (limit: 1596)
        CPU: 174ms
     CGroup: /system.slice/bluetooth.service
             └─1378 /usr/libexec/bluetooth/bluetoothd --noplugin=sap

Randy

Dirk Sommerfeld

unread,
Nov 21, 2022, 1:00:57 PM11/21/22
to PicoChess
But in the end, our new service starts only is one instance of bluetooth.target is running. It is obsolete which one. That ist the reason while my choices works without a delay and full stable. 

Dirk

Randy Reade

unread,
Nov 21, 2022, 1:35:39 PM11/21/22
to pico...@googlegroups.com
I guess my point is that picochess isn't waiting for bluetooth to be up and running before starting. That's why I added a delay, because of all the connection issues. But also, picochess isn't just for people using bluetooth boards. Those comfortable with Linux can make a customized system. My images are just a base which should work for most users, if not all.

I think a better solution would be to check if the hciuart.service and bluetooth.service are running and restart them if not, then run picochess. Eric's script does the restarting part if I remember correctly. I disabled it in my images since I didn't want the already-paired devices to be removed, which delays the board detection (I had modified his script since it only affected the Rev II).

Randy

--
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/915b286b-6218-4fe7-869c-94f68262c3fcn%40googlegroups.com.

Scally

unread,
Nov 21, 2022, 2:17:48 PM11/21/22
to PicoChess
Hi Randy,

Aha, I haven’t disabled Eric’s script and mine works with my Rev II with Dirk’s additions and no sleep command.

Al.

Randy Reade

unread,
Nov 21, 2022, 2:49:54 PM11/21/22
to pico...@googlegroups.com
Yes, Eric's script will ensure bluetooth is running, but it also removes the Rev II pairing info. The board.py program does that if rfcomm doesn't connect to the already-paired board. So I guess the script just forces that condition and relies on the scan.

Dirk's picochess.service didn't work for you on the Lite image because of the line:

WantedBy=graphical.target

Thanks for testing.

Randy

You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/2ead0f06-46fb-417e-8470-22c9add67857n%40googlegroups.com.

Scally

unread,
Nov 21, 2022, 2:57:36 PM11/21/22
to PicoChess
Hi Randy,

Good point, but I’m not using a GUI and have the same line in my picochess.service and it’s working for me …

Al

Randy Reade

unread,
Nov 21, 2022, 3:20:11 PM11/21/22
to pico...@googlegroups.com
That's strange.

Or is it.

Perhaps it means that the graphical.target wants picochess to be running. But since the desktop isn't running it has no effect?? Seems like I'm missing something.

Very confusing.

On another note, I put the desktop image in the DGTPi, removed any delays or changes from Dirk, and it connected right away to my BT board, anyway. But I don't think it would work every time.

<sigh>

Randy

Dirk Sommerfeld

unread,
Nov 22, 2022, 5:32:05 AM11/22/22
to PicoChess
I make some analyses and I will bet that it runs without gaps.
So first I change something in our script:
After=multi-user.target the systemd will start this  userscripts at the end of the startprocess
wantedby graphical.target you can delete if you run in a nondesktop environment

At the end I make a graphical analyse of my systemstart and you can see that all my userscripts are running at the end of the boot process. And in this moment bt is always running depends on the wantedby
So it takes care that all systemservices and bluetoothtarget are run before picochess starts. 
And this is the solution :-) 
Dirk




[Unit]
Description=PicoChess stand alone chess computer based on DGT board
After=multi-user.target

[Service]
Environment="DISPLAY=:0"
Environment="XAUTHORITY=/home/pi/.Xauthority"
Type=simple
ExecStart=/usr/bin/python3 /opt/picochess/picochess.py
ExecStop=/usr/bin/pkill -f picochess.py
WorkingDirectory=/opt/picochess/

[Install]
WantedBy=bluetooth.target
WantedBy=graphical.target
~
graph.svg

Scally

unread,
Nov 22, 2022, 5:49:24 AM11/22/22
to PicoChess
Hi all,

Yes that works on Randy’s image without the sleep statement, it also works in a non graphical environment with the WantedBy=graphical.target line left in.

Al

Dirk Sommerfeld

unread,
Nov 22, 2022, 6:20:05 AM11/22/22
to PicoChess
THX for testing Al !!!

RandyR

unread,
Nov 23, 2022, 4:17:46 PM11/23/22
to PicoChess
Hi Dirk,

Here's what I've settled for (Lite image version shown):

[Unit]
Description=PicoChess stand-alone chess computer for DGT chessboards
After=multi-user.target

[Service]

Type=simple
ExecStart=/usr/bin/python3 /opt/picochess/picochess.py
ExecStop=/usr/bin/pkill -f picochess.py
WorkingDirectory=/opt/picochess/

[Install]
WantedBy=multi-user.target

I don't want it to be dependent (although not strictly) on bluetooth since not everyone uses a Bluetooth board. Instead, I have enhance the board.py code to restart the hciuart and/or bluetooth services if the fail to start. I'll attach the new files when I update the images shortly.

Al,

If you could test them on your Rev II, I'd appreciate it. I'll post a new message when they are uploaded.

Randy

Scally

unread,
Nov 24, 2022, 6:02:31 AM11/24/22
to PicoChess
Hi Randy,

I downloaded your latest lite image and it doesn’t connect to the Revelation II on the first or subsequent boots.

Your previous image with changes suggested by Dirk and without your board.py enhancements connected every time.

I tried changing  ‘WantedBy=multi-user.target’ to ‘WantedBy=bluetooth.target’ and tried with both together, but still no connection.

I’m about to go out for the rest of the day so haven’t had a chance to look into the logs etc.

Al

Randy Reade

unread,
Nov 24, 2022, 8:53:38 AM11/24/22
to pico...@googlegroups.com
Thanks for testing, Al.

I'll touch base offline and hopefully I can see why it's failing for the Rev II.

If anyone with a Bluetooth board could test the image and share their results (good or bad), I'd appreciate it.

Randy

--
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.

Wilhelm

unread,
Nov 24, 2022, 10:57:48 AM11/24/22
to PicoChess
Hello Randy,

 I have now tested with your new little images.
Picochess connected to my Bluetooth board every time I started it.

Previously I had pasted your new files (picochess.service, board.py) into my existing litle system.
There, too, it worked without any problems and quite quickly.

Wilhelm

Randy Reade

unread,
Nov 24, 2022, 11:24:49 AM11/24/22
to pico...@googlegroups.com
Thanks, Wilhelm.

I appreciate the feedback.

Now to figure out the Rev II...

Randy

You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/71fdbbf3-625e-4994-b737-b23eaa2c33e3n%40googlegroups.com.

Peter Hazen

unread,
Nov 24, 2022, 11:29:17 AM11/24/22
to pico...@googlegroups.com
Randy,

I have a BT board and it connects okay.  The very first boot (with 11/23 Lite image) did not connect but all subsequent boots have connected.

Regards,

Peter

You received this message because you are subscribed to a topic in the Google Groups "PicoChess" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/picochess/Mg9czzjmBVU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to picochess+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/picochess/CAE5WdusJCzNfi1Atrp8n6AGCnUp%3Dg_J6BxN3WemzWUR_xiNLBA%40mail.gmail.com.

Randy Reade

unread,
Nov 24, 2022, 12:29:21 PM11/24/22
to pico...@googlegroups.com
Thanks for the feedback, Frank. It should connect on the first boot, too, but sometimes it doesn't. It may be that the commands are coming too fast but it's tough to determine that.

Randy

Randy Reade

unread,
Nov 24, 2022, 12:30:55 PM11/24/22
to pico...@googlegroups.com
Sorry, Peter. I was just replying to Frank and had him in my mind. 😁

On Thu., Nov. 24, 2022, 10:29 a.m. Peter Hazen, <phaz...@gmail.com> wrote:
Message has been deleted

RandyR

unread,
Nov 27, 2022, 12:47:07 PM11/27/22
to PicoChess
Disregard that message (I'll delete it - it's referenced below)

Those entries from the kernel initializing the RFCOMM TTY layer are actually the result of running PicoChess.

<sigh>

Randy

On Sunday, November 27, 2022 at 11:17:23 AM UTC-6 RandyR wrote:
I saw the Bluetooth connection issue yesterday where PicoChess won't connect to the board on boot.

It appears that it's caused by the kernel RFCOMM TTY Layer not getting initialized before PicoChess starts. In this case, PicoChess will scan and pair with the board, but the 'rfcomm connect 123 <mac addr>' command will fail. When rfcomm fails. the device gets removed from the picochess device list and, since the scan is still running, the board never shows up again. To get bluetoothctl to see it again, turn the board OFF for 20 seconds then back ON. While the board is OFF, bluetoothctl will delete (DEL) the device from its memory and when you turn it back ON, it will again be picked up as a new device and PicoChess should connect (assuming the RFCOMM TTY layer is now initialized). It takes 15 seconds or so for bluetoothctl to delete the device.

It's notable that this occurred after the bluetooth.target was reached. My images have the picochess.service only waiting for the multi-user target.

I'll try to figure out some code to make this automatic.

Here are the relevant entries from journalctl:

Nov 25 13:52:18 picochess kernel: Booting Linux on physical CPU 0x0

Nov 25 13:52:23 picochess systemd[1]: Starting Configure Bluetooth Modems connected by UART...

Nov 25 13:52:29 picochess kernel: Bluetooth: Core ver 2.22
Nov 25 13:52:29 picochess kernel: NET: Registered PF_BLUETOOTH protocol family
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI device and connection manager initialized
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI socket layer initialized
Nov 25 13:52:29 picochess kernel: Bluetooth: L2CAP socket layer initialized
Nov 25 13:52:29 picochess kernel: Bluetooth: SCO socket layer initialized
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI UART driver ver 2.3
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI UART protocol H4 registered
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI UART protocol Three-wire (H5) registered
Nov 25 13:52:29 picochess kernel: Bluetooth: HCI UART protocol Broadcom registered
Nov 25 13:52:29 picochess btuart[410]: bcm43xx_init
Nov 25 13:52:29 picochess btuart[410]: Flash firmware /lib/firmware/brcm/BCM43430A1.hcd
Nov 25 13:52:29 picochess btuart[410]: Set BDADDR UART: b8:27:eb:96:ce:0d
Nov 25 13:52:29 picochess btuart[410]: Set Controller UART speed to 115200 bit/s
Nov 25 13:52:29 picochess btuart[410]: Device setup complete

Nov 25 13:52:29 picochess systemd[1]: Started Configure Bluetooth Modems connected by UART.

Nov 25 13:52:30 picochess systemd[1]: Created slice system-bthelper.slice.
Nov 25 13:52:30 picochess systemd[1]: Starting Raspberry Pi bluetooth helper...
Nov 25 13:52:30 picochess bthelper[495]: Raspberry Pi BDADDR already set
Nov 25 13:52:30 picochess systemd[1]: Finished Raspberry Pi bluetooth helper.
Nov 25 13:52:30 picochess systemd[1]: Starting Bluetooth service...
Nov 25 13:52:30 picochess bluetoothd[505]: Bluetooth daemon 5.55
Nov 25 13:52:30 picochess systemd[1]: Started Bluetooth service.
Nov 25 13:52:30 picochess systemd[1]: Reached target Bluetooth.
Nov 25 13:52:30 picochess bluetoothd[505]: Starting SDP server
Nov 25 13:52:30 picochess bluetoothd[505]: Excluding (cli) sap
Nov 25 13:52:30 picochess kernel: Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Nov 25 13:52:30 picochess kernel: Bluetooth: BNEP filters: protocol multicast
Nov 25 13:52:30 picochess kernel: Bluetooth: BNEP socket layer initialized
Nov 25 13:52:30 picochess bluetoothd[505]: Bluetooth management interface 1.21 initialized
Nov 25 13:52:31 picochess bluetoothd[505]: Failed to set privacy: Rejected (0x0b)

Nov 25 13:52:31 picochess systemd[1]: Reached target Multi-User System.
Nov 25 13:52:31 picochess systemd[1]: Reached target Graphical Interface.
Nov 25 13:52:31 picochess systemd[1]: Started PicoChess stand-alone chess computer for DGT chessboards.

Nov 25 13:52:41 picochess kernel: Bluetooth: RFCOMM TTY layer initialized
Nov 25 13:52:41 picochess kernel: Bluetooth: RFCOMM socket layer initialized
Nov 25 13:52:41 picochess kernel: Bluetooth: RFCOMM ver 1.11

Randy
Reply all
Reply to author
Forward
Message has been deleted
0 new messages