{"id":21442209,"url":"https://github.com/hwhw/blemesh_maestro","last_synced_at":"2026-01-03T07:41:36.253Z","repository":{"id":141820311,"uuid":"531242523","full_name":"hwhw/blemesh_maestro","owner":"hwhw","description":"Bluez BLE Mesh stack based implementation of a BLE Mesh node that implements client BLE Mesh client models written in C++","archived":false,"fork":false,"pushed_at":"2022-08-31T20:10:55.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T10:43:23.525Z","etag":null,"topics":["ble","bluetooth","bluez","dbus","mesh"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwhw.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-31T20:09:28.000Z","updated_at":"2023-01-11T13:57:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"091a82f6-e10c-4ded-8060-d9912ebb34ad","html_url":"https://github.com/hwhw/blemesh_maestro","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwhw%2Fblemesh_maestro","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwhw%2Fblemesh_maestro/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwhw%2Fblemesh_maestro/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwhw%2Fblemesh_maestro/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwhw","download_url":"https://codeload.github.com/hwhw/blemesh_maestro/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243955721,"owners_count":20374372,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","bluetooth","bluez","dbus","mesh"],"created_at":"2024-11-23T01:53:06.090Z","updated_at":"2026-01-03T07:41:36.228Z","avatar_url":"https://github.com/hwhw.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"You may rightfully curse this code, I haven't ever written modern C++\n(I vaguely remember having written some C++ more than a decade ago?)\n\nTrying here to cobble together some code to work with the bluez Bluetooth stack\non Linux, specifically it's bluetooth-meshd, for BLE Mesh networking.\n\nLook at bluez' test-mesh example (python based) to see what I'm trying to\nrecreate here.\n\nThis wants\n\n  Boost:\n    asio\n    program_options\n    uuids\n  fmtlib - https://github.com/fmtlib/fmt\n  scnlib - https://github.com/eliaskosunen/scnlib\n  sdbus-c++ - https://github.com/Kistler-Group/sdbus-cpp/\n\nNotes:\n\n  bluez/doc/mesh-api.txt\n\n  # your friend telling you what's going on:\n  busctl monitor org.bluez.mesh\n\nHow to build:\n  mkdir build\n  cd build\n  cmake ..\n  make\n\nHow to use:\n  # run bluez meshd:\n  /usr/lib/bluetooth/bluetooth-meshd\n  # (probably, you can systemctl stop bluetooth; systemctl start bluetooth-mesh)\n\n  # provision a node for blemesh_maestro:\n  mesh-cfgclient\n  # in another terminal, run\n  ./blemesh_maestro -j\n  # copy displayed UUID (mesh-cfgclient will need the notation without dashes)\n  # in mesh-cfgclient session, do:\n  provision \u003cuuid\u003e\n  # follow the shown provisioning workflow, i.e. copy stuff between terminal sessions\n  # it will end in blemesh_maestro showing you a \"token\" number and mesh-cfgclient showing you the mesh address of the new node.\n  # keep that mesh-cfgclient session open, you will need it for managing appkeys (at least)\n\n  # attach blemesh_maestro to that new node object (you can do this again and again later on, so keep that token number safe)\n  ./blemesh_maestro -a \u003ctoken\u003e\n\n  # configure appkeys (e.g. n=0)\n  # in mesh-cfgclient session, do:\n  menu config\n  target \u003cnodes mesh address\u003e\n  appkey-add \u003cn\u003e\n\nIt would be a bit far-fetched to explain all the Bluez and BLE Mesh specifics here. Be sure\n- that you have created the appkey first\n- that you have provisioned the target devices\n- that you have added the appkey to the target devices' models\n\nStuff that will then work in blemesh_maestro:\n\n# send message to mesh address 00b5, using appkey 0, hex payload: 82 02 01\nsend b5 0 82 02 1\n\n# send message to mesh address 00b5, using appkey 0, onoff model stuff:\n# get status:\nonoff b5 0 get\n# set status (on):\nonoff b5 0 set 1\n# set status on auto-TID, transition time 30 * 100ms(=0), delay 200*5ms\nonoff b5 0 set 0 -1 30 0 200\n# get current level\nlevel b5 0 get\n# set level delta -1\nlevel b5 0 delta -1\n\nTODO:\nwrite lots of documentation (haha, let's see)\n- code\n- command documentation\nwrite parsers for incoming messages\n\nInstead of reading commands from stdin, you can also specify a unix datagram socket (will be deleted \u0026 created) with the \"-s\" argument.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwhw%2Fblemesh_maestro","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwhw%2Fblemesh_maestro","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwhw%2Fblemesh_maestro/lists"}