When you create a function such as:
void start_hci_scan(struct hci_state current_hci_state)
any changes within start_hci_scan will get discarded (like error states and messages)
To fix, the structure can be passed as a pointer, or as a reference, like
void start_hci_scan(struct hci_state **&**current_hci_state)
In my case, hci_le_set_scan_parameters was returning an error, but the error was getting discarded.
When you create a function such as:
void start_hci_scan(struct hci_state current_hci_state)
any changes within start_hci_scan will get discarded (like error states and messages)
To fix, the structure can be passed as a pointer, or as a reference, like
void start_hci_scan(struct hci_state **&**current_hci_state)
In my case, hci_le_set_scan_parameters was returning an error, but the error was getting discarded.