{"id":29842973,"url":"https://github.com/pelioniot/mbed-edge-examples","last_synced_at":"2025-07-29T15:41:32.504Z","repository":{"id":46252170,"uuid":"153782525","full_name":"PelionIoT/mbed-edge-examples","owner":"PelionIoT","description":"The Mbed Edge protocol translator examples","archived":false,"fork":false,"pushed_at":"2024-12-16T13:07:01.000Z","size":567,"stargazers_count":4,"open_issues_count":3,"forks_count":9,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-12-16T13:53:38.321Z","etag":null,"topics":["ble","libmosquitto","lwm2m","lwm2m-protocol","mqtt","protocol-translator"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PelionIoT.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-19T12:53:40.000Z","updated_at":"2024-12-16T13:07:04.000Z","dependencies_parsed_at":"2023-01-23T11:16:00.565Z","dependency_job_id":"b575c855-d3ab-48b4-bcaa-d09f9fbc81bd","html_url":"https://github.com/PelionIoT/mbed-edge-examples","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/PelionIoT/mbed-edge-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fmbed-edge-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fmbed-edge-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fmbed-edge-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fmbed-edge-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PelionIoT","download_url":"https://codeload.github.com/PelionIoT/mbed-edge-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PelionIoT%2Fmbed-edge-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267710122,"owners_count":24131935,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","libmosquitto","lwm2m","lwm2m-protocol","mqtt","protocol-translator"],"created_at":"2025-07-29T15:41:23.728Z","updated_at":"2025-07-29T15:41:32.487Z","avatar_url":"https://github.com/PelionIoT.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge Protocol Translator Examples\n\nThis repository contains the Protocol Translator examples for the Edge.\n\n## pt-example\n\nPt-example is a basic example of the C-API and pt-client usage.\n\n## mqttpt-example\n\n`mqttpt-example` is an example of a protocol translator that connects to endpoints using MQTT. It can be used\nwithout real MQTT hardware using provided Mosquitto MQTT simulator scripts. The endpoints may\npublish for example temperature and humidity values to Device Management.\n\nNOTE! This requires Eclipse's Mosquitto - see installation info: https://mosquitto.org/download/\n\n## blept-example\n\nThe `blept-example` is a protocol translator reference implementation for use with Bluetooth Low Energy (BLE) devices that implement a Bluetooth Low Energy Generic Attributes (GATT) server. It connects to BLE devices and translates their GATT services and characteristics into Open Mobile Alliance (OMA) Lightweight Machine to Machine (LwM2M) Objects and Resources.\n\n## simple-js-examples\n\nThe `simple-js-examples` are different from the rest of the examples. Instead of using the provided `pt-client`\nlibrary these examples use Edge Core protocol translator and management API directly.\n\nThese are examples on how a protocol translator or management API application can be created using Javascript.\nSee the [simple-js-examples/README.md](simple-js-examples/README.md) for instructions.\n\n## c-api-stress-tester\n\nThis example tests the robustness and thread safeness of Protocol API C-API interface\n\n# Build and run the examples\n\n1. Directly on Ubuntu 22.04 or 20.04 or\n1. Using Docker.\n\n## Using Ubuntu 22.04 or 20.04:\n\n1. Dependencies\n\n    Following dependencies are needed in the build system.\n\n    * librt\n    * libstdc++\n    * OPTIONAL for mqttpt-example: libmosquitto\n\n    Install these (using `sudo` typically):\n\n    ```\n    sudo apt-get update\n    sudo apt-get install build-essential cmake git libc6-dev \\\n       libmosquitto-dev mosquitto-clients libglib2.0-dev \\\n       doxygen\n    ```\n    NOTE! Mosquitto might not be available directly in your distribution (for example Ubuntu 22.04),\n    see https://mosquitto.org/download/ for more installation information.\n\n1. Preparing all the sources\n\n    Please run the following to clone and update all the git modules.\n    ```\n    git submodule update --init --recursive\n    ```\n\n1. Building\n\n    Makefile has options to build any of the pt-examples separately, or all at the same.\n\n    To make all examples without debug information and with default trace level, run\n    ```\n    make build-all-examples\n    ```\n    It will build the examples to `build/bin` directory.\n\n    To make all examples with debug information and debug trace level, run\n    ```\n    make build-all-examples-debug\n    ```\n\n    It will build the examples to `build-debug/bin` directory.\n\n    To make all examples with ThreadSanitizer and debug trace level, run\n    ```\n    make build-all-examples-sanitize\n    ```\n\n    It will build the examples to `build-sanitize/bin` directory.\n\n    Running `make all` will generate `build`, `build-debug` and `build-sanitize` directories.\n\n    Please note following:\n    `mqttpt-example` will not be built if the `libmosquitto` is not installed.\n\n    For more examples, see the rules in the Makefile.\n\n1. Running the examples\n\n    Each of the examples has a `README.md` file that documents how to run the example.\n\n\n## Using Docker\n\nBefore building the docker image, fetch the dependencies: \n```\ngit submodule update --init --recursive\n```\n\n### pt-example\n\nBuild:\n\n```\ndocker build -t pt-example:latest -f ./Dockerfile.pt-example .\n```\n\nRun: \n\n```\ndocker run -v /tmp:/tmp pt-example:latest\n```\n\n### simple-js-examples/simple-pt-example\n\nBuild:\n\n```\ndocker build -t simple-pt-example:latest -f ./Dockerfile.simple-pt-example .\n```\n\nRun in interactive mode:\n\n```\ndocker run -v /tmp:/tmp -it simple-pt-example:latest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelioniot%2Fmbed-edge-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpelioniot%2Fmbed-edge-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpelioniot%2Fmbed-edge-examples/lists"}