Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [hara-dev] Using Hara Client with hawkBit DDI

Hi David,

On Sun, Feb 19, 2023 at 3:38 PM Potatoe Crisp <potatoecrisp@xxxxxxxxxxx> wrote:
Hello,

my apologies in advance if this question ends up as completely mundane, I am fairly new to the topic of IoT.

I am trying to implement a network of IoT Devices capable of OTA maintenance/updates using open source projects only and therefore got referred to hawkBit.
Setting everything up on the server side was fairly quick and easy to do, but oh boy did I have difficulties trying to install and set up a working client on edge devices.
Rummaging through Hara, Hono, RAUC, SWUpdate and even Yocto, which all supposedly work yet I just could not get to run, I am posting my issue here hoping to at least get some pointers on how to proceed.

My current edge device is a BeagleBone Black, flashed with its latest image and up to date, I have cloned the hara-ddiclient from GitHub but am baffled as to how I am supposed to set up the client to directly communicate with my hawkBit server.
I have seen demonstrations with simulated docker devices to the hawkBit sandbox, but what about the actual implementation using real devices?

The hara-ddiclient is indeed a library, so it is meant to be used to develop DDI API clients for devices connecting to hawkBit servers, but it is not a standalone client.
A full-fledged client that uses the hara-ddiclient library is the Update Factory Android Client. You can have a look at its source code to understand how to use the hara-ddiclient library.
https://github.com/Kynetics/uf-android-client

The Hara virtual device can be used as well as an example to implement a new client, but of course what is provided is missing an actual Updater, which depends on the platform-specific update files.

You can run the virtual client without docker using the following commands:
$ ./gradlew assemble
$ cd virtual-device/build/distributions/
$ tar xvf virtual-device-1.0.0.tar
$ HAWKBIT_GATEWAY_TOKEN=359c85ff5975755535dfe3dd2bf476c0 HAWKBIT_CONTROLLER_ID=mydevice ./virtual-device-1.0.0/bin/virtual-device

Of course remember to enable the gateway token in the hawkBit sandbox:



Again, I sincerely apologize if this is the typical newbie asking the obvious, but I have absolutely no idea. I am highly interested in this topic and would love to learn more.
In case the hara-ddiclient is not applicable yet for real device testing, any tips on alternatives with actual working guidelines?
Every client I look at apparently works, but when I try to follow the guidelines it either ends up as extremely vague or I open up a can of worms with issues such as dependencies, memory space or anything of which I never manage to solve.


The client really depends on the platform and the update types that you want to install. On Android, the Update Factory client should do what you are looking for. On other platforms, you really need to start with the questions: what is an update for me? Is it an OS image? An application?

Anyway, at the moment there is no ready-made client for non-Android platforms based on hara-ddiclient. At least not that I know of.

 
Thank you very much for your time,
David

Regards,
Diego Rondini

Kynetics
www.kynetics.com


Back to the top