uint16_t interval;
bool sending;
bool active;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ bool use_raw;
+#endif
};
struct pvt_rx_reg {
cmd_slem.mask[6] = 0x00;
cmd_slem.mask[7] = 0x00;
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (!(io->use_raw)) {
+ /* Reset Command in case of user channel */
+ bt_hci_send(io->hci, BT_HCI_CMD_RESET, NULL, 0, hci_generic_callback,
+ NULL, NULL);
+ }
+#else
/* TODO: Move to suitable place. Set suitable masks */
/* Reset Command */
bt_hci_send(io->hci, BT_HCI_CMD_RESET, NULL, 0, hci_generic_callback,
NULL, NULL);
+#endif
/* Read local supported commands */
bt_hci_send(io->hci, BT_HCI_CMD_READ_LOCAL_COMMANDS, NULL, 0,
bt_hci_unref(io->pvt->hci);
}
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ if (io->pvt->use_raw) {
+ l_debug("Use HCI RAW channel");
+
+ /* Power up HCI device */
+ uint16_t mode = 0x01;
+ if (!set_powered(mode, io->pvt->index))
+ return;
+
+ io->pvt->hci = bt_hci_new_raw_device(io->pvt->index);
+ } else {
+ l_debug("Use HCI USER channel");
+ io->pvt->hci = bt_hci_new_user_channel(io->pvt->index);
+ }
+#else
io->pvt->hci = bt_hci_new_user_channel(io->pvt->index);
+#endif
+
if (!io->pvt->hci) {
l_error("Failed to start mesh io (hci %u): %s", io->pvt->index,
strerror(errno));
return false;
io->pvt = l_new(struct mesh_io_private, 1);
+#ifdef TIZEN_FEATURE_BLUEZ_MODIFY
+ struct mesh_io_opts *io_opts;
+ io_opts = (struct mesh_io_opts *)opts;
+ io->pvt->index = io_opts->index;
+ io->pvt->use_raw = io_opts->use_raw;
+#else
io->pvt->index = *(int *)opts;
+#endif
io->pvt->rx_regs = l_queue_new();
io->pvt->tx_pkts = l_queue_new();