Skip to content

BLE Simulator Lua Scripting

Examples

Tutorial

Examples

These are a number of examples to help you get started with the simulator and create your own Lua scripts.

API

Functions

Update Callback

Objects

BLE

Device

Service

Characteristic

Descriptor

Enums

DataType

Using your own script

To run the docker container with your own script you will need to mount a volume containing the script to the container. Using the --lua-script option, you should then pass the path to the mounted Lua script e.g:

docker run -v {path_to_scripts_folder}:{mounted_path_to_lua_scripts_folder} iotechsys/ble-sim:1.0 --script {mounted_path_to_lua_script}

A more concrete example:

docker run -v ~/lua-scripts/:/docker-lua-scripts/ iotechsys/ble-sim:1.0 --script docker-lua-script/test.lua