Welcome to Certabo forum

Both posts in italian and in english are accepted on the forum to help everybody to provide contribution irrespective to geographical location. Object of the forum is to provide technical information on various items and help developer and users to personalise software for Certabo chessboards. User explicitly accepts the conditions of use of this forum here reported.

A brief introduction of user is always appreciated in section Welcome to….

Benvenuti nel forum di Certabo

Sul forum possono essere postati articoli sia in lingua italiana che inglese per permettere a tutti di dare il proprio contributo da diversi luoghi geografici. Il forum ha come scopo fornire informazioni tecniche in generale e aiutare gli sviluppatori ed utenti a personalizzare software per le scacchiere Certabo. L’utente accetta esplicitamente le condizioni del presente forum consultabili qui.

Un breve saluto del nuovo utente è sempre gradito nella sezione Benvenuti a….

Please or Register to create posts and topics.

serial communication in separate process

I was wondering why the official python code does use a separate process (usbutil.py) and a socket to read/write to USB from the main application? I'd be tempted to just do the serial read/write in a python thread. Or do I miss something here?

Quote from hari on December 19, 2019, 11:30 pm

I was wondering why the official python code does use a separate process (usbutil.py) and a socket to read/write to USB from the main application? I'd be tempted to just do the serial read/write in a python thread. Or do I miss something here?

Hello Harald

Yes you could do like you suggest, we just selected this option is because we have open protocol etc. The standalone usbutil.py can be used to connect the board without embedding in the software. So this part can be just called by different main software.

For example in the online game the main routine is different but they call the same usbtool.py Generally speaking this can be called for example by different sw maybe checkers or other. This is ratio behind.

All the best

Pietro

Hi Pietro,

thanks for explaining the reasoning. I did ask because I was considering making the port configurable via UCI setoption, and error out if the port doesn't work properly before returning "readyok" as engine. I thought it might be easier to catch and handle any serial port related errors easier when all is handled in one process.

Anyway, I've written a UCI variant with a built in serial thread and will give that some testing.

br Hari