Setting up Pico Desktop from scratch

526 views
Skip to first unread message

Kyle Washington

unread,
Jul 31, 2023, 1:18:08 PM7/31/23
to PicoChess
It's been over a year since I've done this, and I am very rusty.  My old version of Picochess is ... well, it's about a year and a half old.  I don't know what version.  That is a highlight of the kinds of problems I am having.  

I have a couple of Rpi 3s in cases, and power cords.  My 'real' Picochess pi is a 4, and it's set up in a touchscreen case.  I only have 1 USB slot available, and that's where the DGT board goes.  I need to take apart the case and pop the plastic to get to 2 more USB ports so I can use a mouse and keyboard.  That's not a big problem, but it's typical of the things I'm running into!  So for fun, I thought I'd document my journey in case other newcomers find this forum and are starting from the beginning like me.

I have the Raspberry Pi installer loaded on my laptop already, so I downloaded the new image from this forum... I no longer had a 7z extractor! I got a free one - problem solved.  As I wrote the image, I read the most excellent Picochess journey document.  What a treasure!  (Now I think I want to create something like that for this setup stuff.)

I finish the image flash, and I put the card into one of my 3b Pi cases and turn it on. I have a usb mouse and keyboard attached, and a computer monitor (with sound) via HDMI.  After a while, the Picochess Web image appears. That is a nice touch! Then a browser loads with 127.0.0.1 and an error message.  I don't have my DGT board connected yet, so maybe that's it - but I realize I also cannot set up VNC because I'm not connected to Wifi.

That should be easy - but I'm stuck.  I know now that I need to add my wpa_supplicant.config file, but I cannot create it in the GUI.  I don't have write permissions.  I can go to a terminal mode and create it, but it seems like I should be able to do it in the GUI, right?  Even better, I could copy the one from my existing setup, but it wasn't that hard to just type it.  So I did - but there's still no Wifi. When I put my cursor over the Wifi icon in the taskbar, it says "wlan0 not associated."  I cannot set Wifi Country or the SSID in the GUI. I tried to do it all via terminal, and that doesn't work either.

Next I tried the imager again, and I set the ssid and password that way.  Still no luck.  It doesn't create the conf file like I thought it would.  So as it says in the image PDF, "If you don't want all of the new engines - the old image still works fine."  So I'm still trying, but I want to see if there is a thread that already outlines this, if anyone recognizes where I am.  I also found a course on LinkedIn Learning about Raspberry Pi Basics, and I'm watching that and figuring out a lot.  I'm an amateur radio operator, so I don't mind tinkering - but I'm a beginner with this Raspberry Pi stuff.  I know less about Linux than I do about chess... and that's a very small amount!

What I do love about all of this is that once I get past the learning curve, this is going to be great. The YouTube videos I see with the new setup look great.  I am not tied to the touchscreen - but I want to experiment with using that, with a monitor/speaker, or maybe a phone.  I love the tinkering, but I'm ready to settle down and learn some chess.

Originally I thought I wanted that Kingdom set, because the pieces moved. Circumstances led me to a used DGT board without notation. I find that moving the pieces myself and counting the files and ranks is really helping me learn the notation, so I no longer see that as a bad thing. I like the voices, but I want to be fluent enough so I can look at the clock or display and know where to move.  I don't NEED the voices, I guess, but hearing the GlaDOS comments really do make it fun! Now that I have mastered using the PicoCoach and PicoTutor, my kids will often say "That's a bad move" when I do something wrong around the house. They hear that often from my chess setup.

My new job has me working 12-hour shifts 3 or 4 days a week, so I get time to check forums when I am there and then work on setting this up when I am home. I am not under a deadline and I'm not frustrated, so I'm looking at this as a fun problem to solve.  If anyone has a source for a crash course in Raspberry Pi setup, I'd love to know. I'll search YouTube later today too, and I'll see what I can find.  When I started this journey, the DGT board was the only option I could find.  (I have a Centaur, but it's a standalone). But now I see the Chessnut Air and the other similar devices, and it means I can maybe configure something like Al has with the blinking lights on the squares! The Revelation II is a bit out of my price range, but once I earn big money as a world chess champion, I will be able to afford it.  (Ha, ha).

Updates soon, and thank you to everyone who has put in hours of time to make this work. My kid has been taking chess lessons for 3 years, and now he's at the point where he can really benefit from the different engines and the analysis features.  I'm still working on slowing down the number of times I'm told "That's a bad move."  But to see them learn will make this all worth it.  Thanks you all!

Kyle

Randy Reade

unread,
Jul 31, 2023, 1:50:42 PM7/31/23
to pico...@googlegroups.com
Once you flash the image, if you don't see the FAT32 partition on your PC, eject the card and reinsert it. You should now see the bootfs partition (might not be labeled that on Windows, I use Linux). On that partition (where you see quite a few files, including config.txt) paste or create your wpa_supplicant.conf file. Then eject the SD card and boot the Pi with it. It will be copied from the bootfs partition to the rootfs partition into the /etc/wpa_supplicant folder. If your file was created correctly you should be connected to your wi-fi network. 

The error you are seeing when not connected to a network are due to the browser starting before picochess is running (due to samba being enabled). Search the forum to see how to disable the nmbd.service which will solve this when not connected to a network.

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/d062867f-0e45-47ec-a957-066154f9f1ccn%40googlegroups.com.

Kyle Washington

unread,
Jul 31, 2023, 2:34:22 PM7/31/23
to PicoChess
I only see a boot partition with one sub-folder called Overlays.  I disassembled my touch screen contraption... which is the only way to update the SD card... and I just put it in the laptop. It's the same way.  So maybe I have installed something that is preventing me from seeing the other partitions?  I'll search for that now.  This way I can at least copy my existing config files for comparison.  I'm lucky enough to have a working version, so I'm going to use it to learn something!

Thanks for the pointers - I'll start searching now.

Kyle

Kyle Washington

unread,
Jul 31, 2023, 2:43:42 PM7/31/23
to PicoChess
Working SD Card Partitions.jpg

When I put my working SD card into my laptop, I see the 2nd partition that has all of the picochess stuff on it.  I want to look at it and compare to the files on the new image I just put on a different SD card.  This will let me copy my config files and such.

When I right click on the 2nd Disk 1 Partition, i don't get any options to add or change the drive letter.  This is just the Windows Control Panel looking at this, so I may need a better tool. But at least this shows me what a working setup looks like!

Randy Reade

unread,
Jul 31, 2023, 3:06:36 PM7/31/23
to pico...@googlegroups.com
In that picture it's the D:\ drive you want. Place your wpa_supplicant.conf file on there. The other partition is formatted for Linux which Windows can't (easily) read. It is the root partition which also has the picochess files.

Randy

Message has been deleted

Kyle Washington

unread,
Jul 31, 2023, 4:05:51 PM7/31/23
to PicoChess
AHH - yes.  I re-read Randy's message and saw how I got that first part wrong... so I copied my wpa_supplicant file to the file like he said in the first place.... DUH.  It booted all the way to the engine screen! My Wifi is on, and the monitor is talking to me.  

At the bank where I worked, I was the IT guy who helped other folks.. so I never try to make people feel dumb for asking questions.  Because I do feel dumb sometimes myself!  This is exactly what I needed.  Thank you both.  I'll play chess setup for a bit, then I will go back and dig into the file system and try to learn something.  Seeing the image on a real monitor is way better than my tiny touchscreen anyway.

The monitor in the picture has sound, so it boots up and starts repeating "Remove piece from f3."  So before even hitting reply here, I set up the pieces in the right order and plug the board in... then realize that the clock is hardwired to the Pi that is physically screwed into the touchscreen contraption next to the board, and it isn't even on!  This is fun. Now I have something to work with.  I will replicate this same setup and re-mount there, and then maybe I'll have a nice solution and a portable one.  That will take some time... but the tinkering is as much fun as the chess.  :)

I'll read more forums and tinker before I start asking more - I do appreciate the help.  Hopefully I can learn enough to contribute something.

Kyle

20230731_145622.jpg

On Monday, July 31, 2023 at 2:41:43 PM UTC-5 m371...@gmail.com wrote:
You can view the files on the second partition by enabling OpenSSH in Windows (Open Settings, select Apps, then select Optional features) and then using the IP address of your Raspberry to login into the Linux system with Powershell. 
You can find the IP address of you Raspberry Pi under the Picochess menu option: System -> Information -> IP Address

login id is: pi
password is: picochess

Login to your Raspberry using Windows Powershell, using your IP address after the @ symbol

> ssh p...@192.168.1.27                                                 
Password: picochess

Now change to the Picochess directory
cd /opt/picochess

... and list the files
ls -a 

Note: With Samba setup you can alternately access the files on the Linux system via the Windows network. 

Kyle Washington

unread,
Aug 2, 2023, 12:43:13 PM8/2/23
to PicoChess
Update:
I kept my original SD card in my Touchscreen setup, which I have labeled PicoChess OG for my filenames.  It starts, plays voices when I have a second pc with a webserver attached, triggers the DGT 3000, etc.  It works fine, and I am making sure to take timeout from all of this to play a little chess.  Everything else here is just gravy, but it's fun.

I took the new image and put it on a 16Gb SD card.  It boots, loads directly to the PicoChess splash screen then web server, and now that I have figured out how to put the wpa_supplicant file in the right place (thank you again, Randy!), it connects to the network.  Except for sound, it is perfect.  Since it shows everything I need on the clock screen, I question why I went for such a tiny touchscreen setup originally, because a monitor setup is so much more awesome when you need to see/hear the webserver... but still, it's what I have.  So to make this better, I want to add sound. As much wired crap as I have in this house, I can't find a wired powered speaker - so I grabbed a small speaker with a mono 3.5mm jack from my ham radio stuff. It plays sound from Youtube videos, so I know it works - but it doesn't play PicoChess voices. It doesn't play on the OG setup either, so that's something I can browse through the forum to figure out.

So my next step was to try a nice Anker Bluetooth speaker that I have.  It is roughly the size of the DGT 3000, so that would make the whole thing portable if I got that going.  So I found this article about adding Bluetooth to a Pi.  It works, although with the same limitation as the 3.5mm speaker.  And it doesn't auto-connect. I don't need big sound, so maybe I find a small pi-specific speaker that I could just leave inside the touchscreen case.  But if I'm trying to be portable, sound isn't CRITICAL - I just need the moves for the computer. So since they are on the screen, it's still a win - but sound would be nice. So would the DGT 3000.

The DGT 3000 is triggered with the OG setup, but not with the 3.2 card.  That is going to be an edit with the picochess.ini file I believe, so I tried the ssh connection.  It works - but I need to learn a few Linux commands to do that.  Luckily I found the YouTube videos Marc has made, so that will happen with time.  :)  So I connected with VNC, got my OG picochess.ini file and then did the same with the new one.  I'll edit the new one to do the same changes I did last year, and maybe adjust more to try the newest voices.  Plus, I've read how to add the favorites, so I'll play with that too.

But here is what I've found that surprised me - I brought an HP HDMI monitor upstairs so I could just play with all of this on my dining room table, and it has a speaker built in. So with these same images on a plain old Rpi 4 case, I get all of the sound I could want.  That means the touchscreen project can be something fun, but not urgent - and I can play with the new engines and use this monitor without configuring all of this extra stuff. The point of the touchscreen was to be small since I would be looking at the board more than the screen, but it is nice to see the funny comments on the screen and the position moves.

I go back to work tomorrow, and I have the type of job where I work on a computer all day and have tons of internet time in between my daily tasks.  This will let me dig through the forum here and catch up on all of these things that I'm missing.  

Kyle

Randy Reade

unread,
Aug 2, 2023, 1:28:54 PM8/2/23
to pico...@googlegroups.com
Have a look at the text files accompanying the desktop image. It will tell you how to switch audio between the A/V jack and HDMI on the Pi (asound.conf file). It is because PicoChess runs as root and the OS uses PulseAudio which doesn't expect a root user to be using sound.

Randy

Kyle Washington

unread,
Aug 2, 2023, 5:12:36 PM8/2/23
to PicoChess
That makes sense.  I figure I will learn a lot about Linux and the Rpi by tinkering at this point - which is part of the charm!
Message has been deleted

Kyle Washington

unread,
Aug 8, 2023, 8:09:52 AM8/8/23
to PicoChess
I have two successful setups with the Desktop image - one with the touchscreen kiosk box, and one with an HDMI monitor. The HDMI setup has sound in the monitor. It's easy to boot it, wait briefly, and then play.  For a home setup, it's getting close to perfect.  Now I can start to work on improving things as I increase in my Pi knowledge.  Here are the areas where I still struggle:

1. I want to try to create a portable version so I can take the board, the Pi, the clock, and a speaker with me to play.  That means I need to add the DGT 3000 and the Audio Jack sound.  When I edit picochess.ini in the GUI, the file is read only. I tried to mark it read/write in the file properties, but I get an error. I assume that this is because it's the root user? To get around it, I just go to a terminal and use "sudo nano picochess.ini" and it lets me edit and save the change.  I assume there is a better way?

2.  I can right-click on the speaker icon, and that sends sound to the A/V jack.  Then I reboot.  Sound is back on HDMI.  So I changed to the A/V jack again, turned it off, and unplugged the HDMI monitor.  I turned it back on, and there was no sound.  Again I think I'm dancing all around the problem, but I haven't found the right answer yet.

3.  I have two Pi 4s with 4gb on board, and I have a 4 with 8gb.  I haven't yet got the Linus/Pi knowledge to run benchmarks to compare boot or computation speed, so I figured it would be easier to ask here - does it make a difference?  There are no problems that I've seen - I'm more curious than anything.

4.  There are a lot of engines in there now, and most of them beat me handily. That's fine, because I stink, but I'm trying to do puzzles and do games with the chess.com coaches to stop my blundering. I know enough to know that it's not worth my time to study openings or endgames because I'm not there yet.  I don't strive for a rating number - I'm really trying to get good enough to limit "That's a blunder" or "That's a bad move."  I can already see a slight decrease, so it's working!  The next goal will be to play my kid and give him a good game.

  Most of the time, I play the Centaur Adaptive engine because it allegedly will adapt to my low ability and then challenge me. Because I've spent so much time tinkering, I haven't actually played enough games in a row yet to see that, but that's ok. In the meantime, I want to ask - am I playing the right engine?  So assuming this only supplements and doesn't take the place of puzzles and chess.com coach bots - If you were teaching a newb to play chess and you were going to suggest a good picochess engine to play, what would you pick?

5.  I got the DGT board a while back, because I want to learn visually with OTB pieces. I still struggle with notation, so I like the web interface to help me see the moves. So if I can ditch the interface and just use the DGT Pi, it will force me to use the notation and work it out on the board myself.  (That's why I want to fix the sound issue above).  Once I do that... if I plan to use the board and the clock and no monitor - I would then want to run the Lite image but use the same picochess.ini settings... right?

6.   The least important question... Once I learn the notation and I don't NEED a visual cue.. I want to eventually buy a board that lights up the squares where I want to move.  (I have a Centaur, but it's standalone).  The Revelation II is out of my price range for the foreseeable future. I see that the PicoChess image is now compatible with other boards that have lights - has anyone tried one?  If I could get the Squareup Pro or the ChessNut and play the chess.com bots, that + Picochess would give me most everything I need.  I am not buying another board soon, but I haven't read on the forums yet where anyone has tried one.  If you have, what do you think?

I work 12-hour shifts at a local hospital.  I am a data guy that works with nurses in a Tele-ICU unit. We have cameras and monitors to talk to patients and bedside staff in all of the ICUs in the hospital.  So I have a nice big monitor setup, and I get to read these forums all day when I'm waiting for something to happen.  If I can't play chess all day, I can read about this stuff and practice puzzles... so even though I'm not home with my setup, it could be a whole lot worse!  :)  These answers may all be in past posts, but I haven't found them yet, so I thought I'd float them here.  

Kyle

RandyR

unread,
Aug 8, 2023, 11:47:04 AM8/8/23
to PicoChess
Kyle, I'll try to provide some answers:

1. Not sure why the picochess.ini file on your system became owned by root. All the folders/files in the /opt/picochess folder have group and owner set to pi in the image (the old images had them all set to root). Any new files created when PicoChess runs will be owned by root since it is started as a system service. You can issue the following command to give ownership back to the pi user:

sudo chown pi:pi /opt/picochess/picochess.ini

2. Sound output is set in the /etc/asound.conf file so that sound works for the root user (because PicoChess is run as root). The desktop sound selection is only for the Pi user and will get overridden by the asound.conf file on boot.

3. With more memory you could probably use larger hash tables which should increase engine strength but Stockfish doesn't need any more help beating me. :^)

4. You could try some of the Rodent 3 personalities (start with Kids and move up from there).

5. Yes. The Lite image would be preferable in a headless setup.

6. I have a Millennium Exclusive Sensor Board which has LEDs which I use with PicoChess (you need the Chesslink module). I had some issues with piece recognition when it arrived but new pieces were shipped to me which fixed that. But the DGT boards weren't perfect either.

Randy

Kyle Washington

unread,
Aug 8, 2023, 12:52:28 PM8/8/23
to PicoChess
Thank you sir - I'll try some of that!

Kyle

Scally

unread,
Aug 9, 2023, 6:36:21 AM8/9/23
to PicoChess
Hi Kyle,

If you have any old Mephisto boards namely a Modular, Exclusive or München, then these can be used with Picochess with the addition of an Elfacun Module, https://elfacun.eu

I have a few YouTube videos showing it in use with Picochess: https://youtube.com/playlist?list=PLuriIyfKfgqiFuHpLBkD1WBGJ58rOAukN&feature=sharea


Cheers,

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