A Java example how to create a device, register keys and send data.
Here you find a short description of how to send data.
WORK IN PROGRESS
If you'd like to try, you don't have to do this part. Contact us with a UUID and we will provide you with a set of credentials to access the UBIRCH API.
- create a UUID (
uuidgen
) - in Cumulocity, register a new device using that UUID
- run the script
create_device_credentials.sh <PWD> <UUID>
using the bootstrap password - accept the device in Cumulocity and wait for the script to exit
- write down the device
username
andpassword
Set up the environment variables required:
UBIRCH_ENV
- (dev
,demo
,prod
)AUTH_USER
- the user name from aboveAUTH_PASS
- the password from aboveCLIENT_UUID
- the uuid created aboveCLIENT_KEY
- base64 encoded signing key (Ed25519)
SERVER_UUID
- (optional) the corresponding backendSERVER_PUBKEY
- (optional) base64 encoded public key UUID
Run UbirchClient
which sends one message to Cumulocity and a UPP of the data to
the configured UBIRCH backend.
java -jar target/ubirch-client-java-1.0.0-SNAPSHOT-jar-with-dependencies.jar