Skip to content

enspectr/ble-term

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ble-term

Web BLE terminal for modules like JDY-08

How to use

  • connect BLE module to UART adapter
  • goto https://enspectr.github.io/ble-term/
  • press Connect, select your adapter in the list and press Pair
  • now you may send text to your adapter and receive messages from it

Python scripts

Scripts from the python folder are designed to communicate with adapter

  • ble_term.py sends text to application
  • ble_cat.py receives text from application
  • ble_echo.py runs echo test (see below)
  • ble_echo_hash.py runs echo / hash test (see below)

Tests

  1. Before running BLE tests check your adapter. To do it connect RX and TX pins and run ble_echo.py PORT.
  2. For echo test goto https://enspectr.github.io/ble-term/?echo and connect to your adapter. Then run ble_echo.py PORT.
  3. For echo / hash test goto https://enspectr.github.io/ble-term/?echo=hash and connect to your adapter. Then run ble_echo_hash.py PORT.

where PORT is the name of the port where serial adapter in connected like COMXX on windows or /dev/ttyUSBX on linux

Browsers tested

Detailed description

The BLE is built around GATT where data is bound to attributes which in tern are bound to services. The attribute data length is limited by radio link MTU and is just 20 bytes by default. The data stream transmission is only possible by gradually updating attribute. The BLE guarantees that unless something goes wrong every attribute update will be delivered to the peer. The BLE module (we use JDY-08) used to split UART data received onto 20 byte chunks before sending them to the peer. Yet one should not send too many chunks at once just because the UART buffer may be overflowed and data may be lost. There are no hardware handshaking supported by the module. There are two test scenarious supported by the web page. The first 'echo' test just sends any data received back to the sender. The second 'echo / hash' test sends just the hash of the received data back to the sender.

The BLE module is configured in many aspects by means of AT commands. Note that there is no line termination symbol in the protocol. AT commands should be ended by just ending transmitting of characters. So readily available tools like PuTTY will not work. One can use ble_term.py script to send AT commands to the module and receive responses. The module accepts AT commands unless paired with remote party.

JDY-08 pinout

JDY-08 module pins

Useful resources

About

BLE terminal for modules like JDY-08

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published