BgLib

BGLib is a handy, open source library that offers beautiful and customizable background gradients and patterns for web projects. It also works as a binary protocol for connecting with the Bluegiga BLE112 Bluetooth Low Energy module. This makes it a great tool for developers working on both web design and Bluetooth applications.
Key Features
BGLib is an event driven protocol with commands, responses, and events. It is well documented in Bluegiga''s API reference manual, making it easy to use for various applications.
Benefits
The library provides a range of customizable backgrounds, enhancing the visual appeal of web projects. Its use in Bluetooth applications makes it a versatile tool for developers.
Use Cases
iBeacon Scanner Application
iBeacon scanner application is developed using BGLib. iBeacons are simple devices that broadcast signals until they run out of batteries. The scanner application is continually being tested and updated to improve its functionality.
Arduino Implementation
An Arduino implementation of BGLib is available, making it easier to interface with the Bluegiga BLE112 module. This includes a demo sketch for the Arduino Uno, which shows how to use BGLib for scanning BLE devices. The demo setup involves connecting the PC to the hardware serial port and the BLE112 to a SoftwareSerial port running at 9600 baud on pins 2 and 3.
Optimization and Challenges
Program Storage Limits
Users may encounter program storage limits, especially with devices like the imp002. To optimize, users can delete unused methods and remove debugging strings. Representing commands by their two byte cid/cmd values can also help reduce memory usage.
Hardware Flow Control Issues
Some users have reported issues with hardware flow control in the BLE112 module. The module does not assert the CTS line, leading to buffer overflows, especially at high baud rates like 115200. Additionally, applications exceeding around 17,000 bytes in binary size may cause the BLE112 to stop responding to commands or reset spontaneously.
SPI Connectivity
Implementing BGLib over SPI has been challenging due to the lack of flow control or DMA buffering in the module''s SPI implementation. Users have reported odd responses when attempting to use SPI, and Bluegiga has confirmed that SPI support is not yet implemented.
BGLib is a valuable tool for developers working with BLE modules, offering robust functionality despite some challenges related to program storage limits and hardware flow control issues.
Comments
Please log in to post a comment.