-
Notifications
You must be signed in to change notification settings - Fork 1.4k
samples: bluetooth: added throughput many_to_one sample #26038
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
base: main
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,5 @@ | |||
| # Copyright (c) 2025 Nordic Semiconductor ASA | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix commit message by splitting into multiple lines (70 char max per line)
| bool "Throughput many-to-one Sample Settings" | ||
| default y | ||
| help | ||
| Enable configuration options for throughput many-to-one sample using PAwR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong indent
| source "Kconfig.zephyr" | ||
|
|
||
| rsource "periodic_adv_rsp/Kconfig" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the bottom does an include of Kconfig.zephyr
| # Enable floating point printf | ||
| target_compile_definitions(app PRIVATE CONFIG_CBPRINTF_FP_SUPPORT=y) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what are you doing? use a prj.conf file
| #define MSD_HEADER_LEN 4 /* Manufacturer specific data header length */ | ||
| #define ACK_ENTRY_SIZE 5 /* token (4B) + slot (1B) */ | ||
| #define ACK_SLOT_OFFSET 4 /* offset of slot in ACK entry */ | ||
| #define MIN_PAYLOAD_SIZE (MSD_HEADER_LEN + 5) /* MSD header (4B) + protocol version (1B) + protocl flags (1B), open_len (1B), ack_count(1B), rt_len(1B) */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the maximum line length is 100 chars (i.e. put the comment above and split it into multiple lines, if needed).
| static bool name_match_cb(struct bt_data *data, void *user_data) | ||
| { | ||
| bool *matched = user_data; | ||
| if (data->type == BT_DATA_NAME_COMPLETE || data->type == BT_DATA_NAME_SHORTENED) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
newline missing line 46
| const char *target = TARGET_NAME; | ||
| size_t target_len = strlen(target); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again, no
| .num_subevents = 1, | ||
| }; | ||
|
|
||
| uint8_t desired_subevent_id = target_subevent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define variable at top of scope
| int err = bt_le_per_adv_sync_subevent(sync_handle, &sync_param); | ||
| if (err) { | ||
| if (++subevent_retry_tries <= 5U) { /* retry up to 5 times*/ | ||
| (void)k_work_reschedule(&retry_subevent_sync_work, K_MSEC(10)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tab alignments in C
| if (++subevent_retry_tries <= 5U) { /* retry up to 5 times*/ | ||
| (void)k_work_reschedule(&retry_subevent_sync_work, K_MSEC(10)); | ||
| } else { | ||
| printk("[SYNC] Failed to set subevents after %u tries (err %d)\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use LOG_* for output (without \n)
|
This pull request has been marked as stale because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 7 days. Note, that you can always re-open a closed pull request at any time. |
Created new sample for showcasing how use of PAwR can give higher throughput in many-to-one communitcation than classical BLE connections. This was done to show customers an alternative way to set up communication with many devices when they got insufficient throughput Signed-off-by: Solveig Lunde <[email protected]> Signed-off-by: Eirin Berget <[email protected]>
cda6fca to
f2ea010
Compare
Created new sample for showcasing how use of PAwR can give higher throughput in many-to-one communitcation than classical BLE connections. This was done to show customers an alternative way to set up communication with many devices when they got insufficient throughput