Bus error using dgtpicom RpiOS64

419 views
Skip to first unread message

RandyR

unread,
Aug 22, 2020, 1:05:36 PM8/22/20
to PicoChess
Today I thought it would be interesting to see if I could get RPiOS64 working on my DGTPi. I compiled dgtpicom and dgtpicom.so from Lucas' github site but it failswith a bus error. This is the output from the debug2 build:

pi@raspberrypi:~/Temp/DGTPi/dgtpi-master $ sudo ./dgtpicom "hello"
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
Bus error

This causes picochess to fail. Does anyone (Lucas?) know what needs to change to support RpiOS64 on a DGTPi (RPi3B)?

Randy

mvanthoor

unread,
Aug 22, 2020, 2:18:19 PM8/22/20
to PicoChess

Wouldn't it be best to wait until RPi-OS is out of beta and officially supported by the Foundation for production use on a Pi, before we start changing software on our end? Maybe the problem isn't in dgtpicom and dgtpicom.so.

I for one don't intend to start building a new reference image on 64-bit RPi-OS for at least three months after an official release.

It's a nice to have; for playing, it's not necessary to have the Pi run a 64-bit OS. Any engine from the first 100 on the CCRL list will wipe the floor with the average grandmaster and below, even when running in 32-bit with 1GB hash. 64-bit is only useful if you're analyzing with the Pi, and use more than 3-4GB of hash tables on the 8GB Pi 4.

So... after the 64-bit OS becomes official and has had some shakedown time, I'll certainly build a new reference image on it, but I'm not in a hurry.

Anyone is free to experience some 64-bit frustrations in the meantime, of course :)

RandyR

unread,
Aug 23, 2020, 2:08:52 PM8/23/20
to PicoChess
I ran dgtpicom (aarch64) through the debugger. Here is the output:

(gdb) r "hello"
Starting program: /home/pi/Temp/DGTPi/dgtpi-master/dgtpicom "hello"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 5747]

Reset I2C device, core freq = 250 MHz
[New Thread 0x7ff7e191e0 (LWP 5750)]

-> 10 20 06 0b 39 b9 = Change State

Thread 1 "dgtpicom" received signal SIGBUS, Bus error.
0x00000055555596cc in i2cSend (message=0x555556d0f8 <mode25> "\020 \006\v9\271", ackAdr=16 '\020')
    at dgtpicom.c:1277
1277        timeOut=*timer + 10000;   // bus should be free in 10ms
(gdb)

Interestingly, the 32-bit version of dgtpicom runs, but dgtpicom.so (32-bit) doesn't. I don't think waiting for the official release of RPiOS64 will make a difference.

Randy

Lucas van der Ploeg | DGT

unread,
Aug 24, 2020, 4:43:36 AM8/24/20
to PicoChess

Hi Randy,


Nice that you are experimenting with 64bit.


I think I know the problem. The 64 bit system timer of the pi 4 is located at 0xfe003004. This is not aligned at 64 bit but at 32 bit. (you cannot divide the address by 8). This doesn't matter for 32 bit systems as it cannot handle 64 bit integers in one operation anyway. 


One solution I can think of is copying the 8 bytes of the timer to a properly aligned 64 bit int every time we want to use it. Does anyone know a better solution?


we could also just keep using the same 32 bit version for both 32 an 64 bit systems but then we stil need to debug the dgtpicom.so problem. Can you send me the output of the 32bit debug2 version of dgtpicom.so when starting Picochess?


kind regards,

Lucas van der Ploeg | DGT


From: pico...@googlegroups.com <pico...@googlegroups.com> on behalf of RandyR <randy...@gmail.com>
Sent: 23 August 2020 20:08:52
To: PicoChess
Subject: Re: Bus error using dgtpicom RpiOS64
 
--
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/a1666ad2-dcaa-4d8b-ab14-5cd6d45b3581n%40googlegroups.com.

RandyR

unread,
Aug 24, 2020, 9:54:29 AM8/24/20
to PicoChess
Hi Lucas,

Note that I'm using the DGTPi (Rpi 3B)

I recompiled your latest dgtpicom and dgtpicom.so for 32-bit with the debug2 option and ran picochess under RPiOS64. Here is the output:

pi@raspberrypi:/opt/picochess $ sudo python3 picochess.py
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -2791 [70%] [-27.91dB] [on]
Traceback (most recent call last):
  File "picochess.py", line 1570, in <module>
    main()
  File "picochess.py", line 944, in main
    DgtPi(dgtboard).start()
  File "/opt/picochess/dgt/pi.py", line 40, in __init__
    self.lib = cdll.LoadLibrary('etc/dgtpicom.x86.so' if machine() == 'x86_64' else 'etc/dgtpicom.so')
  File "/usr/lib/python3.7/ctypes/__init__.py", line 434, in LoadLibrary
    return self._dlltype(name)
  File "/usr/lib/python3.7/ctypes/__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: etc/dgtpicom.so: wrong ELF class: ELFCLASS32
^Z
[1]+  Stopped                 sudo python3 picochess.py
pi@raspberrypi:/opt/picochess $

Here is the gdb output from dgtpicom (32-bit debug2):

(gdb) r "hello"
Starting program: /opt/picochess/etc/dgtpicom "hello"

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 4376]

Reset I2C device, core freq = 250 MHz
[New Thread 0xf7e93460 (LWP 4379)]

-> 10 20 06 0b 39 b9 = Change State
895.565     Send error: byte not Acked
895.565 sending mode25 command failed, sending failed
-> 50 20 05 0d 46 = Ping
895.565     Send error: byte not Acked
<- 00 10 07 02 22 01 05 = Hello

-> 10 20 06 0b 39 b9 = Change State
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 01 01 22 09 df = Time: 00:00.00 00:00.00
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 0c 0a 00 00 00 00 00 00 00 48 = Set And Run
<- 20 10 08 01 0a 08 05 04 = Ack Set And Run
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 05 d4 = Ack End Display
-> 10 20 15 06 68 65 6c 6c 6f 20 20 20 20 20 20 ff 00 03 00 00 93 = Display
<- 00 10 08 01 06 28 05 f1 = Ack Display
895.597 After 0 messages:
Send failed: display=0, endDisplay=0, changeState=1, setCC=0, setNRun=0
Ack failed : display=0, endDisplay=0, changeState=0, setCC=0, setNRun=0
Recieve Errors: timeout=0, wrongAdr=0, bufferFull=0, sizeMismatch=0, CRCFault=0
Max recieve buffer size=4
[Thread 0xf7e93460 (LWP 4379) exited]
[Inferior 1 (process 4373) exited normally]
(gdb)

It printed "hello" on the DGTPi.

Here's the gdb output from dgtpicom.so (32-bit debug2):

(gdb) r
Starting program: /opt/picochess/etc/dgtpicom.so

Program received signal SIGSEGV, Segmentation fault.
0x00000000 in ?? ()
(gdb)


Hope this helps.

Randy

RandyR

unread,
Aug 24, 2020, 11:53:47 AM8/24/20
to PicoChess
Also, here is the output of Valgrind using the aarch64 version of dgtpicom:

pi@raspberrypi:~/Temp/DGTPi/dgtpi-master $ sudo valgrind ./dgtpicom "hello"
==2657== Memcheck, a memory error detector
==2657== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==2657== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info
==2657== Command: ./dgtpicom hello
==2657==
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
==2657==
==2657== Process terminating with default action of signal 7 (SIGBUS)
==2657==  Invalid address alignment at address 0x4024004
==2657==    at 0x10C6CC: i2cSend (dgtpicom.c:1277)
==2657==    by 0x10B1DB: dgt3000Mode25 (dgtpicom.c:833)
==2657==    by 0x10A04F: dgtpicom_configure (dgtpicom.c:422)
==2657==    by 0x1092BF: main (dgtpicom.c:71)
==2657==
==2657== HEAP SUMMARY:
==2657==     in use at exit: 272 bytes in 1 blocks
==2657==   total heap usage: 6 allocs, 5 frees, 7,224 bytes allocated
==2657==
==2657== LEAK SUMMARY:
==2657==    definitely lost: 0 bytes in 0 blocks
==2657==    indirectly lost: 0 bytes in 0 blocks
==2657==      possibly lost: 272 bytes in 1 blocks
==2657==    still reachable: 0 bytes in 0 blocks
==2657==         suppressed: 0 bytes in 0 blocks
==2657== Rerun with --leak-check=full to see details of leaked memory
==2657==
==2657== For counts of detected and suppressed errors, rerun with: -v
==2657== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
Bus error
pi@raspberrypi:~/Temp/DGTPi/dgtpi-master $


Not sure if it helps...

Randy

Lucas van der Ploeg | DGT

unread,
Aug 25, 2020, 6:01:10 AM8/25/20
to PicoChess

Thanks for testing,

 

It looks like we cannot use a 32 bit library (.so file) in a 64bit version of python.

This means we would have to create two versions of the library both for 32 bit an 64 bit. We would also have to think of how to automatically choose the right one from python.

 

I can take a look at fixing the 64 bit version later this week.

 

Best regards,

Lucas van der Ploeg | DGT

From: pico...@googlegroups.com [mailto:pico...@googlegroups.com] On Behalf Of RandyR
Sent: 24 August 2020 15:54
To: PicoChess <pico...@googlegroups.com>
Subject: Re: Bus error using dgtpicom RpiOS64

 

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

RandyR

unread,
Aug 25, 2020, 8:57:42 AM8/25/20
to PicoChess
Thanks, Lucas. That would be great.

I don't think choosing the correct version to use will be an issue. When picochess is installed into a 64-bit OS, the correct versions of dgtpicom and dgtpicom.so will have to be used, and any image produced will then already have the correct versions installed.

Randy

Lucas van der Ploeg | DGT

unread,
Aug 31, 2020, 8:17:58 AM8/31/20
to PicoChess

Hi,


I have pushed a potential fix for 64 bit compilation to my git page,

I have not tested it, so if it does not help, please let me know. If this solves the problem, enjoy!


regards,

Lucas van der Ploeg | DGT

Sent: 25 August 2020 14:57:42
To: PicoChess

Subject: Re: Bus error using dgtpicom RpiOS64
Thanks, Lucas. That would be great.

I don't think choosing the correct version to use will be an issue. When picochess is installed into a 64-bit OS, the correct versions of dgtpicom and dgtpicom.so will have to be used, and any image produced will then already have the correct versions installed.

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.

RandyR

unread,
Aug 31, 2020, 10:16:16 AM8/31/20
to PicoChess
Hi Lucas.

I tested the 32-bit compiles you pushed and got the same error ( OSError: etc/dgtpicom.so: wrong ELF class: ELFCLASS32) as expected. I then compiled them for aarch64 but I am getting the same bus error:

pi@raspberrypi:~ $ 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: failed (Result: signal) since Mon 2020-08-31 08:38:00 CDT; 3min 3s ago
  Process: 366 ExecStart=/usr/bin/python3 /opt/picochess/picochess.py (code=killed, signal=BUS)
 Main PID: 366 (code=killed, signal=BUS)

Aug 31 08:37:53 raspberrypi systemd[1]: Started PicoChess stand alone chess computer based on DGT board.
Aug 31 08:38:00 raspberrypi python3[366]: Simple mixer control 'Headphone',0
Aug 31 08:38:00 raspberrypi python3[366]:   Capabilities: pvolume pvolume-joined pswitch pswitch-joined
Aug 31 08:38:00 raspberrypi python3[366]:   Playback channels: Mono
Aug 31 08:38:00 raspberrypi python3[366]:   Limits: Playback -10239 - 400
Aug 31 08:38:00 raspberrypi python3[366]:   Mono: Playback -2791 [70%] [-27.91dB] [on]
Aug 31 08:38:00 raspberrypi systemd[1]: picochess.service: Main process exited, code=killed, status=7/BUS
Aug 31 08:38:00 raspberrypi systemd[1]: picochess.service: Failed with result 'signal'.

pi@raspberrypi:/opt/picochess $ sudo python3 picochess.py
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -2791 [70%] [-27.91dB] [on]
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
Bus error

Here is the gdb output (of dgtpicom):

pi@raspberrypi:/opt/picochess/etc $ sudo gdb dgtpicom
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from dgtpicom...done.
(gdb) r "hello"
Starting program: /opt/picochess/etc/dgtpicom "hello"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 2870]
Reset I2C device, core freq = 250 MHz
[New Thread 0x7ff7e191e0 (LWP 2884)]
-> 10 20 06 0b 39 b9 = Change State

Thread 1 "dgtpicom" received signal SIGBUS, Bus error.
0x000000555555a958 in timer () at dgtpicom.c:1665
1665            i += *timerh;
(gdb) disas /m timer
Dump of assembler code for function timer:
1662    {

1663            static long long int i;
1664            i = (long long int)*timerl << 32;
   0x000000555555a92c <+0>:     adrp    x0, 0x555556d000
   0x000000555555a930 <+4>:     ldr     x0, [x0, #3904]
   0x000000555555a934 <+8>:     ldr     x0, [x0]
   0x000000555555a938 <+12>:    ldr     x0, [x0]
   0x000000555555a93c <+16>:    lsl     x1, x0, #32
   0x000000555555a940 <+20>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a944 <+24>:    add     x0, x0, #0x230
   0x000000555555a948 <+28>:    str     x1, [x0]

1665            i += *timerh;
   0x000000555555a94c <+32>:    adrp    x0, 0x555556d000
   0x000000555555a950 <+36>:    ldr     x0, [x0, #3920]
   0x000000555555a954 <+40>:    ldr     x0, [x0]
=> 0x000000555555a958 <+44>:    ldr     x1, [x0]
   0x000000555555a95c <+48>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a960 <+52>:    add     x0, x0, #0x230
   0x000000555555a964 <+56>:    ldr     x0, [x0]
   0x000000555555a968 <+60>:    add     x1, x1, x0
   0x000000555555a96c <+64>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a970 <+68>:    add     x0, x0, #0x230
   0x000000555555a974 <+72>:    str     x1, [x0]

1666            return &i;
   0x000000555555a978 <+76>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a97c <+80>:    add     x0, x0, #0x230

1667    }
   0x000000555555a980 <+84>:    ret

End of assembler dump.
(gdb)


Randy
On Monday, August 31, 2020 at 7:17:58 AM UTC-5 Lucas van der Ploeg wrote:

Hi,


I have pushed a potential fix for 64 bit compilation to my git page,

I have not tested it, so if it does not help, please let me know. If this solves the problem, enjoy!


regards,

Lucas van der Ploeg | DGT

Lucas van der Ploeg | DGT

unread,
Aug 31, 2020, 10:38:10 AM8/31/20
to PicoChess

At least the location of the error changed,

I have made another change, hope it helps, thanks for testing!


regards,

Lucas van der Ploeg | DGT

Sent: 31 August 2020 16:16:15

RandyR

unread,
Aug 31, 2020, 10:55:17 AM8/31/20
to PicoChess
Thanks for trying to solve this, Lucas!

Still fails unfortunately (aarch64):

pi@raspberrypi:/opt/picochess $ sudo python3 picochess.py
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -2791 [70%] [-27.91dB] [on]
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
Bus error
pi@raspberrypi:/opt/picochess $ cd etc
pi@raspberrypi:/opt/picochess/etc $ sudo gdb dgtpicom
GNU gdb (Debian 8.2.1-2+b3) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "aarch64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
Find the GDB manual and other documentation resources online at:

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from dgtpicom...done.
(gdb) r "hello"
Starting program: /opt/picochess/etc/dgtpicom "hello"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/aarch64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 2118]
Reset I2C device, core freq = 250 MHz
[New Thread 0x7ff7e191e0 (LWP 2121)]
-> 10 20 06 0b 39 b9 = Change State

Thread 1 "dgtpicom" received signal SIGBUS, Bus error.
timer () at dgtpicom.c:1664
1664            long j = *timerh;
(gdb) disas /m timer
Dump of assembler code for function timer:
1662    {
   0x000000555555a92c <+0>:     sub     sp, sp, #0x10

1663            static long long int i;
1664            long j = *timerh;
   0x000000555555a930 <+4>:     adrp    x0, 0x555556d000
   0x000000555555a934 <+8>:     ldr     x0, [x0, #3920]
   0x000000555555a938 <+12>:    ldr     x0, [x0]
=> 0x000000555555a93c <+16>:    ldr     x0, [x0]
   0x000000555555a940 <+20>:    str     x0, [sp, #8]

1665            i = (long long int)*timerl << 32;
   0x000000555555a944 <+24>:    adrp    x0, 0x555556d000
   0x000000555555a948 <+28>:    ldr     x0, [x0, #3904]
   0x000000555555a94c <+32>:    ldr     x0, [x0]
   0x000000555555a950 <+36>:    ldr     x0, [x0]
   0x000000555555a954 <+40>:    lsl     x1, x0, #32
   0x000000555555a958 <+44>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a95c <+48>:    add     x0, x0, #0x230
   0x000000555555a960 <+52>:    str     x1, [x0]

1666            i += j;
   0x000000555555a964 <+56>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a968 <+60>:    add     x0, x0, #0x230
   0x000000555555a96c <+64>:    ldr     x1, [x0]
   0x000000555555a970 <+68>:    ldr     x0, [sp, #8]
   0x000000555555a974 <+72>:    add     x1, x1, x0
   0x000000555555a978 <+76>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a97c <+80>:    add     x0, x0, #0x230
   0x000000555555a980 <+84>:    str     x1, [x0]

1667            return &i;
   0x000000555555a984 <+88>:    adrp    x0, 0x555556e000 <__cxa_f...@got.plt>
   0x000000555555a988 <+92>:    add     x0, x0, #0x230

1668    }
   0x000000555555a98c <+96>:    add     sp, sp, #0x10
   0x000000555555a990 <+100>:   ret

End of assembler dump.
(gdb)

Randy
On Monday, August 31, 2020 at 9:38:10 AM UTC-5 Lucas van der Ploeg wrote:

At least the location of the error changed,

I have made another change, hope it helps, thanks for testing!


regards,

Lucas van der Ploeg | DGT

Lucas van der Ploeg | DGT

unread,
Aug 31, 2020, 11:03:33 AM8/31/20
to PicoChess

hopefully 3rd try is the charm.


regards,

Lucas van der Ploeg | DGT

Sent: 31 August 2020 16:55:16
Message has been deleted

RandyR

unread,
Aug 31, 2020, 11:39:18 AM8/31/20
to PicoChess
Definite progress now, Lucas. It works, but the buttons on the DGTPi are too sensitive(?). What I mean is that they work, but you have to press them very quickly (tap them - do not hold them, even for 1/2 second). Otherwise, the display changes as if you've pressed the button multiple times, and sometimes it goes back to the Mode 25 display.

We're very close. :^)

Randy

On Monday, August 31, 2020 at 10:03:33 AM UTC-5 Lucas van der Ploeg wrote:

hopefully 3rd try is the charm.


regards,

Lucas van der Ploeg | DGT

Lucas van der Ploeg | DGT

unread,
Sep 4, 2020, 6:07:14 AM9/4/20
to PicoChess

Hi Randy,


Well, at least it runs now so that's progress. I have no Idea what this new problem could be. So if you have any ideas yourself of what it could be or any additional information I will take a look at it. Not next week because I will be on holiday. 


regards,

Lucas van der Ploeg | DGT

Sent: 31 August 2020 17:39:18

RandyR

unread,
Sep 4, 2020, 10:34:36 AM9/4/20
to PicoChess
Enjoy your holiday, Lucas.

I'll see what I can figure out in the code. Maybe related to DGTPICOM_KEY_DELAY or DGTPICOM_KEY_REPEAT?

Randy

RandyR

unread,
Sep 6, 2020, 5:32:07 PM9/6/20
to PicoChess
Success!

I finally got back to looking at the issues I was seeing. The button problem I was experiencing is gone. I think it may have been a stuck button on the front of the DGTPi. For the standby issue (using 2 white queens, or executing 'sudo systemctl isolate dgtpistandby.target' would show Hello world on the display, with all the symbols and segments on the clock sequencing off and on continuously) I recompiled the files, without the debug option (i.e. 'make all') and the DGTPi now properly goes into standby mode and blanks the display. Not sure why.

So, I can now confirm that picochess runs under RPiOS64 on both the RPi4B and stock DGTPi, thanks to Lucas' programming skills. (It also runs on an Nvidia Jetson AGX Xavier, if anyone is interested. :^) )

I have attached the 2 files compiled for aarch64.

Randy

dgtpicom.so
dgtpicom

mvanthoor

unread,
Sep 7, 2020, 9:04:48 AM9/7/20
to PicoChess
Oh No's, it works! :O

That means I'll have to create a 64-bit image in the same style as the 32-bit Ver10 Beta 1 I just released, after a 64-bit OS becomes final.

RandyR

unread,
Sep 7, 2020, 11:42:42 AM9/7/20
to PicoChess
😁

RandyR

unread,
Sep 10, 2020, 1:05:37 PM9/10/20
to PicoChess
Unfortunately, I was a bit hasty in my enthusiasm.

I had a game yesterday on the DGTPi and after it was over (mate) I set the pieces back to the starting position, replaced the white king with the extra white queen to go into 'standby' and picochess just tried to restart rather than blanking the display.  It didn't even print 'goodbye' on the clock display. I have attached the picochess.log portion showing the warnings which occurred right after replacing the white king (you can see the pieces on the 'board') in hopes it will help Lucas figure out the issue. I also recompiled the 2 files with debug2, which also brought back the strange 'Hello world' display when going into 'standby'. Here is the output from running dgtpicom right after a reboot (picochess.service and dgtpi.service are disabled):

pi@raspberrypi:~ $ sudo /opt/picochess/etc/dgtpicom "  DGT  P|  " 1

Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 04 03 81 = Ack Change State
515.008 sending mode25 command failed, negative ack, not in Central Controll
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
-> 10 20 05 0f 48 = Set Central Control
<- 20 10 08 01 0f 08 03 d6 = Ack Set Central Control

-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 0c 0a 00 00 00 00 00 00 00 48 = Set And Run
<- 20 10 08 01 0a 08 05 04 = Ack Set And Run
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 05 d4 = Ack End Display
-> 10 20 15 06 20 20 44 47 54 20 20 50 7c 20 20 ff 01 03 00 00 3f = Display

<- 00 10 08 01 06 28 05 f1 = Ack Display
515.043 After 0 messages:
Send failed: display=0, endDisplay=0, changeState=0, setCC=0, setNRun=0

Ack failed : display=0, endDisplay=0, changeState=0, setCC=0, setNRun=0
Recieve Errors: timeout=0, wrongAdr=0, bufferFull=0, sizeMismatch=0, CRCFault=0
Max recieve buffer size=7
pi@raspberrypi:~ $


So, it appears there is some communication error (?) between the clock and the Pi3B.

Another issue is that restarting with the 2 black queens, when starting picochess from the command line - not as a service, gives the following error (but picochess keeps running):

Exception in thread Thread-3:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/opt/picochess/talker/picotalker.py", line 628, in run
    wait(3)
NameError: name 'wait' is not defined

However, using the 2 black queens a second time, seems to work and the command line picochess process gets terminated (and the picochess service starts up), so maybe it's to be expected.

Randy
Picochess_Log_Excerpt.txt

RandyR

unread,
Sep 10, 2020, 6:08:26 PM9/10/20
to PicoChess
For the restart error above, I don't believe wait() is a valid command in picotalker.py (v2.01). I think you need to use ...

import time

time.sleep(3)

... instead.


Randy

Dirk

unread,
Sep 10, 2020, 6:23:58 PM9/10/20
to PicoChess
Hi Randy,

thanks for mentioning - this will be fixed in my V3 version although shutdown/restart on 32 bit RaspianOS obviously works (kind of strange).

Dirk

RandyR

unread,
Sep 10, 2020, 8:29:51 PM9/10/20
to PicoChess
Hi Dirk,

It is strange. I’m learning as I go along so maybe, given enough time, I’ll figure it out. 😊 I see the purpose of the Standby and Restart functions for the DGTPi, but I’ve also changed them to ‘shutdown -h now’ and ‘reboot now’ as they better suit me. I’ll try to figure out how the button on the bottom of the DGTPi figures into the DGT files. Gives me something to do. 😉

Randy

Dirk

unread,
Sep 11, 2020, 2:19:10 AM9/11/20
to PicoChess
Randy, you can look in
/picochess/dgt/display.py 
at the “_process_button” functions...

Dirk 

RandyR

unread,
Sep 11, 2020, 9:29:34 AM9/11/20
to PicoChess
Thanks, Dirk. I'll have a look at systemd as well to see if I can understand how the services work.

Randy

RandyR

unread,
Sep 11, 2020, 8:15:16 PM9/11/20
to PicoChess
Just for comparison, I decided to make a new RPiOS64 image for the DGTPi, this time with picochess v0.9n. On first boot after everything was setup, the button issue returned. It’s not a sticky button, almost as if the buttons repeat if you hold them too long, as the menu would skip options. Also, the clock screen would sometimes show (like when you just turn on the clock without power to the RPi inside) and you would have to  try to select the Time menu to sort it out. I played a quick Fool’s Mate game then tested the Standby/Sleep function and it correctly said Goodbye and turned off the display. The On button successfully started picochess back up, but the mode 25 screen flashed momentarily before DGT Pi came on. Something’s still not right with the DGTPi-specific files I’m afraid. It’s currently only working sporadically. I hope Lucas has some more ideas. 😁

Randy

RandyR

unread,
Sep 12, 2020, 4:03:56 PM9/12/20
to PicoChess
Here is some debug output from the DGTPi (using v2.01). I disabled the picochess.service, rebooted the DGTPi (via ssh), the dgtpi.service displayed its DGT P| message, I logged in via ssh and ran picochess manually. All I did was wait for the display to show Picochs 2.01 and switch to the time. I then pressed the right-most clock button and here is the output:

pi@DGTPiOS64:/opt/picochess $ sudo python3 picochess.py
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -131 [95%] [-1.31dB] [on]
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 04 05 93 = Ack Change State
60.583 sending mode25 command failed, negative ack, not in Central Controll
<- 00 10 18 04 01 80 00 00 00 00 00 80 00 00 00 10 00 19 05 01 01 22 09 ce = Time: 00:00.00 00:00.00
-> 10 20 05 0f 48 = Set Central Control
<- 20 10 08 01 0f 08 05 c4 = Ack Set Central Control
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 50 69 63 6f 43 68 73 20 32 30 31 ff 00 03 00 10 f9 = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
-> 10 20 0c 0a 00 15 10 00 15 10 00 5c = Set And Run
<- 20 10 08 01 0a 08 05 04 = Ack Set And Run
<- 00 10 08 01 06 18 03 1a = Ack Display
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 05 d4 = Ack End Display
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 05 d4 = Ack End Display
-> 10 20 15 06 55 53 42 20 65 2d 42 6f 61 72 64 ff 00 03 00 00 8e = Display
<- 00 10 08 01 06 28 05 f1 = Ack Display
<- 00 10 18 04 01 80 15 10 00 00 00 80 15 10 00 10 00 19 05 01 01 22 09 3e = Time: 00:15.10 00:15.10
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 05 63 = Ack End Display
-> 10 20 0c 0a 00 15 10 00 15 10 00 5c = Set And Run
<- 20 10 08 01 0a 08 05 04 = Ack Set And Run
<- 00 10 18 04 01 80 15 10 00 00 00 80 15 10 00 10 00 19 05 01 01 22 09 3e = Time: 00:15.10 00:15.10
<- 00 10 18 04 01 80 15 10 00 00 00 80 15 10 00 10 00 19 05 01 01 22 09 3e = Time: 00:15.10 00:15.10
<- 00 10 0a 05 50 40 03 00 00 35 = Button: 0x40>0x50
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 05 d4 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 00 00 45 = Display
70.528     Send error: done timeout, waited more then 10ms for message to be finished sending
70.528 sending display command failed, sending failed
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 70.529     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
70.529 sending display command failed, sending failed
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 70.529     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
70.530 sending display command failed, sending failed
70.530 sending display command failed three times on error-6

-> 10 20 06 0b 39 b9 = Change State
70.536     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
70.536 sending mode25 command failed, sending failed
I2C Master might be stuck in transfer?
FIFO=60000031
C   =8000
S   =152
DLEN=0
A   =8
FIFO=8
DIV =a47
Del =300030
I2C Slave might be stuck in transfer?
DR  =320018
RSR =0
SLV =0
CR  =285
FR  =32
SDA=1
SCL=0
<- 00 10 18 04 01 80 15 10 00 00 00 80 15 10 00 10 00 19 05 01 01 22 09 3e = Time: 00:15.10 00:15.10
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 05 07 70 = End Display
70.574     Send error: done timeout, waited more then 10ms for message to be finished sending
70.574 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
70.578     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.578 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
70.582     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.582 sending end display command failed, sending failed
70.582 sending clear display failed three times on error-6

-> 10 20 05 07 70 = End Display
70.637     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.637 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
70.639     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.639 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
70.647     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.647 sending end display command failed, sending failed
70.647 sending clear display failed three times on error-6

-> 10 20 06 0b 39 b9 = Change State
70.649     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
70.649 sending mode25 command failed, sending failed
<- 00 10 0a 05 40 50 05 00 04 01 = Button: 0x50>0x40
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 03 c6 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 00 00 45 = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 00 00 45 = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 00 00 45 = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 03 c6 = Ack End Display
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
^Z
[1]+  Stopped                 sudo python3 picochess.py

If I recall correctly, it said 'OK MODE' three times. I hope this helps Lucas figure it out.

Randy

esse...@gmail.com

unread,
Sep 14, 2020, 4:57:40 AM9/14/20
to PicoChess
Hallo RandyR. I'm looking for a finished img with Stockfish 12 NNUE for Rasberry 4b Buster. Does that already exist?

RandyR schrieb am Samstag, 22. August 2020 um 19:05:36 UTC+2:
Today I thought it would be interesting to see if I could get RPiOS64 working on my DGTPi. I compiled dgtpicom and dgtpicom.so from Lucas' github site but it failswith a bus error. This is the output from the debug2 build:

pi@raspberrypi:~/Temp/DGTPi/dgtpi-master $ sudo ./dgtpicom "hello"
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
Bus error

This causes picochess to fail. Does anyone (Lucas?) know what needs to change to support RpiOS64 on a DGTPi (RPi3B)?

Randy

Lucas van der Ploeg | DGT

unread,
Sep 14, 2020, 10:25:36 AM9/14/20
to PicoChess

Hey Randy,


you were right suspecting a timing issue, having multiple 10ms timeouts withing 1ms should nog be possible, the strange thing is the printing of the time is correct. (Assuming your pi has been on for 60s at the first error message). I have changed something to the timer that might help.


let me know if this helps. 


regards,
Lucas van der Ploeg | DGT

Sent: 12 September 2020 22:03:56

To: PicoChess
Subject: Re: Bus error using dgtpicom RpiOS64
--
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.

RandyR

unread,
Sep 14, 2020, 10:40:23 AM9/14/20
to PicoChess
On Monday, September 14, 2020 at 3:57:40 AM UTC-5 esse...@gmail.com wrote:
Hallo RandyR. I'm looking for a finished img with Stockfish 12 NNUE for Rasberry 4b Buster. Does that already exist?

Esser, I'm not aware of any images available for download that have SF 12. You have a few options - wait until someone makes an image to share, do the update yourself using Al's instructions, or connect a monitor/keyboard/mouse to your RPi4 and using the desktop version of RPiOS make the changes in a graphical environment. 

Randy

 

RandyR

unread,
Sep 14, 2020, 10:43:20 AM9/14/20
to PicoChess
Thanks, Lucas! I did have it ON for about a minute. I will test this and get back to you.

Randy

RandyR

unread,
Sep 14, 2020, 11:15:50 AM9/14/20
to PicoChess
Lucas, I'm still seeing the button issue. I started picochess and waited until the time was displayed, then pressed the far right button. The display flickered a few times and "OK MODE" was played through the speaker. It was as if I had pressed the button twice so it sounds like there needs to be more delay between listening for button presses. Here is the output:

pi@DGTPiOS64:/opt/picochess $ sudo python3 picochess.py
Simple mixer control 'Headphone',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback -131 [95%] [-1.31dB] [on]
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 04 05 93 = Ack Change State
65.172 sending mode25 command failed, negative ack, not in Central Controll
<- 00 10 0a 05 50 40 03 00 00 35 = Button: 0x40>0x50
-> 10 20 05 07 70 = End Display
72.465     Send error: done timeout, waited more then 10ms for message to be finished sending
72.465 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
72.468     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
72.468 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
72.478     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
72.478 sending end display command failed, sending failed
72.478 sending clear display failed three times on error-6

-> 10 20 06 0b 39 b9 = Change State
72.490     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
72.490 sending mode25 command failed, sending failed
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
72.519 Button buffer full, repeated buttons ignored
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 05 07 70 = End Display
72.529     Send error: Bus free timeout, waited more then 10ms for bus to be free
72.529 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
72.529 Button buffer full, repeated buttons ignored
<- 20 10 08 01 07 0d 03 c6 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 72.531 Button buffer full, repeated buttons ignored
00 00 45 = Display
72.532     Send error: done timeout, waited more then 10ms for message to be finished sending
72.532 sending display command failed, sending failed
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 72.533     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
72.533 sending display command failed, sending failed
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 72.533     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
72.533 sending display command failed, sending failed
72.533 sending display command failed three times on error-6

-> 10 20 05 07 70 = End Display
73.999     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
73.999 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
74.002     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
74.002 sending end display command failed, sending failed
-> 10 20 05 07 70 = End Display
74.004     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
74.004 sending end display command failed, sending failed
74.004 sending clear display failed three times on error-6

-> 10 20 06 0b 39 b9 = Change State
74.006     Send error: Bus free timeout, waited more then 10ms for bus to be free
                SCL low. Remove jack?
                SDA low. Remove jack?
74.006 sending mode25 command failed, sending failed
<- 00 10 0a 05 40 50 05 00 03 14 = Button: 0x50>0x40
I2C Master might be stuck in transfer?
FIFO=60000031
C   =8000
S   =152
DLEN=0
A   =8
FIFO=8
DIV =a47
Del =300030
I2C Slave might be stuck in transfer?
DR  =28300010
RSR =0
SLV =0
CR  =285
FR  =1830
SDA=1
SCL=0
74.009     Receive error: Wrong adress, Received message not from clock (16) but from 24.
00 18 04 00
<- 00 18 04 00 ff 50 05 00 03 14 ff 80 15 10 00 10  = Error: -1
74.010     Receive error: Wrong adress, Received message not from clock (16) but from 25.
00 19 03
<- 00 19 03 ff ff 50 05 00 03 14 ff 80 15 10 00 10  = Error: -1
74.010     Receive error: Wrong adress, Received message not from clock (16) but from 1.
00 01 01
<- 00 01 01 ff ff 50 05 00 03 14 ff 80 15 10 00 10  = Error: -1
74.011     Receive error: Wrong adress, Received message not from clock (16) but from 34.
00 22 09 45
<- 00 22 09 45 ff 50 05 00 03 14 ff 80 15 10 00 10  = Error: -1
Reset I2C device, core freq = 250 MHz
-> 10 20 06 0b 39 b9 = Change State
<- 20 10 08 01 0b 08 03 7d = Ack Change State
-> 10 20 05 07 70 = End Display
<- 20 10 08 01 07 0d 03 c6 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4d 6f 64 65 20 20 20 20 20 20 20 ff 00 03 00 00 45 = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
-> 10 20 05 07 70 = End Display
<- 00 10 08 01 07 18 03 71 = Ack End Display
-> 10 20 15 06 4e 6f 72 6d 61 6c 20 20 20 20 20 ff 00 03 00 00 fc = Display
<- 00 10 08 01 06 28 03 e3 = Ack Display
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
<- 00 10 18 04 00 00 00 00 00 00 00 00 00 00 00 00 00 19 03 01 01 22 09 45 = Time: 00:00.00 00:00.00
^Z
[1]+  Stopped                 sudo python3 picochess.py
pi@DGTPiOS64:/opt/picochess $

Randy

On Monday, September 14, 2020 at 9:25:36 AM UTC-5 Lucas van der Ploeg wrote:

Hey Randy,


you were right suspecting a timing issue, having multiple 10ms timeouts withing 1ms should nog be possible, the strange thing is the printing of the time is correct. (Assuming your pi has been on for 60s at the first error message). I have changed something to the timer that might help.


let me know if this helps. 


regards,
Lucas van der Ploeg | DGT

Lucas van der Ploeg | DGT

unread,
Sep 16, 2020, 3:37:56 AM9/16/20
to PicoChess

Thanks for testing,


I ran out of ideas on what I can try. I will have to create a 64-bit image and test myself at a later date.


kind regards,



Lucas van der Ploeg | DGT

Sent: 14 September 2020 17:15:50

RandyR

unread,
Sep 16, 2020, 10:06:40 AM9/16/20
to PicoChess
Ok. Thanks for trying Lucas. You did make some progress and I'm sure you'll solve it when you get the time. If I can be of any help, just let me know.

Randy

On Wednesday, September 16, 2020 at 2:37:56 AM UTC-5 Lucas van der Ploeg wrote:

Thanks for testing,


I ran out of ideas on what I can try. I will have to create a 64-bit image and test myself at a later date.


kind regards,



Lucas van der Ploeg | DGT

RandyR

unread,
Dec 2, 2020, 2:04:19 PM12/2/20
to PicoChess
Hi Lucas.

I was wondering if you have had the chance to look into the button issue? If you need a 64-bit image, I can provide one. RPiOS64 works fine using the standalone RPi 4 with the clock connected to the board using the clock cable. Although the DGTPi is useable, navigating the menu using the buttons is tricky as the menu usually (but not always) advances more than one step when you press a button.

Randy

Lucas van der Ploeg | DGT

unread,
Dec 2, 2020, 5:02:50 PM12/2/20
to PicoChess

Hi Randy,


I have not spend any time on it lately. I ran out of ideas on what it could possibly be. I am a bit busy at the moment as I will be moving to Norway next month. Having an image would definitely help so take a look at the problem myself.


kind regards,

Lucas van der Ploeg | DGT

Sent: 02 December 2020 20:04:19

To: PicoChess
Subject: Re: Bus error using dgtpicom RpiOS64
Hi Lucas.

I was wondering if you have had the chance to look into the button issue? If you need a 64-bit image, I can provide one. RPiOS64 works fine using the standalone RPi 4 with the clock connected to the board using the clock cable. Although the DGTPi is useable, navigating the menu using the buttons is tricky as the menu usually (but not always) advances more than one step when you press a button.

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.

RandyR

unread,
Dec 2, 2020, 7:04:57 PM12/2/20
to PicoChess
Hi Lucas. That sounds exciting. I hope the move goes smoothly. As for the image, I will put one together and hopefully have it available tomorrow.

Randy

RandyR

unread,
Dec 2, 2020, 9:45:08 PM12/2/20
to PicoChess
Hi Lucas.

I have created the image. It is made for the DGTPi (or a wired DGT3000 I suppose) but can be converted to use in a standalone RPi 3 or 4 if anyone wants to try it. I included 3 engines: Stockfish 12, lc0 v0.26.3 and Rodent IV. The original 32-bit dgtpicom and dgtpicom.so files I have renamed in the /opt/picochess/etc folder and the 64-bit ones in there are your latest versions compiled with the debug2 option. The source code is in the pi home directory. Login is username: pi password: picochess. I tested the image on a separate 8GB SD card. Also, it is the Lite version of RPi OS (2020-08-20-raspios-buster-arm64-lite).

I really hope you can figure it out. You will notice that the standby function does not blank the display either.

The image is available here (1.4GB)

Randy

Henri

unread,
Dec 3, 2020, 5:17:00 AM12/3/20
to PicoChess
Hi there Randy,

Tried it out, but I see no picochess webserver to connect to.....

Henri

Op donderdag 3 december 2020 om 03:45:08 UTC+1 schreef RandyR:

Kiko Gomez

unread,
Dec 3, 2020, 6:13:43 AM12/3/20
to PicoChess
Hi Henri,
I dont have Rpi 4 to test it but doing a fast check to the image this doesnt have autostart for the WebServer so you will need to start it through the picochess.ini, uncomment the line web-server = 8080 and you must have the WebServer in http://your.picochess.ip.address:8080, if you modify to web-server = 80 then you will need only http://your.picochess.ip.address.

-Kiko

Henri

unread,
Dec 3, 2020, 7:31:35 AM12/3/20
to PicoChess
Hi Kiko,
Yes, it works that way. But 'normally' the pico webserver is activated at start and you don't need to adjust the picochess.ini for it.

Thanks,
Henri

Op donderdag 3 december 2020 om 12:13:43 UTC+1 schreef kinam...@gmail.com:

RandyR

unread,
Dec 3, 2020, 8:35:24 AM12/3/20
to PicoChess
Hi Heri, glad you and Kiko sorted it out. Yes, I don't typically use the webserver so didn't enable it in this quick image build. There are some other things that may not work - selecting engine and levels using the extra queens (not tested but the engines are not named a-engine, b-engine, etc., and there is no script for adjusting Rodent's playing strength. Also, the localization is set for Canada. And, the auto-resize on first boot didn't work using pishrink. You should probably use raspi-config to set up the locale and wi-fi. Finally, the debug2 version of dgtpicom.so will put alot of info into some logs in /var/log (I forget which one(s)), but you can just run make in the home folder and move the 2 files created to the /opt/picochess/etc folder (only necessary if using the DGTPi). This image was really just to help Lucas.

I should have some time today to fix the image so it works more like people expect. I'll post back when it's done.

Randy

P.S. You gave me an idea about the webserver - I wonder if using that is a workaround for the DGTPi button and standby issue? I'll have to test that.

RandyR

unread,
Dec 3, 2020, 1:50:15 PM12/3/20
to PicoChess
I have updated the image so it now automatically expands to fill the SD card size on first boot (well, technically the second boot). Also, I added the Rod4Elo.sh script (slightly modified Al's version) into the pi home folder so you can adjust the strength of the personalities in Rodent IV (I believe it is set at 1400 to begin with). The engines are renamed and you can now use the extra queens to select engine and level. The webserver will be available (port 80) when the RPi is connected to the network (hostname is DGTPiOS64), and continue game is enabled in picochess.ini. Also, I replaced the dgtpicom and dgtpicom.so files with their non-debug versions so it won't put too much into /var/log. The source and Makefile for them are still in the pi home folder. I think that's it.

And, good news, the webserver buttons work flawlessly to go through the DGTPi menus. Very handy. I'd like the buttons to work, though. I hope Lucas is successful.

The link should be the same but I'll re-paste it here.

 Randy

RandyR

unread,
Dec 6, 2020, 5:03:11 PM12/6/20
to PicoChess
I made another update (Rodent IV is updated to v 0.32 with additional personalities) and I changed the compression (to .7z) so the file size is smaller.

Here is the link. (952 MB)

Randy

Henri

unread,
Dec 7, 2020, 6:21:17 AM12/7/20
to PicoChess
Good stuff Randy, it's always handy to have a recent image, as long as we're waiting for Dirks 3.0!

Henri

Op zondag 6 december 2020 om 23:03:11 UTC+1 schreef RandyR:
Reply all
Reply to author
Forward
0 new messages