{"id":18521473,"url":"https://github.com/thingsboard/gatts_demo","last_synced_at":"2025-04-09T09:33:13.588Z","repository":{"id":77772948,"uuid":"190181499","full_name":"thingsboard/gatts_demo","owner":"thingsboard","description":"BLE GATT demo using ESP32","archived":false,"fork":false,"pushed_at":"2019-06-06T07:33:26.000Z","size":425,"stargazers_count":4,"open_issues_count":1,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T04:43:24.726Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thingsboard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-06-04T10:39:33.000Z","updated_at":"2023-08-22T00:47:06.000Z","dependencies_parsed_at":"2023-04-12T11:24:18.445Z","dependency_job_id":null,"html_url":"https://github.com/thingsboard/gatts_demo","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/thingsboard%2Fgatts_demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Fgatts_demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Fgatts_demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsboard%2Fgatts_demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsboard","download_url":"https://codeload.github.com/thingsboard/gatts_demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248012835,"owners_count":21033249,"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":[],"created_at":"2024-11-06T17:26:02.634Z","updated_at":"2025-04-09T09:33:13.582Z","avatar_url":"https://github.com/thingsboard.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"## List of hardware\n* ESP32-PICO-KIT \n* HTU21D Digital Relative Humidity Sensor\n* Breadboard\n* 4 female-to-male jumper wires\n* Raspberry Pi with Bluetooth\n* Xiaomi Smart Temperature \u0026 Humidity Sensor\n\n**_TODO:_ Add photos of hardware**\n\n\n## Hardware setup\n#### ESP32\n#### Wiring schemes\n| ESP32 | HTU21D |\n| ----- | ------ |\n| 3V3   | VIN    |\n| GND   | GND    |\n| 18    | SDA    |\n| 19    | SCL    |\n\n**_TODO:_ Add final picture of setup**\n\n#### Raspberry Pi\nIn this setup we use Raspberry Pi 2 Model B V1.1 with Raspbian GNU/Linux 9.8 (stretch) installed on it. It does't support Bluetooth, so you need a usb dongle. We use Grand-X BT40G.\nMake sure your dongle is recognized by system. You can check it with the following command:\n```\n$\u003e lsusb\n...\nCambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)\n...\n\n```\n\n## Programming ESP32\nYou need ESP-IDF (Espressif IoT Development Framework) to program your ESP32.\nInstall it with the following instructions:\n```\nmkdir ~/esp\ncd ~/esp\ngit clone --recursive https://github.com/espressif/esp-idf.git\ngit checkout 3bf56cdd1\n```\nSet up IDF_PATH before running any other command:\n```\nexport IDF_PATH=~/esp/esp-idf\n```\nThe python packages required by ESP-IDF are located in IDF_PATH/requirements.txt. You can install them by running:\n```\npython -m pip install --user -r $IDF_PATH/requirements.txt\n```\n##### Note\nPlease check the version of the Python interpreter that you will be using with ESP-IDF. For this, run the command `python --version` and depending on the result, you might want to use python2, python2.7 or similar instead of just python, e.g.\n\nSee [this](https://docs.espressif.com/projects/esp-idf/en/latest/get-started/index.html) guide for more info.\n\nNow you can flash your ESP:\n```\ngit clone name_of_rep_with_example\ncd name_of_rep_with_example\nmake flash\n```\n\n\n## Programming Raspberry Pi\nThere is a script in repo called main.py. You need at least **python3.4**. Install the following packages:\n```\nsudo apt-get install libglib2.0-dev\npip3 install bluepy btlewrap tb-mqtt-client\n```\nRun `sudo python3 main.py` and enjoy :::::::::)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsboard%2Fgatts_demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsboard%2Fgatts_demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsboard%2Fgatts_demo/lists"}