jacobrosenthal/ble-bean — pull request #4 by fiaskow (2014-09-12 13:11:34+00:00)
Title: Implemented the LightBlue Bean Serial Message Protocal

...for receiving serial messages.

I'm a JavaScript novice, so this might not meet your standards to be included in your repo. Feel free to chop and change or ignore it completely. It is also only a partial implementation on the incoming serial comms.

Description:
Currently the code assumes that the GT packets are received in order and that they all belong to the same GST.
This can probably be improved upon by checking the Message Count and Packet Count of the GT Header and assembling them in the correct order and the correct message if packets comes in a mixed up fashion.

The signature of the Serial message callback has changed.

The complete GST message will be returned on an 'invalid' callback if the CRC fails.