I'm trying to connect xboard (or icsdrone) to a chess-playing device that speaks UCI and is connected to a serial port (usb-uart).
I tried this:
Code: Select all
xboard -fcp ./wrapper.sh -fUCI
Code: Select all
/usr/bin/socat -v STDIO,echo=0,raw /dev/ttyACM0,raw,echo=0,b115200 2> err.txt
If I run wrapper.sh from the commandline (./wrapper.sh) then all is fine: I can enter UCI commands:
Code: Select all
folkert@snsv ~/Projects/esp32chesstest/app (master)$ ./wrapper.sh
id name Dog
id author Folkert van Heusden
uciok
info depth 1 score cp 10 nodes 21 time 8 nps 2625 pv e2e4
info depth 2 score cp 0 nodes 153 time 54 nps 2833 pv e2e4
info depth 3 score cp 15 nodes 1511 time 530 nps 2850 pv e2e3
# heap free: 145932
bestmove e2e3
run.sh:
Code: Select all
/usr/games/polyglot -noini -log true -ec ./run.sh
Code: Select all
#! /bin/sh
icsdrone \
-icsPort 5000 -icsHost nightmare-chess.nl -handle Dog -password hello \
-dontReuseEngine off \
-program ./run.sh \
-resign off \
-logging on