skip to Main Content

I have been working on a project working a lot with the Zephyr RTOS. I have been flashing and executing my Zephyr applications onto my ESP32 DevkitC Wroom device with a lot of success. I am now trying to work on firmware updates. To start, I made use of MCUmgr to trigger firmware updates (using MCUBoot as a bootloader). This worked successfully and my next step is to try perform these updates OTA – hence the (attempted) use of HawkBit.

What I am struggling with, embarrassingly, is running the HawkBit update server on my laptop. After failing many times to get this server up and running, I followed the instructions on this page and managed to get the upadte server up and running as it is supposed to be (see image below).

enter image description here

With this setup, I was able to communicate with my target device (the ESP32) through the server and it was looking good. However, I ran into an issue. After a lot of trouble testing and diving deep into Zephyr’s provided Hawkbit subsystem, I discovered the error was in one of the HTTP PUT requests being made to the update server. The udpate server was expecting a different format for the data being sent – this is what led me to discover that the version of the HawkBit update server I was running had not been updated in 7 years :

So I have scratched the version I was running through my docker (linked above) and tried to use the official Hawkbit docker image again. Following instructions on Zephyr’s site, I try start the HawkBit container on port 8080. However, the update server does not actually start. All I get is a site with HawkBits REST API documentation (image below)

enter image description here

I am fairly certain that this is a silly mistake I am making however I have poured over HawkBits documentation on their site and git repo and am still missing something. Any advice would be greatly appreciated

Thanks in advance.

2

Answers


  1. Brief

    The UI is no longer included in the hawkbit/hawkbit-update-server image. See this issue. Furthermore, it seems to be on port 8088 by default.

    If you want a UI, you have to use the SimpleUI instead. This is available in the hawkbit/hawkbit-simple-ui image, but the sample docker compose is much easier.

    If you just use docker images, you will need to make sure that you start the update-server itself, the SimpleUI, the database and rabbitmq.

    Running the UI with Docker Compose

    The easiest way (in my oppinion) to get started with hawkBit is to use the docker compose files, since they also take care of starting the update server, the database, rabbitmq and the UI.

    1. Clone the hawkbit repo
    2. In the repo, checkout the latest tag. There is no explicit latest tag, so you will have to manually target a release such as 0.6.1. Do this with git checkout <tag>, of course replacing <tag> with your desired version. Important: it will not work on master as of 0.6.1, you need to checkout a release tag. See this issue for reasoning.
    3. Start one of the example containers from the hawkbit-runtime/docker directory, then run it with docker compose. For example:
      docker compose -f hawkbit-runtime/docker/docker-compose-micro-services-mysql-with-simple-ui.yml up
      
    4. Access the GUI on your host machine at localhost:8088
    5. Log in with username admin password admin

    I can’t say anything about the compatibility of this version with zephyr, but this is how you run the latest version.

    Login or Signup to reply.
  2. Simple UI seems to be very basic and can’t be used in production, what do you recommend if we have to use the legacy UI?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search