{"id":21191935,"url":"https://github.com/edgeimpulse/ingestion-sdk-c","last_synced_at":"2026-03-10T08:02:06.718Z","repository":{"id":104673372,"uuid":"235999350","full_name":"edgeimpulse/ingestion-sdk-c","owner":"edgeimpulse","description":"Portable header-only library written in C99 for data collection on embedded devices.","archived":false,"fork":false,"pushed_at":"2025-02-19T11:30:02.000Z","size":207,"stargazers_count":27,"open_issues_count":1,"forks_count":3,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-11-10T22:26:38.188Z","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":"bsd-3-clause-clear","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edgeimpulse.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2020-01-24T12:31:32.000Z","updated_at":"2025-07-07T21:34:44.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5a0ee10-c036-415a-826a-934964d1091b","html_url":"https://github.com/edgeimpulse/ingestion-sdk-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edgeimpulse/ingestion-sdk-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fingestion-sdk-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fingestion-sdk-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fingestion-sdk-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fingestion-sdk-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edgeimpulse","download_url":"https://codeload.github.com/edgeimpulse/ingestion-sdk-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edgeimpulse%2Fingestion-sdk-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30327553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-20T19:06:21.562Z","updated_at":"2026-03-10T08:02:06.711Z","avatar_url":"https://github.com/edgeimpulse.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edge Impulse C Ingestion SDK\n\nThe C Ingestion SDK is a portable header-only library written in C99 for data collection on embedded devices. It's designed to reliably store sampled data from sensors at a high frequency in very little memory. On top of this it allows cryptographic signing of the data when sampling is complete. Data can be stored on a POSIX file system, in memory, or on a raw block device.\n\n[Usage guide](https://docs.edgeimpulse.com/reference#c-sdk-usage-guide)\n\n## Importing this repository\n\nThis library depends on QCBOR and (optionally) Mbed TLS. These are pulled in through git submodules. To import this repository:\n\n1. Clone this repository:\n\n    ```\n    $ git clone https://github.com/edgeimpulse/ingestion-sdk-c\n    ```\n\n1. Initialize the submodules:\n\n    ```\n    $ cd ingestion-sdk-c\n    $ git submodule update --init --recursive\n    ```\n\n## Building the example application\n\nTo build an example application which can encode data that runs on your computer:\n\n### MacOS, Linux\n\n1. Import the repository and its submodules.\n1. Compile the application (see [test/main.c](test/main.c) for the code):\n\n    ```\n    $ make\n    ```\n\n1. Run the application:\n\n    ```\n    $ ./ingestion-sdk-example\n    ```\n\n    This prints the encoded message both to stdout, and creates a file called `test/encoded.cbor` with the same content.\n\n### Windows\n\nTo build an example application which can encode data that runs on your computer:\n\n1. Import the repository and its submodules.\n1. Install [MinGW-W64](https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/installer/mingw-w64-install.exe/download) and install according to [these instructions](https://tls.mbed.org/kb/compiling-and-building/compiling-mbedtls-in-mingw).\n    * Make sure that `mingw32-make` and `gcc` are in your PATH.\n1. Compile the application (see [test/main.c](test/main.c) for the code):\n\n    ```\n    $ mingw32-make CC=gcc\n    ```\n\n1. Run the application:\n\n    ```\n    $ ingestion-sdk-example.exe\n    ```\n\n    This prints the encoded message both to stdout, and creates a file called `test/encoded.cbor` with the same content.\n\n### Viewing the payload\n\n1. After running the binary above, copy the content after 'Encoded file:'.\n1. Go [cbor.me](http://cbor.me), paste the content in the 'Bytes' text box (the right one), then click the green arrow next to 'Bytes'. You now see the decoded message:\n\n    ![Decoded message in cbor.me](img/cborme.png)\n\n### Validating the signature\n\nTo validate the signature in the message:\n\n1. Install a recent version of Node.js.\n1. Install the `cbor` npm package:\n\n    ```\n    $ cd test\n    $ npm install cbor\n    ```\n\n1. Decode the message:\n\n    ```\n    $ node decode.js\n    ```\n\n1. This prints the message, whether the signature was valid, and the payload:\n\n    ```\n    Full object {\n      protected: { ver: 'v1', alg: 'HS256' },\n      signature: 'f0bc94ee616f902a5dbce2a32f3946873831a746b8019bb3b3eb0850a9b17048',\n      payload: {\n        device_name: 'ac:87:a3:0a:2d:1b',\n        device_type: 'DISCO-L475VG-IOT01A',\n        interval_ms: 10,\n        sensors: [ [Object], [Object], [Object] ],\n        values: [ [Array], [Array], [Array], [Array] ]\n      }\n    }\n    Signature verification OK\n    Payload {\n      device_name: 'ac:87:a3:0a:2d:1b',\n      device_type: 'DISCO-L475VG-IOT01A',\n      interval_ms: 10,\n      sensors: [\n        { name: 'accX', units: 'm/s2' },\n        { name: 'accY', units: 'm/s2' },\n        { name: 'accZ', units: 'm/s2' }\n      ],\n      values: [\n        [ -9.8100004196167, 0.029999999329447746, 1.2100000381469727 ],\n        [ -9.829999923706055, 0.03999999910593033, 1.2799999713897705 ],\n        [ -9.119999885559082, 0.029999999329447746, 1.2300000190734863 ],\n        [ -9.140000343322754, 0.009999999776482582, 1.25 ]\n      ]\n    }\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fingestion-sdk-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgeimpulse%2Fingestion-sdk-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgeimpulse%2Fingestion-sdk-c/lists"}