<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>hcitool commands on firmware level</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/126718/hcitool-commands-on-firmware-level</link><description>Dear all, 
 
 I am trying to build bluetooth hci controller for Home Assistant. 
 I used official example for create usb bluetooth hci controller here: 
 ~/ncs/v3.2.0/zephyr/samples/bluetooth/hci_usb 
 Due to the fact I want to listen to sensor which</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Jan 2026 09:01:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/126718/hcitool-commands-on-firmware-level" /><item><title>RE: hcitool commands on firmware level</title><link>https://devzone.nordicsemi.com/thread/559639?ContentTypeID=1</link><pubDate>Tue, 27 Jan 2026 09:01:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bb814e8-1f25-462c-97fb-2a1e3b1f422f</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user=""]I want to mimic the behaviour of hcitool command right on the firmware level of Zephyr and activate,what hcitool activates,directly in firmware, not on OS Linux level.[/quote]
&lt;p&gt;&lt;span&gt;Not in a compliant HCI‑controller design. The HCI USB sample exposes raw HCI (&lt;/span&gt;&lt;span&gt;CONFIG_BT_HCI_RAW=y&lt;/span&gt;&lt;span&gt;), and by definition it waits for the host to send commands. There is no host stack in the firmware to issue HCI commands on its own.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If I am not mistaken hcitool cmd 0x08 31 00 04 04&amp;nbsp;is&amp;nbsp;LE Set Default PHY . That command only sets the&amp;nbsp;default connection PHY preference. It does&amp;nbsp;not&amp;nbsp;enable coded scanning. Coded advertising discovery is controlled by&amp;nbsp;LE Set Extended Scan Parameters followed by&amp;nbsp;LE Set Extended Scan Enable , and those commands must come from the BlueZ host in your case.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;hci_usb&amp;nbsp;sample is a&amp;nbsp;controller‑only&amp;nbsp;build. By design it does not issue HCI commands to itself; it waits for the host to send them. So there isn’t a supported way to force coded scanning purely in the controller firmware without breaking HCI behavior.&lt;/p&gt;
&lt;p&gt;I think you can try to keep HCI USB, but make the host send the proper extended scan commands (0x2041/0x2042) with Coded PHY enabled. I do not have a Linux machine but I read somewhere that on standard Linux you can do this via&amp;nbsp;btmgmt/btmon&amp;nbsp;or a custom script. On Home Assistant OS, you might need an add‑on or integration that can send those HCI commands. I am also no expert in that area.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>