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

Add mid #90

Merged
merged 3 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion knx_iot_virtual_pb.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,14 @@ app_init(void)

/* set the firmware version 0.7.0 */
oc_core_set_device_fwv(0, 0, 7, 0);


char mid[5];
strncpy(mid, g_serial_number, 5); // mid = first 4 digits of sn
mid[4] = '\0';
long int mid_num = strtol(mid, NULL, 16);

/* manufactorer id */
oc_core_set_device_mid(0, (uint32_t)mid_num);

/* set the hardware type*/
// 123456789012
Expand Down
8 changes: 8 additions & 0 deletions knx_iot_virtual_sa.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,14 @@ app_init(void)

/* set the firmware version 0.7.0 */
oc_core_set_device_fwv(0, 0, 7, 0);

char mid[5];
strncpy(mid, g_serial_number, 5); // mid = first 4 digits of sn
mid[4] = '\0';
long int mid_num = strtol(mid, NULL, 16);

/* manufactorer id */
oc_core_set_device_mid(0, (uint32_t)mid_num);

/* set the hardware type*/
// 123456789012
Expand Down
Loading