Skip to content

Commit

Permalink
porting/examples: fix ble_hci_sock_init assertion
Browse files Browse the repository at this point in the history
Since HCI socket was initialized by `ble_transport_ll_init` in LL side,
we should remove `ble_hci_sock_init` from example apps.

Signed-off-by: Hang Fan <fanhang8@gmail.com>
  • Loading branch information
Fanhang32 committed Dec 31, 2023
1 parent 64067f5 commit 7eb94cb
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions porting/examples/linux/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ static struct ble_npl_task s_task_hci;

void nimble_host_task(void *param);
void ble_hci_sock_ack_handler(void *param);
void ble_hci_sock_init(void);
void ble_hci_sock_set_device(int dev);
void ble_store_ram_init(void);

Expand Down Expand Up @@ -67,7 +66,6 @@ int main(int argc, char *argv[])
}

nimble_port_init();
ble_hci_sock_init();

/* This example provides GATT Alert service */
ble_svc_gap_init();
Expand Down
1 change: 0 additions & 1 deletion porting/examples/linux_blemesh/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ int main(int argc, char *argv[])
}

nimble_port_init();
ble_hci_sock_init();

ble_svc_gap_init();
ble_svc_gatt_init();
Expand Down
4 changes: 0 additions & 4 deletions porting/examples/nuttx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ static struct ble_npl_task s_task_hci;

void nimble_host_task(void *param);
void ble_hci_sock_ack_handler(void *param);
void ble_hci_sock_init(void);
void ble_hci_sock_set_device(int dev);
void ble_store_ram_init(void);

Expand Down Expand Up @@ -89,9 +88,6 @@ int main(int argc, char *argv[])
printf("port init\n");
nimble_port_init();

printf("hci init\n");
ble_hci_sock_init();

/* This example provides GATT Alert service */
printf("gap init\n");
ble_svc_gap_init();
Expand Down

0 comments on commit 7eb94cb

Please sign in to comment.