I finally recieved my RikoMagic MK802 II and I Picochess working great with a bluetooth connection to my DGT board.
Here's a procedure on how to set this up.
Prerequisites:
1) DGT Bluetooth E-board and XL Clock
3) The ability to access the RikoMagic through a terminal emulator and access the Super User account (The USB Bluetooth Dongle has to be plugged in, I have a USB hub to provide BT Dongle, Keyboard and Mouse all at the same time).
Steps:
1) Power up the XL clock (in mode 23) and the DGT Bluetooth E-board.
2) Insert the USB Bluetooth dongle into the RikoMagic directly (if you have a network connection setup with Super User access) or a USB hub that's connected to the RikoMagic.
3) Power up the RikoMagic.
4) Get to a command prompt and use the command sudu su with the password of picochess to gain access to the Super User account.
5) Get the bluetooth dongle's device by using the command hciconfig (in the below example hci0 was found).
hci0: Type: BR/EDR Bus: USB
BD Address: 00:02:72:AC:46:C0 ACL MTU: 1021:7 SCO MTU: 64:1
UP RUNNING PSCAN
RX bytes:7375 acl:9 sco:0 events:109 errors:0
TX bytes:937 acl:6 sco:0 commands:56 errors:0
6) Get the Bluetooth Device address using the command hcitool scan (in the below example my e-board is 00:06:66:04:FD:17 )
Scanning ...
00:06:66:04:FD:17 DGT_BT_20336
7) Pair the Bluetooth dongle and the e-board. Use the bluez-simple-agent command with the USB dongle's device and the e-board's address. You'll need to enter the pairing pin of 0000
RequestPinCode (/org/bluez/264/hci0/dev_00_06_66_04_FD_17)
Enter PIN Code: 0000
Release
New device (/org/bluez/264/hci0/dev_00_06_66_04_FD_17)
8) Now that we have the pairing stored, we need to setup the serial communications device so when the RikoMagic/Picochess boots it's available for stockfish. Edit the file /etc/bluetooth/rfcomm.conf and insert these lines at the bottom of the file. NOTE: You'll need to use your E-board's bluetooth device address and not my address which is in the example.
rfcomm0 {
bind yes;
device 00:06:66:04:FD:17;
channel 1;
Comment "DGT Bluetooth Board";
}
9) Save the changes to rfcomm.conf. Once again, this file will setup the communication device /dev/rfcomm0 for stockfish to use when the RikoMagic and Picochess boots.
10) Finally you'll need to edit the stockfish initialization script to use the /dev/rfcomm0 device
a) Edit /etc/init.d/stockfish
b) find the start section of the script
c) copy and paste the screen line
d) comment out (#) the original screen line
e) Change the device at the end of the copied line from /dev/ttyUSB0 to /dev/rfcomm0
f) Save these changes to the /etc/init.d/stockfish file
Example of the changes to the start section
------------------------------------------------------
start)
echo "Starting stockfish "
#nohup /home/miniand/git/Stockfish/src/stockfish dgt /dev/ttyUSB0 &
#screen -dmUS sf /home/miniand/git/Stockfish/src/stockfish dgt /dev/ttyUSB0
screen -dmUS sf /home/miniand/git/Stockfish/src/stockfish dgt /dev/rfcomm0
;;
------------------------------------------------------
11) Setup is now complete. Power off the RikoMagic. Place the USB Bluetooth dongle in the standard USB port of the RikoMagic and power it up. (Make sure the XL clock is in mode 23 and the board is powered up before doing this)
Enjoy!
Eric