Skip to content

Commit

Permalink
Merge pull request #90 from KNX-IOT/frank-fix
Browse files Browse the repository at this point in the history
Add mid
  • Loading branch information
WAvdBeek authored Feb 12, 2024
2 parents a7530fc + 4a1ec8e commit be11972
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
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

0 comments on commit be11972

Please sign in to comment.