Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build blemesh shell demo for linux #1945

Open
gavin-yy opened this issue Dec 10, 2024 · 0 comments
Open

build blemesh shell demo for linux #1945

gavin-yy opened this issue Dec 10, 2024 · 0 comments

Comments

@gavin-yy
Copy link
Contributor

I am trying to build the blemesh shell demo on linux platform. so it could be a ble mesh provisioner.
Maybe someone else also want to build this demo, so i pushed a commit here. commit

This commit want to keep nimble/host/mesh/src/shell.c not changed since it is in the nimble stack core directory.

Notes:

  1. provisioner.c should work without marco BLE_MESH_CDB (for a simple demo)

Modification not be committed :

  1. nimble/host/mesh/src/shell.c prints 'uint32_t' variable with "%lx" format, it cause compile warnning. (should switch to PRIx32 or %x)

  2. bt_rand(void *buf, size_t len) calls ble_hs_hci_rand() to generate random numbers. My ble controller is buggly to support this.
    so i changed this function to read the random number from '/dev/urandom' for testing.

The test reuslt:

$sudo ./nimble-linux-blemesh-shell
...
mesh>provision 0 1 0
...
mesh>provision-adv dddd7cdfa1c215020000000000000000 0 2 0
...
send_prov_data: SessionKey: 608edf6774fdb2c01ae41c7dae59e21d
send_prov_data: Nonce: 20bf4ed33c6d6a8fe0a5f707c1
send_prov_data: DevKey: 9d588e3a77ec66919d770cb23cc7ae72
send_prov_data: net_idx 0, iv_index 0x00000000, addr 0x0002

prov_complete: key 9d588e3a77ec66919d770cb23cc7ae72, net_idx 0, num_elem 3, addr 0x0002>
...

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

No branches or pull requests

1 participant