Skip to content

port: sisdk: add Hubble Device SDK as SiLabs extension - #339

Open
HongNguyen635 wants to merge 2 commits into
HubbleNetwork:mainfrom
HongNguyen635:silabs/extension
Open

HongNguyen635 wants to merge 2 commits into
HubbleNetwork:mainfrom
HongNguyen635:silabs/extension

Conversation

@HongNguyen635

@HongNguyen635 HongNguyen635 commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Overview:

  • Adds the necessary files to make the Hubble SDK works as a SiSDK extension.
  • Add a basic ble-beacon sample.

Currently, the project works with Simplicity Studio 6 and the cli tool (slt, slc-cli). Documentation for quick start, guide, and CI will be added in future PR.


// <<< end of configuration section >>>

/*

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like these block bellow very much. I would rather have symbols used defined and options not selected can be comments if you want.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought about just reuse the config.h header from FreeRTOS port, but this is the style that SiLabs use, which will show up in the Configurator UI like so:

image

Whereas the plain #define block doesn't show up. An example reference I used is this file from SiSDK.

#endif

/* Matching the counter source selection to the right config symbol */
#if CONFIG_HUBBLE_COUNTER_SOURCE

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is does not look correct, we have it to group possible options in Kconfig, here you have make an implicit association CONFIG_HUBBLE_COUNTER_SOURCE == 1 == CONFIG_HUBBLE_COUNTER_SOURCE_DEVICE_UPTIME.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I spent some time trying to find a workaround for this. But this is the best I could come up with.
I can make it like this:

// <o CONFIG_HUBBLE_COUNTER_SOURCE> Counter source
// <HUBBLE_COUNTER_SOURCE_UNIX_TIME=> Unix time
// <HUBBLE_COUNTER_SOURCE_DEVICE_UPTIME=> Device uptime
#define CONFIG_HUBBLE_COUNTER_SOURCE HUBBLE_COUNTER_SOURCE_UNIX_TIME

but I can't compare #if CONFIG_HUBBLE_COUNTER_SOURCE == HUBBLE_COUNTER_SOURCE_UNIX_TIME unless I assigned value to it, which goes back to the implicit value association.
I can name the symbol different than CONFIG_HUBBLE_COUNTER_SOURCE to prevent the confusion, but that is the best way I could think of.

- name: SL_BOARD_ENABLE_VCOM
value: "1"
- name: SL_IOSTREAM_EUSART_VCOM_CONVERT_BY_DEFAULT_LF_TO_CRLF
value: "1"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't the SDK options be defined like this instead of using the header ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This way allows you to define arbitrary configs or override existing one, while having the header ties it to the SDK extension, so it can show up in the UI and have default values. We can remove the header, but then user have to manually copy/add these options on every new project.

Comment thread port/sisdk/hubble_config.h
Comment thread samples/freertos/silabs/ble-beacon/src/app.c Outdated
Comment thread samples/freertos/silabs/ble-beacon/src/app.c Outdated
Comment thread port/sisdk/hubble_sisdk.c
sl_status_t status;

if (!app_log_check_level(app_level[level])) {
return 0;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it return -EINVAL ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not an error though, if your level is only upto info, and the caller is debug type, it should be supressed. The zephyr port also do something similar.

@ceolin ceolin left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few comments to review, it is so simple, that is awesome :)

In order to use Hubble Device SDK with SiLabs toolchain, we need
to add it as an extension. This commit adds the necessary files to
make the Hubble SDK works as a SiSDK extension.

Currently, the port only supports the BLE (Terrestrial) network.

Signed-off-by: Hong Nguyen <hong@hubble.com>
Add basic BLE beacon sample to demonstrate Hubble SDK as an
extension for SiSDK (FreeRTOS).

Signed-off-by: Hong Nguyen <hong@hubble.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants