https://github.com/uniquid/uidagent-c
UniquID C language engine.
https://github.com/uniquid/uidagent-c
Last synced: 11 months ago
JSON representation
UniquID C language engine.
- Host: GitHub
- URL: https://github.com/uniquid/uidagent-c
- Owner: uniquid
- License: mit
- Created: 2018-12-07T13:56:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-04T09:28:37.000Z (about 7 years ago)
- Last Synced: 2025-05-04T23:38:23.181Z (about 1 year ago)
- Language: C
- Size: 39.1 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# uidagent-c
## Minimal code implementing an UniquID node. It can be used to add UniquID functionalities to the [AWS IoT C sdk](https://github.com/aws/aws-iot-device-sdk-embedded-C)
It requires:
- libuidcore-c
- libpthread
- AWS IoT mqtt implementation
** check the prerequisites for [uidcore-c here](https://github.com/uniquid/uidcore-c#how-to-build)
### how to integrate in the AWS IoT C sdk
- Clone the AWS-IoT-sdk (this has been tested on tag v3.0.1 and master@c11e34a98be):
``git clone https://github.com/aws/aws-iot-device-sdk-embedded-C.git -b v3.0.1``
- Clone this repository inside the external_libs directory:
``cd aws-iot-device-sdk-embedded-C/external_libs/``
``git clone https://github.com/uniquid/uidagent-c.git``
- Clone the uidcore-c library
``git clone --recurse-submodules https://github.com/uniquid/uidcore-c.git``
- Clone the **mbetls** code:
``rm mbedTLS/README.txt``
``git clone https://github.com/ARMmbed/mbedtls.git mbedTLS -b mbedtls-2.16.1``
- Apply the provided patch, IoT-sdk.patch
``cd ..``
``git apply external_libs/uidagent-c/IoT-sdk.patch``
- Cd to **subscribe_publish_sample** example and make
``cd samples/linux/subscribe_publish_sample``
``make``
### run the "subscribe_publish_sample"
- copy in the "certs" directory the CA certificates chain to authenticate the aws-mqtt-proxy and the uniquid mqtt broker.
the file must be named **rootCA.crt**:
``cp path-to/caChain.crt ../../../certs/rootCA.crt``
- Copy the configuration file ([here is an example](https://github.com/uniquid/uidagent-c/blob/master/aws_device_cfg.json))
``cp path-to/aws_device_cfg.json aws_device_cfg.json``
- run the sample
``./subscribe_publish_sample``
** configuration can be loaded also from **AWS_AGENT_CONFIG** environment variable:
``export AWS_AGENT_CONFIG=$(cat path-to/aws_device_cfg.json)``