This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM625: cc3301: Unable to get hci0 interface

Part Number: AM625
Other Parts Discussed in Thread: CC3301,

Tool/software:

Hi,

We are using cc3301 (BDE-BW3301N1) module with custom am625 board , trying to enable the wifi and BT

able to get wifi interface wlan0, now we trying to get the Bluetooth vi uart

code changes

dts

&main_uart4 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&main_uart4_pins_default>;

        bluetooth {
                compatible = "ti,cc33xx-bt";
                disable-flow-control;
                max-speed = <115200>;
                pinctrl-names = "default";
                pinctrl-0 = <&main_btirq_pins_default>;
                host-wakeup-gpios = <&main_gpio0 31 GPIO_ACTIVE_HIGH>;
                interrupt-parent = <&main_gpio0>;
        };
};

       main_btirq_pins_default: main-btirq-pins-default {
                pinctrl-single,pins = <
                        AM62X_IOPAD(0x007c, PIN_INPUT, 7) /* (P25) GPMC0_CLK.GPIO0_31 */
                >;
        };

        main_uart4_pins_default: main-uart4-default-pins {
                pinctrl-single,pins = <
                        AM62X_IOPAD(0x0124, PIN_OUTPUT, 3) /* (A23) MMC2_SDCD.UART4_RXD */
                        AM62X_IOPAD(0x0128, PIN_OUTPUT, 3) /* (B23) MMC2_SDWP.UART4_TXD */
                >;
        }

used disable-flow-control because we don't user cts and rts hardware line

and commented some part of code like btti_uart_regulator_event in the driver btti_uart.c because power is always on 

attached modified one

   

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  TI Bluetooth HCI UART driver
 *  Copyright (C) 2023 Texas Instruments
 * 
 *  Acknowledgements:
 *  This file is based on btuart.c, which was written by Marcel Holtmann.
 */

#define DEBUG
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/skbuff.h>
#include <linux/serdev.h>
#include <linux/of.h>
#include <linux/irq.h>
#include <linux/firmware.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/gpio/consumer.h>
#include <linux/pinctrl/consumer.h>
#include <asm/unaligned.h>

#include <net/bluetooth/bluetooth.h>
#include <net/bluetooth/hci_core.h>

#include "h4_recv.h"

#define VERSION "0.84"

struct btti_uart_vnd {
	const struct h4_recv_pkt *recv_pkts;
	int recv_pkts_cnt;
	unsigned int manufacturer;
};

enum state{
	STATE_PROBING = 0,
	STATE_HW_OFF,
	STATE_HW_ON,
	STATE_HW_READY,
	STATE_REMOVED
};

static const char *sm_state_to_string(enum state state)
{
	switch (state){
	case STATE_PROBING:
		return "STATE_PROBING";
	case STATE_HW_OFF: 
		return "STATE_HW_OFF";
	case STATE_HW_ON: 
		return "STATE_HW_ON";
	case STATE_HW_READY:
		return "STATE_HW_READY";
	case STATE_REMOVED:
		return "STATE_REMOVED";
	}

	return "Illegal state value";
};

enum sm_event{
	EVENT_PROBE_DONE,
	EVENT_REMOVE,
	EVENT_REGULATOR_ENABLE,
	EVENT_REGULATOR_DISABLE,
	EVENT_HCI_WAKEUP_FRAME_RECEIVED,
};

static const char *event_to_string(enum sm_event event)
{
	switch (event){
	case EVENT_PROBE_DONE:
		return "EVENT_PROBE_DONE";
	case EVENT_REMOVE: 
		return "EVENT_REMOVE";
	case EVENT_REGULATOR_ENABLE: 
		return "EVENT_REGULATOR_ENABLE";
	case EVENT_REGULATOR_DISABLE:
		return "EVENT_REGULATOR_DISABLE";
	case EVENT_HCI_WAKEUP_FRAME_RECEIVED: 
		return "EVENT_HCI_WAKEUP_FRAME_RECEIVED";
	}

	return "Illegal event value";
};

struct btti_uart_dev {
	struct hci_dev *hdev;
	struct serdev_device *serdev;
	struct regulator *reg;
	struct notifier_block nb;

	struct work_struct tx_work;
	struct sk_buff_head txq;

	struct work_struct btti_uart_sm_work;
	struct llist_head sm_event_list;
	enum state sm_state;

	struct sk_buff *rx_skb;

	const struct btti_uart_vnd *vnd;

	struct gpio_desc	*host_wakeup;

	struct pinctrl *pinctrl;
	struct pinctrl_state *pins_runtime;
	struct pinctrl_state *pins_sleep;
};

struct event_node{
	struct llist_node node;
	enum sm_event event;
};

static int serial_open(struct btti_uart_dev *bdev)
{
	struct serdev_device *serdev = bdev->serdev;
	bool disable_flow_control = false;
	u32 max_speed = 3000000;
	int ret=0;

	ret = serdev_device_open(serdev);
	if (ret){
		dev_err(&serdev->dev, "Cannot open serial port (%d)", ret);
		return ret;
	}

	of_property_read_u32(serdev->dev.of_node, "max-speed", &max_speed);
	disable_flow_control = of_property_read_bool(serdev->dev.of_node, "disable-flow-control");

	serdev_device_set_baudrate(serdev, max_speed);
	if (disable_flow_control)
		serdev_device_set_flow_control(serdev, false);

	if (bdev->host_wakeup)
		pm_runtime_enable(&serdev->dev);

	return ret;
}

static void serial_close(struct btti_uart_dev *bdev)
{
	struct serdev_device *serdev = bdev->serdev;

	if (bdev->host_wakeup)
		pm_runtime_disable(&serdev->dev);

	serdev_device_close(serdev);
}

static int btti_uart_open(struct hci_dev *hdev)
{
	return 0;
}

static int btti_uart_close(struct hci_dev *hdev)
{
	return 0;
}

static int btti_uart_flush(struct hci_dev *hdev)
{
	struct btti_uart_dev *bdev = hci_get_drvdata(hdev);

	/* Flush any pending characters */
	serdev_device_write_flush(bdev->serdev);
	skb_queue_purge(&bdev->txq);

	cancel_work_sync(&bdev->tx_work);

	kfree_skb(bdev->rx_skb);
	bdev->rx_skb = NULL;

	return 0;
}

static int btti_uart_setup(struct hci_dev *hdev)
{
	return 0;
}

static int btti_uart_tx_wakeup(struct btti_uart_dev *bdev)
{
	schedule_work(&bdev->tx_work);
	return 0;
}

static int btti_uart_send_frame(struct hci_dev *hdev, struct sk_buff *skb)
{
	struct btti_uart_dev *bdev = hci_get_drvdata(hdev);

	/* Prepend skb with frame type */
	memcpy(skb_push(skb, 1), &hci_skb_pkt_type(skb), 1);
	skb_queue_tail(&bdev->txq, skb);

	btti_uart_tx_wakeup(bdev);
	return 0;
}

static int btti_uart_register_hci_device(struct btti_uart_dev *bdev)
{
	struct serdev_device *serdev = bdev->serdev;
	struct hci_dev *hdev;
	int ret;

	hdev = hci_alloc_dev();
	if (!hdev) {
		dev_err(&serdev->dev, "Can't allocate HCI device");
		return -ENOMEM;
	}

	hci_set_drvdata(hdev, bdev);
	hdev->bus = HCI_UART;
	hdev->open  = btti_uart_open;
	hdev->close = btti_uart_close;
	hdev->flush = btti_uart_flush;
	hdev->setup = btti_uart_setup;
	hdev->send  = btti_uart_send_frame;
	SET_HCIDEV_DEV(hdev, &serdev->dev);

	ret = hci_register_dev(hdev);
	if (ret){
		dev_err(&serdev->dev, "Can't register HCI device (%d)", ret);
		hci_free_dev(hdev);
		hdev = NULL;
	}

	bdev->hdev = hdev;
	return ret;
}

static void btti_uart_unregister_device(struct btti_uart_dev *bdev)
{
	struct hci_dev *hdev = bdev->hdev;

	hci_unregister_dev(hdev);
	hci_free_dev(hdev);
	
	bdev->hdev = NULL;
}

static void btti_uart_tx_work(struct work_struct *work)
{
	struct btti_uart_dev *bdev = container_of(work, struct btti_uart_dev,
					          tx_work);
	struct serdev_device *serdev = bdev->serdev;
	struct hci_dev *hdev = bdev->hdev;

	while (1) {
		struct sk_buff *skb = skb_dequeue(&bdev->txq);
		int len;

		if (!skb)
			break;

		len = serdev_device_write_buf(serdev, skb->data,
					      skb->len);
		hdev->stat.byte_tx += len;

		skb_pull(skb, len);
		if (skb->len > 0) {
			skb_queue_head(&bdev->txq, skb);
			break;
		}

		switch (hci_skb_pkt_type(skb)) {
		case HCI_COMMAND_PKT:
			hdev->stat.cmd_tx++;
			break;
		case HCI_ACLDATA_PKT:
			hdev->stat.acl_tx++;
			break;
		case HCI_SCODATA_PKT:
			hdev->stat.sco_tx++;
			break;
		}

		kfree_skb(skb);
	}
}

static void unexpected_event(struct serdev_device *serdev, 
			     enum state state, enum sm_event event)
{
	dev_err(&serdev->dev, "Unexpected event %s at state %s",
		event_to_string(event), sm_state_to_string(state));
	WARN_ON(1);
}

static void btti_uart_sm_post_event(struct btti_uart_dev *bdev, enum sm_event event)
{
	struct event_node *event_node;

	event_node = kzalloc(sizeof(*event_node), GFP_KERNEL);
	if (unlikely(!event_node)){
		dev_err(&bdev->serdev->dev, "Event allocation failure");
		return;
	}

	event_node->event = event;

	llist_add(&event_node->node, &bdev->sm_event_list);
	schedule_work(&bdev->btti_uart_sm_work);
}

static void sm_process(struct btti_uart_dev *bdev, enum sm_event event)
{
	struct serdev_device *serdev = bdev->serdev;
	enum state next_state = bdev->sm_state;

	switch (bdev->sm_state){
	case STATE_PROBING:
		switch (event){
		case EVENT_PROBE_DONE:
			//if (regulator_is_enabled(bdev->reg))
				btti_uart_sm_post_event(bdev, EVENT_REGULATOR_ENABLE);

			next_state = STATE_HW_OFF;
			break;

		default:
			unexpected_event(serdev, bdev->sm_state, event);
		}
		break;

	case STATE_HW_OFF:
		switch(event){
		case EVENT_REGULATOR_ENABLE:
			if (0 == serial_open(bdev))
				next_state = STATE_HW_ON;
			else
				dev_err(&serdev->dev, "Could not open serial port");
			break;

		case EVENT_REMOVE:
			next_state = STATE_REMOVED;
			break;

		case EVENT_REGULATOR_DISABLE:
			break;

		default:
			unexpected_event(serdev, bdev->sm_state, event);
		}
		break;

	case STATE_HW_ON:
		switch(event){
		case EVENT_REMOVE:
		case EVENT_REGULATOR_DISABLE:
			serial_close(bdev);
			next_state = (event == EVENT_REMOVE) ? 
						STATE_REMOVED: STATE_HW_OFF;
			break;

		case EVENT_HCI_WAKEUP_FRAME_RECEIVED:
			if (0 == btti_uart_register_hci_device(bdev))
				next_state = STATE_HW_READY;
			break;

		case EVENT_REGULATOR_ENABLE:
			break;

		default:
			unexpected_event(serdev, bdev->sm_state, event);
		}
		break;

	case STATE_HW_READY:
		switch(event){
		case EVENT_REMOVE:
		case EVENT_REGULATOR_DISABLE:
			btti_uart_unregister_device(bdev);
			serial_close(bdev);
			next_state = (event == EVENT_REMOVE) ? 
						STATE_REMOVED: STATE_HW_OFF;
			break;

		case EVENT_REGULATOR_ENABLE:
			break;

		default:
			unexpected_event(serdev, bdev->sm_state, event);
		}
		break;

	case STATE_REMOVED:
		switch(event){
		case EVENT_REGULATOR_DISABLE:
		case EVENT_REGULATOR_ENABLE:
		case EVENT_HCI_WAKEUP_FRAME_RECEIVED:
			break;

		default:
			unexpected_event(serdev, bdev->sm_state, event);
		}
		break;
	}

	dev_dbg(&serdev->dev, 
		"SM: Got %s, moving from %s to %s",
		event_to_string(event), sm_state_to_string(bdev->sm_state), 
		sm_state_to_string(next_state));

	bdev->sm_state = next_state;
}

inline static struct llist_node* get_event_list(struct btti_uart_dev *bdev)
{
	struct llist_node* node;

	node = llist_del_all(&bdev->sm_event_list);
	if (!node)
		return NULL;
	
	return llist_reverse_order(node);
}

static void btti_uart_sm_work(struct work_struct *work)
{
	struct btti_uart_dev *bdev;
	struct event_node *event_node, *tmp;
	struct llist_node *event_list;

	bdev = container_of(work, struct btti_uart_dev, btti_uart_sm_work);
	event_list = get_event_list(bdev);

	llist_for_each_entry_safe(event_node, tmp, event_list, node){
		sm_process(bdev, event_node->event);
		kfree(event_node);
	}
}

static int btti_uart_wakeup_event_match(struct serdev_device *serdev, 
					const u8 *data, size_t count)
{
	struct btti_uart_dev *bdev = serdev_device_get_drvdata(serdev);
	const u8 hw_wakeup_evt[] = {HCI_VENDOR_PKT, 0xff, 0x02, 0x04, 0x2a, 0x00, 0x00};

	if (count < sizeof hw_wakeup_evt)
		return 0; // Reject data until all bytes have been received

	if (count > sizeof hw_wakeup_evt)
		goto error;

	if (0 != memcmp(&hw_wakeup_evt, data, sizeof hw_wakeup_evt))
		goto error;

	btti_uart_sm_post_event(bdev, EVENT_HCI_WAKEUP_FRAME_RECEIVED);
	return count;

error:
	dev_err(&serdev->dev, "Unexpected wakeup pattern");
	print_hex_dump(KERN_DEBUG, "Pattern:", 
		       DUMP_PREFIX_NONE, 16, 1, data, count, true);
	return count;
}

static int btti_uart_receive_buf(struct serdev_device *serdev, const u8 *data,
			      size_t count)
{
	struct btti_uart_dev *bdev = serdev_device_get_drvdata(serdev);
	const struct btti_uart_vnd *vnd = bdev->vnd;

	if (unlikely(!bdev->hdev)){
		// Accept only wakeup event until driver is registered with HCI 
		return btti_uart_wakeup_event_match(serdev, data, count);
	}

	bdev->rx_skb = h4_recv_buf(bdev->hdev, bdev->rx_skb, data, count,
				   vnd->recv_pkts, vnd->recv_pkts_cnt);
	if (IS_ERR(bdev->rx_skb)) {
		int err = PTR_ERR(bdev->rx_skb);
		dev_err(&serdev->dev, "Frame reassembly failed (%d)", err);
		bdev->rx_skb = NULL;
		print_hex_dump( KERN_DEBUG, "Frame:", DUMP_PREFIX_NONE,
				16, 1, data, count, true);
		return 0;
	}

	bdev->hdev->stat.byte_rx += count;

	return count;
}

static void btti_uart_write_wakeup(struct serdev_device *serdev)
{
	struct btti_uart_dev *bdev = serdev_device_get_drvdata(serdev);

	btti_uart_tx_wakeup(bdev);
}

static const struct serdev_device_ops btti_uart_client_ops = {
	.receive_buf = btti_uart_receive_buf,
	.write_wakeup = btti_uart_write_wakeup,
};

static const struct h4_recv_pkt default_recv_pkts[] = {
	{ H4_RECV_ACL,      .recv = hci_recv_frame },
	{ H4_RECV_SCO,      .recv = hci_recv_frame },
	{ H4_RECV_EVENT,    .recv = hci_recv_frame },
};

static const struct btti_uart_vnd default_vnd = {
	.recv_pkts	= default_recv_pkts,
	.recv_pkts_cnt	= ARRAY_SIZE(default_recv_pkts),
};

static const struct btti_uart_vnd ti_vnd = {
	.recv_pkts	= default_recv_pkts,
	.recv_pkts_cnt	= ARRAY_SIZE(default_recv_pkts),
	.manufacturer	= 13,
};

#if 0
static int btti_uart_regulator_event(struct notifier_block *nb,
				     unsigned long event, void *data)
{
	struct btti_uart_dev *bdev = container_of(nb, struct btti_uart_dev, nb);

	if (event & REGULATOR_EVENT_DISABLE) {
		btti_uart_sm_post_event(bdev, EVENT_REGULATOR_DISABLE);
	}

	if (event & REGULATOR_EVENT_ENABLE) {
		btti_uart_sm_post_event(bdev, EVENT_REGULATOR_ENABLE);
	}

	return NOTIFY_OK;
}
#endif

static irqreturn_t host_wake_irq(int irq, void *data)
{
	struct btti_uart_dev *bdev = data;
	struct serdev_device *serdev = bdev->serdev;

	dev_info(&serdev->dev, "CC33xx wake IRQ");

	pm_wakeup_event(&serdev->dev, 0);
	pm_system_wakeup();

	return IRQ_HANDLED;
}

static void btti_uart_host_wake_init(struct serdev_device *serdev)
{
	struct btti_uart_dev *bdev = serdev_device_get_drvdata(serdev);
	int ret;

	if (!bdev->pinctrl)
		goto out_err;

	bdev->pins_sleep = pinctrl_lookup_state(bdev->pinctrl, "sleep");
	if (IS_ERR(bdev->pins_sleep))
		bdev->pins_sleep = NULL;

	bdev->host_wakeup = devm_gpiod_get_optional(&serdev->dev, "host-wakeup", GPIOD_IN);
	if (IS_ERR(bdev->host_wakeup))
		goto out_err;

	if (device_init_wakeup(&serdev->dev, true) != 0)
		goto out_err;

	ret = devm_request_irq(&serdev->dev, gpiod_to_irq(bdev->host_wakeup), 
		host_wake_irq, IRQF_TRIGGER_RISING, "btti_host_wake", bdev);
	if (ret)
		goto out_err;

	ret = enable_irq_wake(gpiod_to_irq(bdev->host_wakeup));
	if (ret < 0)
		goto out_err_disable_wake; 
	
	disable_irq(gpiod_to_irq(bdev->host_wakeup));
	
	dev_info(&serdev->dev, "Host wakeup enabled");
	return;


out_err_disable_wake:
	device_init_wakeup(&serdev->dev, false);
out_err:
	bdev->host_wakeup = NULL;
	bdev->pins_sleep = NULL;
	dev_info(&serdev->dev, "Host wakeup NOT enabled");
	return;
}

static int btti_uart_probe(struct serdev_device *serdev)
{
	struct btti_uart_dev *bdev;
	int ret;

	bdev = devm_kzalloc(&serdev->dev, sizeof(*bdev), GFP_KERNEL);
	if (!bdev)
		return -ENOMEM;

	/* Request the vendor specific data and callbacks */
	bdev->vnd = device_get_match_data(&serdev->dev);
	if (!bdev->vnd)
		bdev->vnd = &default_vnd;

	bdev->serdev = serdev;
	serdev_device_set_drvdata(serdev, bdev);

#if 0
	/* Using the optional get regulator API as normal get returns a dummy 
	if the regulator is not found. */
	bdev->reg = devm_regulator_get_optional(&serdev->dev, "cc33xx");
	if (PTR_ERR(bdev->reg) == -EPROBE_DEFER)
		return -EPROBE_DEFER;
	if (IS_ERR(bdev->reg)) {
		dev_err(&serdev->dev, "can't get regulator");
		return PTR_ERR(bdev->reg);
	}
#endif

	bdev->pinctrl = devm_pinctrl_get(&serdev->dev);
	if (!IS_ERR(bdev->pinctrl)){
		bdev->pins_runtime = pinctrl_lookup_state(bdev->pinctrl, "default");
		if (IS_ERR(bdev->pins_runtime)){
			dev_err(&serdev->dev, "can't lookup default pin state");
			return PTR_ERR(bdev->pins_runtime);
		}
	} else {
		bdev->pinctrl = NULL;
		bdev->pins_runtime = NULL;
	}

	btti_uart_host_wake_init(serdev);

	if (bdev->pins_runtime)
		pinctrl_select_state(bdev->pinctrl, bdev->pins_runtime);
	
#if 0
	bdev->nb.notifier_call = btti_uart_regulator_event;

	ret = regulator_register_notifier(bdev->reg, &bdev->nb);
	if (ret != 0) {
		dev_err(&serdev->dev, 
			"Failed to register regulator notifier (%d)", ret);
		return ret;
	}
#endif

	serdev_device_set_client_ops(serdev, &btti_uart_client_ops);

	INIT_WORK(&bdev->tx_work, btti_uart_tx_work);
	skb_queue_head_init(&bdev->txq);

	INIT_WORK(&bdev->btti_uart_sm_work, btti_uart_sm_work);
	init_llist_head(&bdev->sm_event_list);

	btti_uart_sm_post_event(bdev, EVENT_PROBE_DONE);

	return 0;
}

static void btti_uart_remove(struct serdev_device *serdev)
{
	struct btti_uart_dev *bdev = serdev_device_get_drvdata(serdev);

	if (bdev->host_wakeup){
		device_init_wakeup(&serdev->dev, false);
		disable_irq_wake(gpiod_to_irq(bdev->host_wakeup));
	}

	//regulator_unregister_notifier(bdev->reg, &bdev->nb);
	btti_uart_sm_post_event(bdev, EVENT_REMOVE);
	flush_work(&bdev->btti_uart_sm_work);
}

static int btti_suspend_device(struct device *dev)
{
	struct btti_uart_dev *bdev = dev_get_drvdata(dev);
	struct serdev_device *serdev = bdev->serdev;
	int ret;

	if (bdev->pins_sleep){
		ret = pinctrl_select_state(bdev->pinctrl, bdev->pins_sleep);
		if (ret < 0)
			goto out_err;
	}

	enable_irq(gpiod_to_irq(bdev->host_wakeup));

	ret = serdev_device_set_rts(serdev, false);
		if (ret < 0)
			goto out_err;

	return 0;

out_err:
	if (bdev->pins_runtime)
		pinctrl_select_state(bdev->pinctrl, bdev->pins_runtime);

	serdev_device_set_rts(serdev, true);

	return ret; 
}

static int btti_resume_device(struct device *dev)
{
	struct btti_uart_dev *bdev = dev_get_drvdata(dev);
	struct serdev_device *serdev = bdev->serdev;
	int ret;

	disable_irq_nosync(gpiod_to_irq(bdev->host_wakeup));

	if (bdev->pins_runtime){
		ret = pinctrl_select_state(bdev->pinctrl, bdev->pins_runtime);
		if (ret < 0)
			return ret;
	}

	return serdev_device_set_rts(serdev, true);
}

#ifdef CONFIG_OF
static const struct of_device_id btti_uart_of_match_table[] = {
	{ .compatible = "ti,cc33xx-bt", .data = &ti_vnd },
	{ }
};
MODULE_DEVICE_TABLE(of, btti_uart_of_match_table);
#endif

static const struct dev_pm_ops btti_pm_ops = {
	SET_SYSTEM_SLEEP_PM_OPS(btti_suspend_device, btti_resume_device)
};

static struct serdev_device_driver btti_uart_driver = {
	.probe = btti_uart_probe,
	.remove = btti_uart_remove,
	.driver = {
		.name = "btti",
		.of_match_table = of_match_ptr(btti_uart_of_match_table),
		.pm = &btti_pm_ops
	},
};

module_serdev_device_driver(btti_uart_driver);

MODULE_DESCRIPTION("TI Bluetooth UART driver ver " VERSION);
MODULE_VERSION(VERSION);
MODULE_LICENSE("GPL");

log

[  190.909634] btti serial0-0: Host wakeup enabled
[  190.910016] btti serial0-0: SM: Got EVENT_PROBE_DONE, moving from STATE_PROBING to STATE_HW_OFF
[  190.910537] btti serial0-0: SM: Got EVENT_REGULATOR_ENABLE, moving from STATE_HW_OFF to STATE_HW_ON

and not able to get the directory  "cc33xx/ble_enable" in the  /sys/kernel/debug/ieee80211/phy0/  and

hci0 interface.

order of wifi and bt driver load make any impact on operation?

please give suggestion to come out of issue.

Regards,

Gireesh Hiremath

  • Hi Gireesh,

    A couple of issues.

    1. I would not recommend changing the driver code. Instead, you can set the regulator in the device tree from the main_uart. See the am62 DTS example and "cc33xx-supply" in the CC33xx SDK. It can connect to the same enable pin. 
      1. &main_uart1 {
         status = "okay";
         pinctrl-names = "default";
         pinctrl-0 = <&main_uart1_pins_default>;

         bluetooth {
         compatible = "ti,cc33xx-bt";
         cc33xx-supply = <&wlan_en>;
         max-speed = <115200>;
         };
        };
    2. The cc33xx wifi driver needs to load first before the path will show in debugfs (/sys/kernel/debug). This means that cc33xx firmware download also needs to complete. Then ble_enable can triggered. 
    3. We do not recommend using UART without CTS/RTS on the cc33xx parts. Can you please explain the reasoning behind the decision to not connect CTS/RTS? For BLE communication, we recommend using 4-wire UART or SDIO. 
  • Hi Sabeeh,

    Thanks for information,  we will include CTS/RTS in next version of hardware.

    I have some concern.

    1. We wanted the BT module to be ON always so powered directly

          then how to avoid the regulator or enable/disable mechanism in the code ?

    2. Uart can be handled without flow control so we have not included CTS/RTS and driver also support "disable-flow-control;"

         is BT module will not work without CTS/RTS through uart interface?

    Thanks,

    Gireesh Hiremath

  • Hi Gireesh,

    The CC3301 does not separate BLE and WiFi, so in order to use BLE, the cc3301 FW must be downloaded through the linux wifi driver. I would not recommend forcing in hardware or software the BT module to be always on because if an issue were to occur, then the wifi driver must be able to reset the cc3301 and redownload FW. After FW download, only then can the BLE be enabled through 'ble_enable' as you mention above. 

    is BT module will not work without CTS/RTS through uart interface?

    We do not support UART interface without CTS/RTS. However, after talking to folks internally, it does seem possible, but it is not reliable nor recommended. I have not tried it myself. After FW download, it seems you can issue set_power_mode.sh 0 and theoretically UART without RTS/CTS can work. However you now run with increased the power consumption. 

  • Hi Sabeeh,

    With my current hardware setup I can't add CTS/RTC line to uart interface so trying to use SDIO interface to connect BT module.

    changed dts as

    &sdhci2 {
            status = "okay";
            vmmc-supply = <&vcc_3v3_sys>;
            pinctrl-names = "default";
            pinctrl-0 = <&main_mmc2_pins_default>;
            bus-width = <4>;
            non-removable;
            ti,fails-without-test-cd;
            cap-power-off-card;
            keep-power-in-suspend;
            ti,driver-strength-ohm = <50>;
            assigned-clocks = <&k3_clks 157 158>;
            assigned-clock-parents = <&k3_clks 157 160>;

            #address-cells = <1>;
            #size-cells = <0>;
            wifi@1 {
                    compatible = "ti,cc3301";
                    reg = <2>;
                    pinctrl-names = "default";
                    pinctrl-0 = <&main_wlirq_pins_default>;
                    interrupt-parent = <&main_gpio0>;
                    interrupts = <32 IRQ_TYPE_EDGE_RISING>;
            };

            btti@0 {
                    compatible = "ti,cc33xxbt";
                    reg = <1>;
                    pinctrl-names = "default";
                    pinctrl-0 = <&main_btirq_pins_default>;
                    interrupt-parent = <&main_gpio0>;
                    interrupts = <31 IRQ_TYPE_EDGE_RISING>;
            };
    };

    user@prometheus:~$ sudo dmesg | grep Bluetooth
    [    0.095170] Bluetooth: Core ver 2.22
    [    0.095228] Bluetooth: HCI device and connection manager initialized
    [    0.095240] Bluetooth: HCI socket layer initialized
    [    0.095248] Bluetooth: L2CAP socket layer initialized
    [    0.095264] Bluetooth: SCO socket layer initialized
    [    5.514538] Bluetooth: [bt sdio] BLE SDIO init module
    [    5.581322] Bluetooth: [bt sdio] PROBE vendor=0x97, device=0x4077, class=255, fn=1 0xffff00000fa4a400
    [    5.585297] Bluetooth: [bt sdio hci] btti_hci_add_sdio_dev
    [    5.585357] Bluetooth: [bt sdio hci] Starting work thread...
    [    5.585841] Bluetooth: [bt sdio hci] work thread is started
    [    5.585860] Bluetooth: [bt sdio hci] work thread is sleeping...
    [    5.585911] Bluetooth: [bt sdio] TI cc33xx BLE-over-SDIO driver is up and running!
    user@prometheus:~$ sudo dmesg | grep cc33
    [    5.469391] cc33xx_sdio mmc2:0001:2: Using GPIO as IRQ
    [    5.499890] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx-nvs.bin
    [    5.503528] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx-conf.bin
    [    5.585911] Bluetooth: [bt sdio] TI cc33xx BLE-over-SDIO driver is up and running!
    [    5.791773] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx_2nd_loader.bin
    [    6.053810] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx_fw.bin

    still not able to get the directory  "cc33xx/ble_enable" in the  /sys/kernel/debug/ieee80211/phy0/  and

    hci0 interface.

    Please give some suggestion.

    Regards,

    Gireesh Hiremath

  • Hi Giressh,

    Do you see a wlan0 interface in this case?

    Also, the BLE over SDIO requires inband interrupt. To do this, you only have to comment out the "pinctrl", "interrupt-parent" and "interrupts" in both wifi and btti subnodes of the DTS. For example,

    wifi@1 {
        compatible = "ti,cc3301";
        reg = <2>;
    };
    
    btti@0 {
        compatible = "ti,cc33xxbt";
        reg = <1>;
    };

  • Hi Sabeeh,

    Yes, I can see the wlan0 interface in that case and also after comment out the "pinctrl", "interrupt-parent" and "interrupts" in both wifi and btti subnodes of the DTS 

    but still not seeing hci interface. any further changes is required in hardware/software ?

    Regards,

    Gireesh Hiremath

  • Hi Gireesh,

    Do you set 1 to ble_enable? Do you see anything under 'hciconfig -a'?

  • Hi Sabeeh,

    /sys/kernel/debug/ieee80211/phy0/cc33xx/ble_enable path not generated and not seen anything under  'hciconfig -a'

    root@bosch :/sys/kernel/debug/ieee80211/phy0# ls
    airtime_flags  aqm              misc                  rate_ctrl_alg      wep_iv
    aql_enable     force_tx_status  netdev:p2p-dev-wlan0  reset
    aql_pending    hw_conf          netdev:wlan0          statistics
    aql_threshold  hwflags          power                 total_ps_buffered
    aql_txq_limit  keys             queues                user_power

    Regards,

    Gireesh Hiremath

  • Hi Gireesh, 

    This is strange, i'm not sure what the issue could be. Are you sure cc33xx driver is loaded and wlan0 interface at this same time? 

  • Hi Sabeesh,

    yes, wifi is working?

    Please share document about ble via sdio. like DTS changes, script to handle, required hardware changes etc.

    official released patches give detail about ble via uart interface only.

    is the latest CC33XX-LINUX-MPU Version: 1.0.0.6 support only ti-linux-kernel-6.1.46?

    if it not support the tisdk 10.00.07.04 ti-linux-kernel-6.6.32 then please share the patches for the same.

    Regards,

    Gireesh Hiremath

  • Hi Gireesh,

    Are you using kernel version 6.1 or 6.6? I don't believe we have tested BLE over SDIO in ti-linux-kernel 6.6. Let me investigate internally first, and then I can post patches to confirm it is working.

  • Hi Sabeeh,

    We are using kernel version 6.6.

    Thanks, looking for update.

    Regards,

    Gireesh

  • Hi Sabeeh,

    Any update on the cc33xx patch for kernel version 6.6?

  • Hi Sabeeh,

    Is it allowed/possible to use out-of-band interrupt for BLE over SDIO?

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Any update on the above queries ?

    Regards,

    Gireesh

  • Hi Gireesh, 

    Thanks for your patience. I am providing you a patch here for you to review or apply directly. This patch includes the BLE driver for kernel 6.6 that also patches the cc33xx wifi driver to create the debugfs and send the 'ble_enable' command through sysfs (sys/kernel/debug/ieee80211/phy0/cc33xx/ble_enable). 

    0001-bluetooth-add-cc33xx-ble-driver-and-debugfs.patch

  • Hi Sabeeh,

    Thanks for the patch, I will apply and get back to you.

    any update about "Is it allowed/possible to use out-of-band interrupt for BLE over SDIO?"

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Thanks for the patch, able to get the hci0 interface now.

    but still not able scan and connect with the device please give suggestion.

    getting error   like "[  570.636423] Bluetooth: hci0: Opcode 0x2042 failed: -22"

    full commands and dmesg log as below

    root@bosch:~# dmesg | grep "cc33"
    [    5.457915] cc33xx_sdio mmc2:0001:2: Using SDIO in-band IRQ
    [    5.467627] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx-nvs.bin
    [    5.468828] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx-conf.bin
    [    5.538893] Bluetooth: [bt sdio] TI cc33xx BLE-over-SDIO driver is up and running!
    [    5.747615] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx_2nd_loader.bin
    [    6.027889] cc33xx_driver cc33xx.5.auto: firmware: direct-loading firmware ti-connectivity/cc33xx_fw.bin
    root@bosch:~# dmesg | grep "sdio"
    [    5.457915] cc33xx_sdio mmc2:0001:2: Using SDIO in-band IRQ
    [    5.473416] Bluetooth: [bt sdio] BLE SDIO init module
    [    5.533767] Bluetooth: [bt sdio] PROBE vendor=0x97, device=0x4077, class=255, fn=1 0xffff00000ff5e400
    [    5.537389] Bluetooth: [bt sdio hci] btti_hci_add_sdio_dev
    [    5.537455] Bluetooth: [bt sdio hci] Starting work thread...
    [    5.538752] Bluetooth: [bt sdio hci] work thread is started
    [    5.538828] Bluetooth: [bt sdio hci] work thread is sleeping...
    [    5.538893] Bluetooth: [bt sdio] TI cc33xx BLE-over-SDIO driver is up and running!

    root@bosch:~# echo "1" > /sys/kernel/debug/ieee80211/phy0/cc33xx/ble_enable
    root@bosch:~#
    root@bosch:~# hciconfig -a
    hci0:   Type: Primary  Bus: SDIO
            BD Address: AA:BB:CC:DD:EF:00  ACL MTU: 255:10  SCO MTU: 0:0
            UP RUNNING
            RX bytes:632 acl:0[  260.564220] Bluetooth: hci0: unexpected cc 0x0c14 length: 1 < 249
     sco:0 events:50 errors:0
            TX bytes:520 acl:0 sco:0 commands:49 errors:0
            Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00
            Packet type: DM1 DH1 HV1
            Link policy:
            Link mode: PERIPHERAL ACCEPT
    Can't read local name on hci0: Input/output error (5)
    root@bosch:~#
    root@bosch:~# hciconfig hci0 up
    root@bosch:~# hciconfig -a
    hci0:   Type: Primary  Bus: SDIO
            BD Address: AA:BB:CC:DD:EF:00  [  280.951856] Bluetooth: hci0: unexpected cc 0x0c14 length: 1 < 249
    ACL MTU: 255:10  SCO MTU: 0:0
            UP RUNNING
            RX bytes:640 acl:0 sco:0 events:51 errors:0
            TX bytes:528 acl:0 sco:0 commands:50 errors:0
            Features: 0x00 0x00 0x00 0x00 0x60 0x00 0x00 0x00
            Packet type: DM1 DH1 HV1
            Link policy:
            Link mode: PERIPHERAL ACCEPT
    Can't read local name on hci0: Input/output error (5)

    root@bosch:~#  rfkill list
    0: phy0: Wireless LAN
            Soft blocked: no
            Hard blocked: no
    1: hci0: Bluetooth
            Soft blocked: no
            Hard blocked: no



    root@bosch:~# btmgmt -i hci0 power off
    hci0 Set Powered complete, settings: le secure-conn
    root@bosch:~# btmgmt -i hci0 le on
    hci0 Set Low Energy complete, settings: le secure-conn
    root@bosch:~# btmgmt -i hci0 connectable on
    hci0 Set Connectable complete, settings: connectable le secure-conn
    root@bosch:~# btmgmt -i hci0 bondable off
    hci0 Set Bondable complete, settings: connectable le secure-conn
    root@bosch:~# btmgmt -i hci0 pairable off
    hci0 Set Bondable complete, settings: connectable le secure-conn
    root@bosch:~# btmgmt -i hci0 privacy off
    hci0 Set Privacy complete, settings: connectable le secure-conn
    root@bosch:~#
    root@bosch:~# btmgmt -i hci0 name cc33xxble
    root@bosch:~# btmgmt -i hci0 advertising on
    hci0 Set Advertising complete, settings: connectable le advertising secure-conn
    root@bosch:~# btmgmt -i hci0 power on
    hci0 Set Powered complete, settings: powered connectable le advertising secure-conn


    root@bosch:~# dmesg
    [  224.333617] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.333994] Bluetooth: [bt sdio] RX packet_len:10 packet_type:255 packet header hex: 0a 00 00 ff
    [  224.334179] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: ff 02 04 2a 00 00 ef ef
    [  224.334222] Bluetooth: [bt sdio] vendor packet received
    [  224.334249] Bluetooth: [bt sdio] vendor packet- ble is up
    [  224.334275] Bluetooth: [bt sdio hci] btti_hci_register_hdev
    [  224.336184] Bluetooth: [bt sdio hci] btti_hci_if_setup
    [  224.336613] Bluetooth: [bt sdio] registered to HCI
    [  224.336834] Bluetooth: [bt sdio] Hdev was created
    [  224.336891] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.338103] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc03 len=3 ble_enable=1
    [  224.339433] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 0c 00 00
    [  224.339569] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.341670] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.342050] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.342195] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 03 0c 00 00 00
    [  224.345551] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.348863] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1003 len=3 ble_enable=1
    [  224.353544] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 10 00 00
    [  224.353690] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.354429] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.354825] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.355043] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 10 00 00 00 00 00 60 00 00 00 60 45
    [  224.355251] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.355843] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1001 len=3 ble_enable=1
    [  224.361533] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 01 10 00 00
    [  224.361672] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.362467] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.365851] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.366085] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 01 10 00 0c 28 02 0c 0d 00 28 02 60 45
    [  224.366224] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.366459] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1009 len=3 ble_enable=1
    [  224.372121] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 09 10 00 00
    [  224.372207] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.373113] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.373451] Bluetooth: [bt sdio] RX packet_len:16 packet_type:4 packet header hex: 10 00 00 04
    [  224.373557] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0a 01 09 10 00 00 ef dd cc bb aa
    [  224.373645] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.373908] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1002 len=3 ble_enable=1
    [  224.374044] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 10 00 00
    [  224.374077] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.374988] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.375256] Bluetooth: [bt sdio] RX packet_len:74 packet_type:4 packet header hex: 4a 00 00 04
    [  224.375391] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 44 01 02 10 00 20 00 80 00 00 c0 00 00 00 00 e4 00 00 00 28 22 00 00 00 00 00 00 04 00 00 f7 ff ff 7f 00 00 00 30 f0 ff ff ff e3 80 1f 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [  224.375499] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.375811] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2003 len=3 ble_enable=1
    [  224.375997] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 20 00 00
    [  224.376034] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.376974] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.377305] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.377479] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 20 00 ff 59 00 08 00 00 00 00 60 45
    [  224.377603] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.377860] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2002 len=3 ble_enable=1
    [  224.378058] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 20 00 00
    [  224.378102] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.378958] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.379175] Bluetooth: [bt sdio] RX packet_len:13 packet_type:4 packet header hex: 0d 00 00 04
    [  224.379272] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 07 01 02 20 00 ff 00 0a ff 00 00
    [  224.379363] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.379527] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x201c len=3 ble_enable=1
    [  224.379643] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 1c 20 00 00
    [  224.379677] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.380536] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.380794] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.380893] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 1c 20 00 ff ff ff ff ff 03 00 00 60 45
    [  224.380980] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.381146] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc01 len=11 ble_enable=1
    [  224.381467] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 0c 08 90 e8 04 02 00 80 00 20 00
    [  224.381508] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.382727] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.382988] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.383075] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 0c 00 00 20
    [  224.383152] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.383306] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2001 len=11 ble_enable=1
    [  224.383416] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 20 08 ff 1f 0a 00 00 00 00 00 00
    [  224.383451] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.384289] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.384464] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.384549] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 20 00 00 00
    [  224.384622] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.384742] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x204b len=3 ble_enable=1
    [  224.384845] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 4b 20 00 00
    [  224.384874] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.386708] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.387017] Bluetooth: [bt sdio] RX packet_len:12 packet_type:4 packet header hex: 0c 00 00 04
    [  224.387123] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 06 01 4b 20 00 00 14
    [  224.387205] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.387344] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x200f len=3 ble_enable=1
    [  224.387466] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 0f 20 00 00
    [  224.387498] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.388360] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.388535] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.388619] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 0f 20 00 10 00
    [  224.388693] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.388813] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2010 len=3 ble_enable=1
    [  224.388917] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 10 20 00 00
    [  224.388947] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.389941] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.390191] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.390284] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 10 20 00 10 00
    [  224.390380] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.390614] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202a len=3 ble_enable=1
    [  224.396632] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2a 20 00 00
    [  224.396750] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.397625] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.405363] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.405658] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 2a 20 00 0a 00
    [  224.405790] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.412676] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2029 len=3 ble_enable=1
    [  224.417140] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 29 20 00 00
    [  224.417350] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.419663] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.419908] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.420001] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 29 20 00 0a 00
    [  224.420100] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.420279] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202e len=5 ble_enable=1
    [  224.420388] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 09 00 00 01 2e 20 02 84 03 00 00 00
    [  224.420414] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.421413] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.422226] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.422338] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 2e 20 00 0a 00
    [  224.422451] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.422626] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202f len=3 ble_enable=1
    [  224.422738] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2f 20 00 00
    [  224.422772] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.423715] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.423937] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.424038] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 2f 20 00 fb 00 90 42 fb 00 90 42 60 45
    [  224.424133] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.424285] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2023 len=3 ble_enable=1
    [  224.424395] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 23 20 00 00
    [  224.424424] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.425400] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.426475] Bluetooth: [bt sdio] RX packet_len:14 packet_type:4 packet header hex: 0e 00 00 04
    [  224.427996] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 08 01 23 20 00 1b 00 48 01 fb 00
    [  224.428209] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.428380] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x203b len=3 ble_enable=1
    [  224.428501] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 3b 20 00 00
    [  224.428528] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.429584] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.430226] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.430326] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 3b 20 00 14 00
    [  224.430451] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.430606] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc63 len=11 ble_enable=1
    [  224.431190] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 63 0c 08 00 00 80 00 00 00 00 00 00
    [  224.431240] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.431635] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.431799] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.431865] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 63 0c 00 00 00
    [  224.431943] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.432118] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2024 len=7 ble_enable=1
    [  224.432208] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0b 00 00 01 24 20 04 fb 00 90 42 00
    [  224.432234] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.433163] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.433824] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.433929] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 24 20 00 00 00
    [  224.435883] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.436150] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2031 len=6 ble_enable=1
    [  224.440442] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0a 00 00 01 31 20 03 00 07 07 00 00
    [  224.440499] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.441635] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.441933] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.441997] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 31 20 00 00 00
    [  224.442055] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.716318] Bluetooth: MGMT ver 1.22
    [  224.744182] NET: Registered PF_ALG protocol family
    [  224.795975] Bluetooth: [bt sdio hci] btti_hci_if_setup
    [  224.796194] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc03 len=3 ble_enable=1
    [  224.800561] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 0c 00 00
    [  224.800663] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.803559] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.806666] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.806926] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 03 0c 00 00 00
    [  224.807041] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.807202] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1003 len=3 ble_enable=1
    [  224.807322] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 10 00 00
    [  224.807346] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.808280] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.808535] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.808603] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 10 00 00 00 00 00 60 00 00 00 60 45
    [  224.808661] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.808785] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1001 len=3 ble_enable=1
    [  224.808868] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 01 10 00 00
    [  224.808887] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.809800] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.809986] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.810049] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 01 10 00 0c 28 02 0c 0d 00 28 02 60 45
    [  224.810101] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.810212] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1009 len=3 ble_enable=1
    [  224.816115] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 09 10 00 00
    [  224.816199] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.816914] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.817136] Bluetooth: [bt sdio] RX packet_len:16 packet_type:4 packet header hex: 10 00 00 04
    [  224.817317] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0a 01 09 10 00 00 ef dd cc bb aa
    [  224.817423] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.817569] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1002 len=3 ble_enable=1
    [  224.817696] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 10 00 00
    [  224.817717] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.818646] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.818838] Bluetooth: [bt sdio] RX packet_len:74 packet_type:4 packet header hex: 4a 00 00 04
    [  224.818913] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 44 01 02 10 00 20 00 80 00 00 c0 00 00 00 00 e4 00 00 00 28 22 00 00 00 00 00 00 04 00 00 f7 ff ff 7f 00 00 00 30 f0 ff ff ff e3 80 1f 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [  224.818985] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.819104] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2003 len=3 ble_enable=1
    [  224.824813] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 20 00 00
    [  224.824885] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.825809] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.826017] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.826074] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 20 00 ff 59 00 08 00 00 00 00 60 45
    [  224.826141] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.826273] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2002 len=3 ble_enable=1
    [  224.826572] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 20 00 00
    [  224.826609] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.827336] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.828564] Bluetooth: [bt sdio] RX packet_len:13 packet_type:4 packet header hex: 0d 00 00 04
    [  224.828655] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 07 01 02 20 00 ff 00 0a ff 00 00
    [  224.828710] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.828833] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x201c len=3 ble_enable=1
    [  224.829991] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 1c 20 00 00
    [  224.830061] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.830116] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.830245] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.830303] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 1c 20 00 ff ff ff ff ff 03 00 00 60 45
    [  224.830359] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.830565] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc01 len=11 ble_enable=1
    [  224.830682] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 0c 08 90 e8 04 02 00 80 00 20 00
    [  224.830702] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.831612] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.831826] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.831875] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 0c 00 00 20
    [  224.831933] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.832111] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2001 len=11 ble_enable=1
    [  224.832204] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 20 08 ff 1f 0a 00 00 00 00 00 00
    [  224.832224] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.833147] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.833427] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.833489] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 20 00 00 00
    [  224.833535] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.833674] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x204b len=3 ble_enable=1
    [  224.833748] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 4b 20 00 00
    [  224.833764] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.834631] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.834733] Bluetooth: [bt sdio] RX packet_len:12 packet_type:4 packet header hex: 0c 00 00 04
    [  224.834769] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 06 01 4b 20 00 00 14
    [  224.834800] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.834867] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x200f len=3 ble_enable=1
    [  224.834912] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 0f 20 00 00
    [  224.834923] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.835907] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.836015] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.836061] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 0f 20 00 10 00
    [  224.836102] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.836188] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2010 len=3 ble_enable=1
    [  224.836253] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 10 20 00 00
    [  224.836267] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.837140] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.837295] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.837358] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 10 20 00 10 00
    [  224.837399] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.837553] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202a len=3 ble_enable=1
    [  224.837640] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2a 20 00 00
    [  224.837651] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.838521] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.838638] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.838678] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 2a 20 00 0a 00
    [  224.838722] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.838810] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2029 len=3 ble_enable=1
    [  224.838854] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 29 20 00 00
    [  224.838866] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.839743] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.839825] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.839858] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 29 20 00 0a 00
    [  224.839888] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.839952] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202e len=5 ble_enable=1
    [  224.839996] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 09 00 00 01 2e 20 02 84 03 00 00 00
    [  224.840008] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.840883] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.840963] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.840998] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 2e 20 00 0a 00
    [  224.841029] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.841089] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202f len=3 ble_enable=1
    [  224.841132] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2f 20 00 00
    [  224.841142] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.842040] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.842130] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  224.842165] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 2f 20 00 fb 00 90 42 fb 00 90 42 60 45
    [  224.842200] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.842263] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2023 len=3 ble_enable=1
    [  224.842304] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 23 20 00 00
    [  224.842316] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.843191] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.843259] Bluetooth: [bt sdio] RX packet_len:14 packet_type:4 packet header hex: 0e 00 00 04
    [  224.843290] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 08 01 23 20 00 1b 00 48 01 fb 00
    [  224.843317] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.843372] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x203b len=3 ble_enable=1
    [  224.843413] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 3b 20 00 00
    [  224.843425] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.844436] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.844483] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.844512] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 3b 20 00 14 00
    [  224.844535] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.844571] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc63 len=11 ble_enable=1
    [  224.844607] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 63 0c 08 00 00 80 00 00 00 00 00 00
    [  224.844616] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.845467] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.845538] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.845573] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 63 0c 00 00 00
    [  224.845600] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.845657] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2024 len=7 ble_enable=1
    [  224.845696] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0b 00 00 01 24 20 04 fb 00 90 42 00
    [  224.845708] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.846563] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.846641] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.846675] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 24 20 00 00 00
    [  224.846710] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.846777] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2031 len=6 ble_enable=1
    [  224.846820] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0a 00 00 01 31 20 03 00 07 07 00 00
    [  224.846832] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.847681] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.847750] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.847781] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 31 20 00 00 00
    [  224.847806] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.847972] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2036 len=28 ble_enable=1
    [  224.848013] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 20 00 00 01 36 20 19 00 12 00 00 08 00 00 08 00 07 01 00 00 00 00 00 00 00 00 7f 01 00 01 00 00
    [  224.848025] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.849582] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.849656] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  224.849694] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 36 20 00 00 45
    [  224.849720] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.849780] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2005 len=9 ble_enable=1
    [  224.849822] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0d 00 00 01 05 20 06 ff ab 9a 50 87 3f 00 00 00
    [  224.849833] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.850668] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.850714] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.850744] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 05 20 00 00 45
    [  224.850767] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.850799] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2035 len=10 ble_enable=1
    [  224.850836] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0e 00 00 01 35 20 07 00 ff ab 9a 50 87 3f 00 00
    [  224.850845] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.851897] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.851971] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.852005] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 35 20 00 3f 45
    [  224.852030] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.852083] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2038 len=7 ble_enable=1
    [  224.852120] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0b 00 00 01 38 20 04 00 03 01 00 00
    [  224.852131] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.853001] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.853065] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.853095] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 38 20 00 01 00
    [  224.853121] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.853319] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2037 len=13 ble_enable=1
    [  224.853390] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 11 00 00 01 37 20 0a 00 03 01 06 02 01 04 02 0a 00 00 00 00
    [  224.853404] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  224.856418] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  224.856688] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  224.856767] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 37 20 00 ff 45
    [  224.856830] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  260.558067] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc14 len=3 ble_enable=1
    [  260.562533] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 14 0c 00 00
    [  260.562621] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  260.563587] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  260.563836] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  260.563972] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 14 0c 01 ff 45
    [  260.564084] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  260.564220] Bluetooth: hci0: unexpected cc 0x0c14 length: 1 < 249
    [  280.949924] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc14 len=3 ble_enable=1
    [  280.950299] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 14 0c 00 00
    [  280.950378] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  280.951246] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  280.951494] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  280.951627] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 14 0c 01 60 45
    [  280.951730] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  280.951856] Bluetooth: hci0: unexpected cc 0x0c14 length: 1 < 249
    [  355.586551] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2039 len=5 ble_enable=1
    [  355.591026] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 09 00 00 01 39 20 02 00 00 00 00 00
    [  355.591123] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  355.592323] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  355.592678] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  355.592824] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 39 20 00 ff 45
    [  355.592944] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  355.593278] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x203d len=3 ble_enable=1
    [  355.593581] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 3d 20 00 00
    [  355.593647] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  355.594681] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  355.594948] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  355.595108] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 3d 20 00 00 00
    [  355.595253] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.919637] Bluetooth: [bt sdio hci] btti_hci_if_setup
    [  412.919920] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc03 len=3 ble_enable=1
    [  412.924391] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 0c 00 00
    [  412.924485] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.927255] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.927569] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.927741] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 03 0c 00 00 00
    [  412.927887] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.928183] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1003 len=3 ble_enable=1
    [  412.928403] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 10 00 00
    [  412.928462] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.929610] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.929934] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  412.930103] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 10 00 00 00 00 00 60 00 00 00 60 45
    [  412.930252] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.930500] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1001 len=3 ble_enable=1
    [  412.930720] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 01 10 00 00
    [  412.930779] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.931592] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.931837] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  412.931988] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 01 10 00 0c 28 02 0c 0d 00 28 02 60 45
    [  412.932160] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.932367] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1009 len=3 ble_enable=1
    [  412.932586] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 09 10 00 00
    [  412.932641] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.933464] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.933768] Bluetooth: [bt sdio] RX packet_len:16 packet_type:4 packet header hex: 10 00 00 04
    [  412.933929] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0a 01 09 10 00 00 ef dd cc bb aa
    [  412.934065] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.934287] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x1002 len=3 ble_enable=1
    [  412.934496] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 10 00 00
    [  412.934555] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.935373] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.935609] Bluetooth: [bt sdio] RX packet_len:74 packet_type:4 packet header hex: 4a 00 00 04
    [  412.935760] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 44 01 02 10 00 20 00 80 00 00 c0 00 00 00 00 e4 00 00 00 28 22 00 00 00 00 00 00 04 00 00 f7 ff ff 7f 00 00 00 30 f0 ff ff ff e3 80 1f 00 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [  412.935899] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.936100] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2003 len=3 ble_enable=1
    [  412.936301] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 03 20 00 00
    [  412.936354] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.937171] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.937589] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  412.937756] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 03 20 00 ff 59 00 08 00 00 00 00 60 45
    [  412.937896] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.938105] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2002 len=3 ble_enable=1
    [  412.938313] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 02 20 00 00
    [  412.938372] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.939181] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.939419] Bluetooth: [bt sdio] RX packet_len:13 packet_type:4 packet header hex: 0d 00 00 04
    [  412.939568] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 07 01 02 20 00 ff 00 0a ff 00 00
    [  412.939828] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.940062] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x201c len=3 ble_enable=1
    [  412.940276] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 1c 20 00 00
    [  412.940335] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.941147] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.941640] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  412.941795] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 1c 20 00 ff ff ff ff ff 03 00 00 60 45
    [  412.941930] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.942179] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc01 len=11 ble_enable=1
    [  412.942385] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 0c 08 90 e8 04 02 00 80 00 20 00
    [  412.942440] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.943260] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.943499] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.943647] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 0c 00 00 20
    [  412.943776] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.943984] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2001 len=11 ble_enable=1
    [  412.944191] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 01 20 08 ff 1f 0a 00 00 00 00 00 00
    [  412.944247] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.945060] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.945384] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.945545] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 01 20 00 00 00
    [  412.945680] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.945916] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x204b len=3 ble_enable=1
    [  412.946125] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 4b 20 00 00
    [  412.946181] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.947008] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.947244] Bluetooth: [bt sdio] RX packet_len:12 packet_type:4 packet header hex: 0c 00 00 04
    [  412.947391] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 06 01 4b 20 00 00 14
    [  412.947520] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.947729] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x200f len=3 ble_enable=1
    [  412.947929] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 0f 20 00 00
    [  412.947985] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.948795] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.949027] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  412.949178] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 0f 20 00 10 00
    [  412.949478] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.949719] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2010 len=3 ble_enable=1
    [  412.949927] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 10 20 00 00
    [  412.949982] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.950869] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.951182] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.951333] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 10 20 00 10 00
    [  412.951463] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.951676] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202a len=3 ble_enable=1
    [  412.951878] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2a 20 00 00
    [  412.951932] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.952750] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.952984] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  412.953131] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 2a 20 00 0a 00
    [  412.953343] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.953555] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2029 len=3 ble_enable=1
    [  412.953766] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 29 20 00 00
    [  412.953822] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.954666] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.954906] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.955055] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 29 20 00 0a 00
    [  412.955184] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.955406] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202e len=5 ble_enable=1
    [  412.955610] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 09 00 00 01 2e 20 02 84 03 00 00 00
    [  412.955663] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.956482] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.956713] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.956862] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 2e 20 00 0a 00
    [  412.956988] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.957191] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x202f len=3 ble_enable=1
    [  412.957578] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 2f 20 00 00
    [  412.957637] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.958395] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.958644] Bluetooth: [bt sdio] RX packet_len:18 packet_type:4 packet header hex: 12 00 00 04
    [  412.958801] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 0c 01 2f 20 00 fb 00 90 42 fb 00 90 42 60 45
    [  412.958937] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.959192] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2023 len=3 ble_enable=1
    [  412.964977] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 23 20 00 00
    [  412.965046] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.966017] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.966298] Bluetooth: [bt sdio] RX packet_len:14 packet_type:4 packet header hex: 0e 00 00 04
    [  412.966457] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 08 01 23 20 00 1b 00 48 01 fb 00
    [  412.966594] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.966801] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x203b len=3 ble_enable=1
    [  412.967009] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 07 00 00 01 3b 20 00 00
    [  412.967065] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.968048] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.968284] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  412.968435] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 3b 20 00 14 00
    [  412.968564] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.968763] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0xc63 len=11 ble_enable=1
    [  412.968966] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0f 00 00 01 63 0c 08 00 00 80 00 00 00 00 00 00
    [  412.969021] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.969840] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.970121] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.970285] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 63 0c 00 00 00
    [  412.970416] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.970623] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2024 len=7 ble_enable=1
    [  412.970826] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0b 00 00 01 24 20 04 fb 00 90 42 00
    [  412.970882] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.971809] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.972055] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.972206] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 24 20 00 00 00
    [  412.972337] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.972537] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2031 len=6 ble_enable=1
    [  412.972740] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0a 00 00 01 31 20 03 00 07 07 00 00
    [  412.972796] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.973627] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.973912] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.974069] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 31 20 00 00 00
    [  412.974200] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.974612] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2036 len=28 ble_enable=1
    [  412.974818] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 20 00 00 01 36 20 19 00 13 00 00 08 00 00 08 00 07 00 00 00 00 00 00 00 00 00 7f 01 00 01 00 00
    [  412.974880] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.976401] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.976642] Bluetooth: [bt sdio] RX packet_len:11 packet_type:4 packet header hex: 0b 00 00 04
    [  412.976794] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 05 01 36 20 00 00 45
    [  412.976922] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.977145] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2038 len=19 ble_enable=1
    [  412.982801] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 17 00 00 01 38 20 10 00 03 01 0c 0b 09 63 63 33 33 78 78 62 6c 65 00 00
    [  412.982863] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.984458] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.984705] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.984864] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 38 20 00 00 45
    [  412.984995] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.985201] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2039 len=9 ble_enable=1
    [  412.985518] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0d 00 00 01 39 20 06 01 01 00 00 00 00 00 00 00
    [  412.985579] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.988644] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.988885] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.989042] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 39 20 00 ff 84
    [  412.989172] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.990071] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2037 len=13 ble_enable=1
    [  412.990486] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 11 00 00 01 37 20 0a 00 03 01 06 02 01 04 02 0a 00 00 00 00
    [  412.990567] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  412.992683] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  412.993389] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  412.993734] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 37 20 00 00 45
    [  412.993970] Bluetooth: [bt sdio hci] work thread is sleeping...


    root@bosch:~# bluetoothctl
    Waiting to connect to bluetoothd...[bluetooth]# [bluetooth]# Agent registered
    [bluetooth]# [bluetooth]# [CHG] Controller AA:BB:CC:DD:EF:00 Pairable: yes
    [bluetooth]# scan on
    [bluetooth]#
    [bluetooth]# [  570.636423] Bluetooth: hci0: Opcode 0x2042 failed: -22
    Failed to start discovery: org.bluez.Error.InProgress

    [bluetooth]#
    [bluetooth]# scan on
    [bluetooth]# scan on
    [bluetooth]# [  590.091858] Bluetooth: hci0: Opcode 0x2042 failed: -22
    Failed to start discovery: org.bluez.Error.InProgress

    [bluetooth]#
    [bluetooth]# scan off
    [bluetooth]# scan off
    [bluetooth]# Failed to stop discovery: org.bluez.Error.Failed

    [bluetooth]#
    [bluetooth]# menu scan
    [bluetooth]# menu scan
    [bluetooth]# Menu scan:
    Available commands:
    -------------------
    uuids [all/uuid1 uuid2 ...]                       Set/Get UUIDs filter
    rssi [rssi]                                       Set/Get RSSI filter, and clears pathloss
    pathloss [pathloss]                               Set/Get Pathloss filter, and clears RSSI
    transport [transport]                             Set/Get transport filter
    duplicate-data [on/off]                           Set/Get duplicate data filter
    discoverable [on/off]                             Set/Get discoverable filter
    pattern [value]                                   Set/Get pattern filter
    clear [uuids/rssi/pathloss/transport/duplicate-data/discoverable/pattern] Clears discovery filter.
    back                                              Return to main menu
    version                                           Display version
    quit                                              Quit program
    exit                                              Quit program
    help                                              Display help about this program
    export                                            Print environment variables

    [bluetooth]#
    [bluetooth]# exit
    [bluetooth]# exit
    [bluetooth]# root@bosch:~#
    root@bosch:~#

    root@bosch:~# dmesg
    [  570.627633] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2041 len=16 ble_enable=1
    [  570.632143] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 14 00 00 01 41 20 0d 01 00 05 01 12 00 12 00 01 12 00 12 00
    [  570.632234] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  570.633348] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  570.633697] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  570.633876] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 41 20 00 00 45
    [  570.634040] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  570.634320] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2042 len=9 ble_enable=1
    [  570.634538] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0d 00 00 01 42 20 06 01 01 00 00 00 00 00 00 00
    [  570.634599] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  570.635766] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  570.636011] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  570.636168] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 42 20 12 00 45
    [  570.636298] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  570.636423] Bluetooth: hci0: Opcode 0x2042 failed: -22
    [  590.082890] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2041 len=16 ble_enable=1
    [  590.087393] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 14 00 00 01 41 20 0d 01 00 05 01 12 00 12 00 01 12 00 12 00
    [  590.087480] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  590.088579] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  590.088877] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  590.089043] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 41 20 00 00 45
    [  590.089185] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  590.089617] Bluetooth: [bt sdio hci] TX from HCI received ,type=1, opcode: 0x2042 len=9 ble_enable=1
    [  590.089868] Bluetooth: [bt sdio] TX to SDIO sdiodev done : 0d 00 00 01 42 20 06 01 01 00 00 00 00 00 00 00
    [  590.089933] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  590.091129] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  590.091400] Bluetooth: [bt sdio] RX packet_len:10 packet_type:4 packet header hex: 0a 00 00 04
    [  590.091564] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 0e 04 01 42 20 12 00 45
    [  590.091698] Bluetooth: [bt sdio hci] work thread is sleeping...
    [  590.091858] Bluetooth: hci0: Opcode 0x2042 failed: -22

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Any update?

    Regards,

    Gireesh Hiremath

  • Hi Gireesh,

    The driver and firmware in AM62 Processor SDK 10 is outdated. I believe this issue was addressed in our newer CC33xx SDK release.

    Just as a test, would you be able to test our newest release from CC33xx SDK download page? It is built on kernel 6.1 but we do have prebuilt images available for AM62B SK P1 board plus the M.2 card. 

    https://www.ti.com/tool/download/CC33XX-LINUX-MPU 

  • Hi Sabeeh,

    Sorry for the delayed response, as sdk 10 show only wifi changes not bt and cc33xx  release compatible 6.1 kernel,

    any alternation patch to solve bt communication(scan, send, receive file) issue and below error with 6.6 kernel?

    [  81.703947] Bluetooth: [bt sdio] vendor RX hci_recv_frame failed :-6

    below one will get when I stop scanning

    [  173.501813] Bluetooth: hci0: command 0x2042 tx timeout
    [  173.501820] Bluetooth: hci0: Opcode 0x2042 failed: -110
    [  173.501871] Bluetooth: hci0: Unable to disable scanning: -110
    [  175.549805] Bluetooth: hci0: Opcode 0x2042 failed: -110
    [  175.549811] Bluetooth: hci0: command 0x2042 tx timeout
    [  175.549863] Bluetooth: hci0: Unable to disable scanning: -110
    [  175.567451] Bluetooth: hci0: stop background scanning failed: -110
    [  179.005810] Bluetooth: hci0: command 0x2042 tx timeout

    Regards,

    Gireesh

  • Hi Gireesh,

    We don't have official plan to update CC33xx SDK to kernel 6.6, so that is why we are providing patches on individual request. Let me see if I can make patch for you that will A) update CC33xx driver to latest 1.0.0.7 release and then B) enable BT. 

  • Hi Sabeeh,

    some screen shoot while connecting ble,

    ble is interface through sdio interface

    root@Bosch:~# echo 1 > /sys/kernel/debug/ieee80211/phy0/cc33xx/ble_enable

    root@Bosch:~# bluetoothctl power on
    Changing power on succeeded
    root@Bosch:~# bluetoothctl discoverable on
    Changing discoverable on succeeded
    root@Bosch:~# bluetoothctl pairable on
    Changing pairable on succeeded
    root@Bosch:~# btmgmt -i hci0 power off
    hci0 Set Powered complete, settings: connectable bondable le secure-conn
    root@Bosch:~# btmgmt -i hci0 le on
    hci0 Set Low Energy complete, settings: connectable bondable le secure-conn
    root@Bosch:~# btmgmt -i hci0 connectable on
    hci0 Set Connectable complete, settings: connectable bondable le secure-conn
    root@Bosch:~# btmgmt -i hci0 bondable off
    hci0 Set Bondable complete, settings: connectable le secure-conn
    root@Bosch:~# btmgmt -i hci0 pairable off
    hci0 Set Bondable complete, settings: connectable le secure-conn
    root@Bosch:~# btmgmt -i hci0 privacy off
    hci0 Set Privacy complete, settings: connectable le secure-conn
    root@Bosch:~# btmgmt -i hci0 name cc33xxble
    root@Bosch:~# btmgmt -i hci0 advertising on
    hci0 Set Advertising complete, settings: connectable le advertising secure-conn
    root@Bosch:~# btmgmt -i hci0 power on
    hci0 Set Powered complete, settings: powered connectable le advertising secure-conn

    please suggest not able to connect

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Any update?

    Regards,

    Gireesh Hiremath

  • Hi Gireesh,

    I will try to replicate this, are you using the patch provided on top of kernel 6.6 or CC33xx SDK that uses kernel 6.1?

  • Hi Sabeeh,

    I am using the patch provided by you for 6.6 kernel.

    and used below command

       echo 1 > /sys/kernel/debug/ieee80211/phy0/cc33xx/ble_enable
        btmgmt -i hci0 power off
        btmgmt -i hci0 le on
        btmgmt -i hci0 connectable on
        btmgmt -i hci0 bondable off
        btmgmt -i hci0 pairable off
        btmgmt -i hci0 privacy off
        btmgmt -i hci0 name cc33xxble
        btmgmt -i hci0 advertising on
        btmgmt -i hci0 power on

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Any update?

    Regards,

    Gireesh Hiremath

  • Hi Sabeeh,

    Any info?

    Regards,

    Gireesh Hiremath

  • Hi Gireesh, 

    I apologize for severe delay. I will reply back by end of this week. 

  • Hi Gireesh,

    I believe the missing command is 'hcitool -i hci0 lerlon'. Can you try to connect using these steps?

    echo 160 >> /sys/kernel/debug/bluetooth/hci0/adv_min_interval
    echo 160 >> /sys/kernel/debug/bluetooth/hci0/adv_max_interval
    
    btmgmt -i hci0 info
    
    btmgmt -i hci0 power off
    
    btmgmt -i hci0 le on
    
    btmgmt -i hci0 connectable on
    
    btmgmt -i hci0 debug-keys off
    
    btmgmt -i hci0 sc on
    
    btmgmt -i hci0 bondable on
    
    btmgmt -i hci0 pairable on
    
    btmgmt -i hci0 privacy off
    
    btmgmt -i hci0 name cc33xxble
    
    btmgmt -i hci0 advertising on
    
    btmgmt -i hci0 power on
    
    hcitool -i hci0 lerlon

  • Hi Sabeeh,

    Thanks for you are support, I am able to connect and send some data like "abcd" form nrf app

    [  374.116023] Bluetooth: [bt sdio] RX btti_sdio_irq_handler received
    [  374.116373] Bluetooth: [bt sdio] RX packet_len:17 packet_type:2 packet header hex: 11 00 00 02
    [  374.116537] Bluetooth: [bt sdio] RX packet , packet data(without header) hex: 00 2e 09 00 05 00 04 00 12 0d 00 ab cd 00 00 00
    [  374.116665] Bluetooth: [bt sdio hci] work thread is sleeping...

    is there any command to transfer some data string from device to app ?

    or command to send and receive through command line?

    sorry I am new to BT,  wanted to make sure that connect, send and receive operation.

    Regards,

    Gireesh Hiremath

  • Hi Gireesh,

    You could either create a btgatt server on the phone so that the cc33xx would connect to it, and then you could send data that way. But we do not have example for this. 

    The more complicated method would be to create a custom bluez application where you could control the full protocol of receiving and sending back data. I'm not sure if there is a specific blueZ command that would do this.