BillyGate is a little bluetooth-low-energy (BLE) gadget that connects chess e-boards to third party apps. It originated to rescue my Square Off Pro rollable e-board after Square Off went bust (sorry, was acquired by Miko) and ceased to support game play on sites like chess.com and lichess.org. BillyGate enables Square Off Pro, Neo and Swap owners to again enjoy over-the-board (OTB)/online chess on these excellent e-boards, and I intend to extend BillyGate to other e-boards and chess apps in future releases.
See Q: How much does BillyGate cost (and how do I buy it)?
IMPORTANT: BillyGate supports the e-boards and client apps listed in the Introduction.
The Square Off app was never as well engineered as their e-boards, and the Miko app has yet to significantly improve upon it. So the idea behind BillyGate is to enable Square Off owners to use their e-boards via other apps.
BillyGate is software (firmware) running on a tiny, low-cost and widely available Bluetooth Low Energy (BLE) electronics board (Raspberry Pi Pico 2 W). After connecting to supported e-boards it ‘pretends’ to be a Chessnut Move e-board, enabling the e-board user to play OTB/online games on chess.com and lichess.org using the freely available and excellent Chessnut apps, or other third party apps that support Chessnut e-boards!
E-boards:
Square Off Pro - rollable LED e-board
Square Off Neo - robotic e-board
Square Off Swap - robotic e-board with parking (for taken pieces)
E-board apps:
Latest Android and iOS apps from Chessnut (leading e-board manufacturer).
Recommended: Their latest Chessnut Next app.
Third party apps (that support the Chessnut Move e-board), including:
Jörn Gehring’s Chessconnect Chrome extension and apps.
Gerhard Kalab’s Chess PGN Master and Chess Dojo apps.
Khadim Fall’s WhitePawn app.
There are quite a few set-up steps to do before you can start playing chess (the easy bit :), some of which are a little technical, but if you work through the checklist below you will get there.
Check/update your e-board firmware
Buy a Raspberry Pi Pico 2 W
Powering BillyGate
Install/update BillyGate firmware
BillyGate 'admin' mode (firmware authentication and enabling WiFi)
E-boards have their own firmware and BillyGate requires specific versions:
Square Off Pro - version 3.0.5
Square Off Neo - version 3.0.7
Square Off Swap - version 3.0.7
For reasons known only to Miko (the new owner of Square Off) you have to contact their customer support, to update firmware from the Square Off or Miko apps. See Q: How do I update my Square Off firmware?
Purchase a Raspberry Pi Pico 2 W from a local online vendor (globally available for around $10 USD). Make sure you buy a PICO 2 W as there are other Picos with similar names, but BillyGate only works on a Pico 2 W.
BillyGate (Pico2W) can be powered from any 5V USB power adapter, any computer USB port that supplies power or some 5V battery power banks (the kind of things you use to charge your phone on the move).
IMPORTANT: The Pico2W consumes so little power that many power banks stop charging after a while, thinking no current is being drawn. The solution is usually to put your power bank into its trickle charge mode (if it has one), but this does not always work. Test your power bank overnight (checking that the Pico2W LED keeps flashing) before playing online games, because loss of power mid-game will mean loss of rating points!
The ‘brains’ behind BillyGate is low-level software called firmware that runs on the Pico2W board. When you purchase BillyGate you will be sent a link to its latest firmware. To install or update BillyGate firmware on the Pico2W:
Download the BillyGate firmware to a Windows, MacOS or Linux PC.
Obtain a data-capable micro-b USB cable that you will use to connect BillyGate to your PC (and later to a power supply). NOTE: some cheap USB cables only carry power, not data.
Connect the cable to the Pico2W but not to the PC.
Locate the little white BOOTSEL button on the Pico2W.
While holding down the BOOTSEL button, plug the Pico2W into the PC and release the BOOTSEL button.
A new disk drive should appear on the PC - just like plugging in a USB thumb drive. It should have a name like RP**** and be empty, apart from a couple of informational files.
Drag and drop (or copy) the BillyGate firmware file onto this RP**** drive.
On some PCs you may see a warning message that the installer may contain harmful content. Make sure you are copying the firmware to the RP**** drive and ignore the warning.
If the firmware installation/update is successful the Pico2W restarts, the RP**** drive disappears and the green Pico2W LED starts flashing (see Appendix A).
The procedure for updating BillyGate firmware to a newer version is exactly the same (and preserves your set-up and settings, so you don't need to do it again).
To finish setting up BillyGate you have to put it into a special 'admin' mode. This enables you to connect to BillyGate from a PC or mobile device, to authenticate the firmware (mandatory) and connect BillyGate to your home WiFi network (optional but recommended).
You can enter 'admin' mode whenever BillyGate is flashing its LED (Appendix A) by long-pressing its white BOOTSEL button for more than 5 seconds (say BillyGate One, BillyGate Two, ... BillyGate Five) then releasing it. When BillyGate is in 'admin' mode it flashes twice every 4 seconds and generates a temporary ble-gate-ap WiFi network (different from your home WiFi network) to which you can connect a PC or mobile device.
IMPORTANT: While your PC or mobile device is connected to BillyGate's temporary ble-gate-ap WiFi network you will not be able to access the Internet (on the connected PC or mobile device) so keep this page open in a browser tab on the PC or mobile device so you can refer to it and click on relevant links.
On your PC or mobile device scan for, and connect to, the ble-gate-ap WiFi network (if you cannot connect, try connecting from another less fussy device).
The password for the ble-gate-ap WiFi network is billyg123.
Once you are connected to ble-gate-ap, open a web browser on your PC or mobile device and browse to http://192.168.4.1/.
You should see the BillyGate 'admin' web page.
IMPORTANT: You must complete this firmware authentication step to use BillyGate. See Q: Why do I need to authenticate BillyGate firmware?
The 'admin' page displays a unique ID for your Pico2W (for example, 5b28c11557da6292 in the image above). Send this to BillyGate customer support. One of our support goats will return a long token string. Copy and past this into the Authentication token input field (being very careful to copy the token exactly, without any spaces) and click the Authenticate button. If accepted you should see a 'token stored' popup message. This enables BillyGate firmware to run on your Pico2W.
If you want to connect BillyGate to your home WiFi (recommended, to avoid having to use 'admin' mode again and for advanced features) proceed to Enabling WiFi below. If not, restart BillyGate by either long-pressing the white BOOTSEL button for more than 1 second (but less than 5) or removing and reconnecting power.
Connecting BillyGate to your home WiFi is required - to configure BillyGate settings. On the 'admin' web page:
Enter the network name and password of your home WiFi network (user the show password button if present and be careful to avoid typos, otherwise you will have to repeat this procedure).
Clicking Connect encrypts and stores your WiFi credentials and restarts BillyGate (exiting 'admin' mode).
When BillyGate restarts it should automatically connect to your home WiFi.
At startup BillyGate tries for up to 60 seconds to connect to a saved WiFi network, so if the BillyGate LED stays at initialising (see Appendix A) for 60 seconds it means BillyGate is having problems finding or connecting to a saved WiFi network. See troubleshooting hints below.
Browse to http://ble-gate and add this URL to your browser favourites. This is your BillyGate web user interface, now available on your home WiFi network.
If your browser cannot open http://ble-gate see Q: Why can't I open the BillyGate web UI in my browser?
It it does open, but is very slow - see Q: Why is BillyGate's web UI sometimes slow?
Your browser may also complain about http://ble-gate being insecure (it is, as it does not use SSL) but unless your chess games are a state secret you can ignore the warnings.
If you have installed and authenticated the BillyGate firmware and powered up the Pico2W it should start signalling via its LED (Appendix A) that it is scanning for supported e-boards.
Set the pieces on the e-board to their default starting positions. Square Off e-boards have printed square coordinates and the white and black pieces must be on their correct sides.
Switch on the e-board. Square Off e-boards show a circling on-board LED pattern as they wait for a BLE client connection.
After a few seconds BillyGate should discover the e-board.
When BillyGate discovers a supported e-board it will immediately attempt to connect to it and its LED will flash a different pattern. A successful connection results in the e-board emitting its ‘connected’ beep and BillyGate flashing the e-board LEDs in a ‘goat horns’ pattern.
If BillyGate fails to connect, check the Square Off firmware version.
IMPORTANT: The BillyGate firmware is somewhat sensitive to the order in which you prepare to play a game. Please try and follow the order described in this document.
Depending on which e-board or client app(s) you are using, you may need to configure some settings via BillyGate's web user interface. See the BillyGate settings section.
When BillyGate has connected to the Square Off Pro it begins transmitting BLE ‘advertisements’, pretending to be a Chessnut Move e-board (see LED flashes).
Install the Chessnut app on your mobile device from the Google Play Store or Apple App Store. If there are multiple Chessnut apps install the newer one. Recommended: Chessnut Next app.
Follow the Chessnut installation instructions, which includes creating a Chessnut account.
Enable Bluetooth on your mobile device.
Run the Chessnut app and follow its instructions to discover and connect to the Chessnut Move board being advertised by BillyGate.
There are three signals that the Chessnut app has connected to BillyGate:
The d- and e-file LEDs flash on the e-board.
A little Bluetooth logo on the Chessnut app changes to show the connection.
The BillyGate (Pico2W) LED shows solid green.
If you have reached this point you are ready to play!
Try a bot match first in the Chessnut client app. Game play will vary slightly, depending on whether you are using an LED or robotic e-board:
LED e-board (Square Off Pro): The client app highlights squares for opponent moves using the e-board LEDs and you make moves for both yourself and your opponent. BillyGate also uses e-board LEDs to highlight things like out-of-position pieces and incomplete moves.
Robotic e-board (Square Off Neo or Swap): The client app makes opponent moves on the e-board, using its robotic actuators, and you make your own moves. BillyGate also uses e-board LEDs to highlight things like out-of-position pieces and incomplete moves.
Two not immediately obvious aspects of BillyGate-mediated game play are corner LED hints and pawn promotion, so to avoid surprises please read the Features > Status and Features > Promotion/under-promotion sections in this document. TLDR: if all four corner LEDs stay on your e-board position is out-of-sync with the client app and if a pawn reaches a promotion square and you forget what the pulsing LEDs mean, just wait 5 seconds and it will default to a Q promotion.
When you have bot games working you're ready to play vs humans on chess.com and lichess.org!
When you have finished one game and want to start another you need to reset the pieces to their start position before starting the new game. While you reset the pieces you will probably see lots of LEDs lighting up on the e-board (on squares that differ from the final position of the finished game) but when you have returned the e-board to its default start position these LEDs should disappear and BillyGate should flash the startup ‘goat horns’ LED pattern. If you do not reposition the pieces before starting another game BillyGate will be stuck on the final position of the finished game.
IMPORTANT: When this all works as described it is simple. But things can go wrong, so please read the Avoiding/fixing common problems section below.
BillyGate also supports starting games from custom positions, using its web UI.
If you have a simple mental model of what BillyGate is doing ‘under the hood’ you will be better able to anticipate problems and, if you encounter them, correct them quickly.
Square Off e-boards report square occupancy, which means they only know if a square is occupied or not. But the Chessnut app expects full piece recognition, i.e. which piece/colour is on a given square. So, as you move pieces on Square Off e-boards, BillyGate has to translate changes in square occupancy to piece recognition updates, using the rules of chess to convert square 'ups' and 'downs' to legal chess moves (think about castling, promotion, en passant, knocked over pieces, etc.).
This only applies to LED e-boards or robotic e-board in LEDs-only mode.
Imagine your opponent is playing white, it’s their move and BillyGate sets LEDs to indicate e2-e3 ... but you accidentally move e2-e4. This is a legal chess move, but BillyGate will not accept it as it does not agree with the move sent from the client app. In this situation BillyGate will set the e-board LEDs to show a combination of the desired move and the pieces that are out of position (in this example the e2, e3 and e4 squares). Simply move the piece(s) again until they agree with the client app.
Board LEDs that persist after the last opponent move usually means you have either accidentally made the 'wrong' move, i.e. one that differs from the LED-indicated move, or other pieces are out of position.
This applies to both LED and robotic e-boards.
When it’s your turn, you may make the wrong move (the finger equivalent of a mouse slip in online chess) or the right move but (to your horror) see another move registered by the client app (mis-registration).
Finger slip
Unless your client app supports takebacks you’re stuck. If takebacks are supported, try following the client app takeback procedure in conjunction with BillyGate's Undo feature.
Mis-registration
This was a common problem with the Square Off app. If you slide pieces across the board (as you often do on a regular chess board) the app might decide the move is complete before it is, registering the wrong final square and therefore the wrong move. For example, a bishop sliding too slowly from f1 to c4 could register as having being moved to e2 or d3. BillyGate improves on this by waiting a short time for the position to settle before registering moves, but it is still highly recommended to get into the habit of lifting and placing pieces and not sliding them, because if the delay is insufficient and there is a mis-registration you are in the same unhappy position as for a finger slip.
The Square Off Neo and Swap robotics sometimes settle out-of-position or brush past and disturb other pieces, resulting in illegal positions and preventing your following move from being registered. Making your following move before a robotic move completes also results in an illegal position and loss of sync with the client app. See Features > Status (below) for LED hints that show you when robotic moves are complete and how to recover from out-of-sync positions.
BillyGate synchronizes e-board (player) moves with opponent moves from a client app. Both BillyGate and the client app use internal models of the game position and sometimes these get out of sync, the most common symptom being BillyGate suddenly not accepting your move in a game (because it thinks it is not a legal move). In almost all cases this is because one or more pieces are off-centre on their squares and no longer visible to e-board sensors, leaving the e-board in an illegal position.
BillyGate uses per-square LEDs to highlight out-of-position pieces, but the Square Off Neo and Swap occupancy sensors are sensitive (small off-centre displacements can read as empty squares), their LEDs are dim and their robotics are not super accurate, so robotic moves sometimes settle out-of-position or disturb other pieces - so you may need help to quickly spot and fix out-of-position pieces.
Square Off Pro
Has a dedicated status LED which shows steady green when in-sync, pulsing green during promotion piece selection and red when out-of-sync. If red, look for per-square LED hints that show you how to fix the game position or set a custom position.
Square Off Neo or Swap
The Neo and Swap do not have dedicated status LEDs so BillyGate 0.3.0 introduced a synthetic status LED which lights the four e-board corner LEDs:
During robotic moves. This is useful to warn against moving your piece before the robotic move completes, which results in an illegal position and loss of sync.
After a robotic move. If the corner LEDs stay lit after the robotic move appears to have completed, it has settled incorrectly or disturbed other pieces. Look for per-square LED hints and fix.
During setting of a custom position or an Undo. Once complete the corner LEDs go out.
Remember to check the corner square piece placement too (if occupied). If you find the corner LED hints unnecessary or distracting you can disable them - see BillyGate settings.
Square Off e-boards only report square occupancy (without piece recognition) so, when you are promoting a pawn, you have to tell the client app whether promotion is to a Queen, Knight, Rook or Bishop.
When you move a pawn to its promotion square BillyGate pulses board LEDs to highlight the promotion square and to select the promotion piece. Queen promotion remains the default, but you have a short time window to cycle through under-promotion types by lifting and replacing the pawn (or piece) on its promotion square. When the pulsing LEDs show your desired promotion type simply wait for 5 seconds and that promotion type will be sent to the client app. If you move a pawn to its promotion square and do nothing more, after 5 seconds it will default to a Queen promotion. Each time you lift and replace the promotion pawn (or piece) it resets the 5 second timer. When your opponent moves a pawn to its promotion square BillyGate briefly flashes the same LED promotion type hints to show you which piece your opponent selected. In both cases you must replace the promotion pawn with the selected piece.
Practise this by connecting BillyGate to your Square Off e-board (no need to connect a client app) and setting a custom promotion position (e.g. 8/3KP3/5k2/2B3p1/6Pp/7P/5b2/8 w - - 0 1).
See BillyGate settings and Appendix B: Promotion LEDs for details.
The Square Off Neo and Swap support robotic parking of taken pieces on the side of the e-board. The Neo only supports Edge parking, where taken pieces are shoved to the nearest board edge and should be promptly removed by the player. The Swap has sideline parking spaces, so it also supports Sidelines parking, where taken pieces are routed to their designated parking spaces. If you are playing white or black you must manually place your opponent's taken pieces in the right-hand sideline, in the correct free space (see the symbol and piece number etched into the parking spaces). Before starting a new game place the spare Queens in their parking spaces (as if they had been taken).
FUTURE: BillyGate will support promotion assistance and board reset from the Swap sidelines.
Undo moves from BillyGate's internal game position, usually to recover sync with the chess client app - see Accidental ‘wrong’ move (opponent) or Accidental ‘wrong’ move (player).
There are two ways to undo the last move:
Physically undo the last move on the e-board. Undoing multiple moves requires physically undoing them one-by-one in reverse order.
Click the Undo button on the web UI. Click n times to undo n moves (although this should rarely be required).
It may sometimes be useful to reset the BillyGate (Pico2W) gadget. Resetting BillyGate is like switching a PC off and on again: it clears out all the internal state, restarts the firmware and can solve all sorts of problems. Don’t do this in the middle of a game though! You can reset the Pico2W by either:
Disconnecting/reconnecting it from/to power.
Holding down the white BOOTSEL button on the Pico2W board for more than 1 second (but less than 5, see BillyGate 'admin' mode) and then releasing it.
BillyGate has its own web user interface, which is useful for:
Monitoring BillyGate connection state and in-progress games.
Configuring BillyGate settings.
Setting custom positions and Undo.
Troubleshooting, e.g. downloading diagnostic logs.
FUTURE - since BillyGate (Pico2W) can communicate over WiFi, as well as Bluetooth, this raises the enticing prospect of direct integrations with chess.com and lichess.org. Follow BillyGate at facebook.com/billygatechess for feature updates.
See BillyGate 'admin' mode for how to enable WiFi and connect to a WiFi network.
The BillyGate home page shows its internal game state, including board position, last move and LED highlights.
Buttons below the board enable you to flip the board, Undo the last move (in BillyGate's internal game state) and set custom positions from a FEN string. Links take you to BillyGate settings and this manual.
Setting up a custom board position is a little fiddly, but easy enough if you follow these logical step-by-step instructions:
First we need to tell BillyGate which pieces go where, by entering a FEN string into the text box below the web UI board (it's hard to type a FEN, so copy and paste it from a chess app).
Remember that as well as piece positions the FEN also determines which player has the next move, castling rights, en passant takes, etc.
Click the Set button to store this custom FEN position into BillyGate's internal game state.
BillyGate enters a positioning (as opposed to playing) mode and sets e-board LEDs to show which squares are not correctly occupied. It should also show status LED hints (see Features > Status) until square occupancy matches the desired custom position.
Move/remove your chess pieces on the e-board until they match the custom position on the web UI board, all the board LEDs have gone out and the status LED hints show ready to play.
BillyGate will now be reporting the custom position to chess client apps.
To play on from the custom position connect the Chessnut client app to BillyGate and, for example, start a Bot Match and select the Board Editor.
Because BillyGate is already reporting the custom position the Board Editor should immediately show it and there is nothing more to do but press Confirm and start the Bot Match (you may need to confirm castling rights and which colour is to play). The Board Editor may set lots of e-board LEDs, but they should go away when you press Confirm.
IMPORTANT: The key thing to remember (and a potential source of confusion) is that you have to set up custom positions in the order: (1) BillyGate web UI (2) on the e-board (3) and then finally on the client app board editor. It's natural to want to do it in the reverse order (starting from the client app board editor) but BillyGate is a stubborn little goat and that's not how it works.
The settings page is where you go to configure BillyGate features, WiFi networks and for troubleshooting information (as directed by helpful BillyGate technical support goats).
Mode
This dropdown selects which e-board BillyGate emulates, after it connects to a supported e-board. By default BillyGate emulates a Chessnut Move e-board - so client apps that support the Chessnut Move can now be used to control Square Off e-boards.
Chessnut Move (default).
Universal - for use by third party developers (will break game play).
Web - for use by third party developers (will break game play).
NOTE: The Chessnut Move emulation controls both e-board LEDs and robotic moves, so it fully supports the Square Off Pro, Neo and Swap.
Promotion (see Features > Promotion/under-promotion)
Select promotion piece (default) - enables under-promotion.
Default to Q - automatically default to Q promotion.
Neo/Swap
Settings specific to the Square Off Neo and Swap robotic e-boards.
Moves
Robotic (default) - opponent moves are played by under-board magnetic actuators.
LEDs-only - No robotics, LED move hints only. Useful for faster play or defective robotic e-boards.
Parking (see Features > Parking)
Edge (default) - taken pieces are robotically shoved to the nearest board edge, from where they should be removed by the player. Fastest option.
Sidelines - (Swap only) robotically move taken pieces to designated sideline parking slots.
Status (see Features > Status)
Corner LEDs (default) - use corner LEDs as a synthetic status indication.
None - disabled.
WiFi networks
When BillyGate powers up it scans for local WiFi networks that match its stored WiFi networks and then attempts to connect to them in order, so the ordering of stored networks is important and can be changed using the up arrow buttons. New WiFi networks can be added here (for example, for use on vacation or in a chess club), existing WiFi networks can be deleted or WiFi credentials edited.
NOTE: if you delete the local WiFi network or incorrectly edit its credentials BillyGate will lose WiFi connectivity and you will have to return to the joys of BillyGate's admin mode to fix it.
Diagnostics
BillyGate stores internal logs, which you can download and share with our helpful support goats to assist in troubleshooting problems. Use the drop down to set the log level:
INFO - (default) recommended level of detail. Once your problem has been resolved we suggest you return the logging level to INFO.
DEBUG - very verbose logging (consumes a lot of Pico2W storage and compute cycles).
WARN - less detailed logs, only showing detected internal warnings.
NONE - no logs (not recommended, only used if logging is causing a problem :)
The reason for having different logging levels is that Pico2W storage is limited, so the more logging detail the sooner its internal log files are overwritten. Once you have set the log level and reproduced the issue you are troubleshooting download the logs by clicking on the log.txt and log-bak.txt links. Try to do this as soon as possible after observing the issue. Email these log files to BillyGate technical support.
log.txt - most recent logs.
log-bak.txt - previous set of logs.
The delete button beside the log file links resets (deletes) the internal log files.
The BillyGate (Pico2W) gateway shows its active state by flashing its green LED.
🟢 LED - Gateway state
1 flash (every 4 secs) : Initialising
2 flashes (every 4 secs) : 'Admin' set-up mode
3 flashes (every 4 secs) : Scanning for supported e-board
4 flashes (every 4 secs) : Connecting to e-board
5 flashes (every 4 secs) : ‘Advertising’ as Chessnut Go
Solid green : Bridging between e-board and Chessnut client app
How to promote:
Move the pawn to its promotion square (forward move or diagonal take).
Board LEDs pulse to highlight the promotion square and promotion type (see screenshots below).
Lift and replace the pawn on its promotion square (not too fast, say "up...and...down") to cycle through promotion types.
When you have selected a promotion type wait for about 5 seconds for promotion to occur, signalled by the board LEDs ceasing to pulse (and the client app showing the promotion).
Replace the pawn with its promotion piece.
Alternatively (slightly faster):
Remove the promotion pawn and place the promotion piece (Q, N, R or B) on its promotion square (forward move or diagonal take).
Board LEDs pulse to highlight the promotion square and promotion type (see screenshots below).
Lift and replace the promotion piece on its promotion square (not too fast, say "up...and...down") to cycle through promotion types.
When you have selected a promotion type wait for about 5 seconds for promotion to occur, signalled by the board LEDs ceasing to pulse (and the client app showing the promotion).