Intel_Peter wrote:
Hello QuakieDuck,
I believe that can be achieved by adjusting the Bluno's sketch, I mean you could tell the Bluno to wait and listen until he receives certain message from the Galileo, and once it receives this special signal, change the Bluno to start transmitting your data.
Peter.
Hello Intel_Peter,
I have tried out the suggestion that you mentioned and my data synchronization greatly improved!! Bluno is set up to wait if there is data available at the serial port. If it is available, then it reads that data and stores it into a variable. Then it checks that variable if it is '1' or not. If yes, it transfers data via BLE using the Plainprotocol library supplied with Bluno.
On Galileo, it was setup to use the following command to send a "read_request" signal to Bluno to inform that it wants to get data and also listens for the incoming data:
timeout -t 2 -s kill gatttool -b <BLE address of Bluno> --char-write-req -a 0x25 -n 01 --listen
This was achieved in two Arduino sketches. One for Bluno and one for Galileo. (Perhaps in future I could do it in a Bash/Python script?)
This commands writes 1 to the serial port in Bluno. Of course, any other number can also be used. I ran this command for about 2 seconds as it gives enough time to establish the connection and perform a data transfer. I tried with 1 second but no data was received by Galileo. The following image shows my result. Note that COM33 is the data transmitted by Bluno and COM29 is the data received by Galileo. You may ignore the other messages that I have printed out in COM29. I used those messages for debug purposes.