<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Wi-Fi® + Bluetooth® + 802.15.4中的主题 Re: 3Mbps baud for BT interface</title>
    <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1584935#M2529</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are still getting failures about 5% of the time, but only when we increase the baud to 3Mbps. If we comment out the code to increase the UART speed, we never have a failure. &amp;nbsp;Here is the code we are using (which is very similar to what you shared and what is in other documents).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function increase_port_speed
{
    rate=${1:-3000000}

    echo "change the speed to $rate"
    rateStr=$(printf "0x3f 0x0009 0x%x 0x%x 0x%x 0x%x" \
        $((rate &amp;amp; 255)) $((rate&amp;gt;&amp;gt;8 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;16 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;24 &amp;amp; 255)))
    hcitool -i hci0 cmd $rateStr
    sleep 1
    killall hciattach
    sleep 1
    hciattach /dev/ttymxc0 any -s $rate $rate flow nosleep
    hciconfig hci0 reset || fail "Can't bring hci0 up at rate $rate"
}

function start 
{
    echo  "Starting server.."
    # make sure the WIFI driver is loaded
    modprobe moal mod_para=nxp/wifi_mod_para.conf 
    sleep 5
    # make sure the Bluetooth is configured
    hciattach /dev/ttymxc0 -b -s 115200 any 115200 flow nosleep
    hciconfig hci0 up || fail "Can't start at 115200"
    sleep 1
    # Increase the BT baud rate
    increase_port_speed 3000000
    echo "256" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_min_interval || fail "Can't set adv_min"
    echo "1024" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_max_interval || fail "Can't set adv_max"
}&lt;/LI-CODE&gt;&lt;P&gt;Let me know if you you additional ideas on how to determine what is causing the failures.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Jan 2023 19:06:43 GMT</pubDate>
    <dc:creator>dvlogic</dc:creator>
    <dc:date>2023-01-18T19:06:43Z</dc:date>
    <item>
      <title>3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1578863#M2525</link>
      <description>&lt;DIV&gt;Hi,&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;We are using a i.MX8MN (MIMX8MN1DVPIZAA) along with an Azurewave (AW-CM358SM) WIFI/BT module (based on the NXP 88W8987). &amp;nbsp;When we increase the BT baud rate to 3Mbps, we get about a 5% failure rate to bring the HCI interface back up at the higher baud. &amp;nbsp;We never have any failures brining the HCI interface up at the default 115200 bps.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;The application engineer at Azurewave mentioned that we should configure the UART interface in DTE mode. &amp;nbsp;When I configure for DTE mode, nothing works. &amp;nbsp;We can only communicate with the BT if the UART is in the default DCE mode. &amp;nbsp;From further reading, I believe the Azurewave engineer might be correct, as I think RTS/CTS handshaking is designed for DTE mode. &amp;nbsp;In fact, when I'm configured in DCE mode, I never see the handshaking lines change state, which is maybe why the higher rate fails?&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Our design is based on the i.MX8M NANO DD3 EVK (8MNANOD3L-EVK) board. &amp;nbsp;Wired almost identical to that board. &amp;nbsp;I believe that board also configures the UART to DCE mode.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Here is how I have our DTS file configured for DTE mode:&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;    &amp;amp;uart1 { /* BT */
        pinctrl-names = "default";
        pinctrl-0 = &amp;lt;&amp;amp;pinctrl_uart1&amp;gt;;
        assigned-clocks = &amp;lt;&amp;amp;clk IMX8MN_CLK_UART1&amp;gt;;
        assigned-clock-parents = &amp;lt;&amp;amp;clk IMX8MN_SYS_PLL1_80M&amp;gt;;
        fsl,dte-mode;
        fsl,uart-has-rtscts;
        resets = &amp;lt;&amp;amp;modem_reset&amp;gt;;
        status = "okay";
    };


        pinctrl_uart1: uart1grp {
            fsl,pins = &amp;lt;
                MX8MN_IOMUXC_UART1_RXD_UART1_DTE_TX 0x140
                MX8MN_IOMUXC_UART1_TXD_UART1_DTE_RX 0x140
                MX8MN_IOMUXC_UART3_RXD_UART1_DTE_RTS_B 0x140
                MX8MN_IOMUXC_UART3_TXD_UART1_DTE_CTS_B 0x140
            &amp;gt;;
        };

    /*
        pinctrl_uart1: uart1grp {
            fsl,pins = &amp;lt;
                MX8MN_IOMUXC_UART1_RXD_UART1_DCE_RX 0x140
                MX8MN_IOMUXC_UART1_TXD_UART1_DCE_TX 0x140
                MX8MN_IOMUXC_UART3_RXD_UART1_DCE_CTS_B 0x140
                MX8MN_IOMUXC_UART3_TXD_UART1_DCE_RTS_B 0x140
            &amp;gt;;
        };
    */&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV&gt;If anyone has any insight to configuring the BT interface to to allow it reliably to operate at the 3Mbps rate, please let me know.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Thanks!&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2024 16:26:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1578863#M2525</guid>
      <dc:creator>dvlogic</dc:creator>
      <dc:date>2024-01-17T16:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: 3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1579888#M2526</link>
      <description>&lt;P&gt;Dear Customer,&lt;/P&gt;&lt;P&gt;To change the baud rate to 3 Mbps, execute the following commands:&lt;BR /&gt;# clean up any existing UART conn&lt;BR /&gt;killall hciattach&lt;BR /&gt;# assume initial rate is 115200 bps&lt;BR /&gt;hciattach ttyUSB0 any -s 115200 115200 flow dtron&lt;BR /&gt;# change baud rate to 3 Mbps&lt;BR /&gt;hcitool -i hci0 cmd 0x3F 0x0009 0xC0 0xC6 0x2D 0x00 &amp;amp;&lt;BR /&gt;killall hcitool&lt;BR /&gt;killall hciattach&lt;BR /&gt;# reconnect at 3 Mbps&lt;BR /&gt;hciattach ttyUSB0 any -s 3000000 3000000 flow dtron&lt;BR /&gt;hciconfig hci0 reset&lt;BR /&gt;sleep 1&lt;BR /&gt;hciconfig&lt;/P&gt;&lt;P&gt;We default works as DCE, please have a try with above command. It is not necessary to do any changes in DTS.&lt;/P&gt;&lt;P&gt;Kindly remind, please use 115200 bps to do hciattach firstly after insmod Bluetooth driver, then change it to 3Mbps with hciattach commands.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 08:39:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1579888#M2526</guid>
      <dc:creator>Christine_Li</dc:creator>
      <dc:date>2023-01-10T08:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: 3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1580178#M2527</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;What is the&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;dtron&lt;/FONT&gt; parameter passed into the &lt;FONT face="courier new,courier"&gt;hciattach&lt;/FONT&gt; command? &amp;nbsp;My configuration is nearly identical to what you show, but without that &lt;FONT face="courier new,courier"&gt;dtron&lt;/FONT&gt; param. &amp;nbsp;I'm also &lt;U&gt;not&lt;/U&gt; passing &lt;FONT face="courier new,courier"&gt;reset&lt;/FONT&gt; as a parameter to the &lt;FONT face="courier new,courier"&gt;hciconfig&lt;/FONT&gt;command. &amp;nbsp;I will try to add both of those and see if it makes a &amp;nbsp;difference. &amp;nbsp;Still it would be nice to know what the &lt;FONT face="courier new,courier"&gt;dtron&lt;/FONT&gt; param does since I can't find any documentation on it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jan 2023 15:22:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1580178#M2527</guid>
      <dc:creator>dvlogic</dc:creator>
      <dc:date>2023-01-10T15:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: 3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1580470#M2528</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;SPAN&gt;dvlogic,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The parameter "dtron" means DTR(Data Terminal Ready) on.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;It is not necessary to use this parameter during change baud rate to 3Mbps.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Without this parameter, should also be successful to change. Need to remind you that, please firstly set it to 115200 after loading driver, then change it to 3M bps.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We have tested it on i.mx 8MNano built-in 88W8987 chip.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Below is our test screenshot:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Christine_Li_0-1673406364472.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/206801i91A55D31F0FB062D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Christine_Li_0-1673406364472.png" alt="Christine_Li_0-1673406364472.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please have a try and let us know the result, thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;Christine.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jan 2023 03:10:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1580470#M2528</guid>
      <dc:creator>Christine_Li</dc:creator>
      <dc:date>2023-01-11T03:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: 3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1584935#M2529</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;We are still getting failures about 5% of the time, but only when we increase the baud to 3Mbps. If we comment out the code to increase the UART speed, we never have a failure. &amp;nbsp;Here is the code we are using (which is very similar to what you shared and what is in other documents).&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function increase_port_speed
{
    rate=${1:-3000000}

    echo "change the speed to $rate"
    rateStr=$(printf "0x3f 0x0009 0x%x 0x%x 0x%x 0x%x" \
        $((rate &amp;amp; 255)) $((rate&amp;gt;&amp;gt;8 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;16 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;24 &amp;amp; 255)))
    hcitool -i hci0 cmd $rateStr
    sleep 1
    killall hciattach
    sleep 1
    hciattach /dev/ttymxc0 any -s $rate $rate flow nosleep
    hciconfig hci0 reset || fail "Can't bring hci0 up at rate $rate"
}

function start 
{
    echo  "Starting server.."
    # make sure the WIFI driver is loaded
    modprobe moal mod_para=nxp/wifi_mod_para.conf 
    sleep 5
    # make sure the Bluetooth is configured
    hciattach /dev/ttymxc0 -b -s 115200 any 115200 flow nosleep
    hciconfig hci0 up || fail "Can't start at 115200"
    sleep 1
    # Increase the BT baud rate
    increase_port_speed 3000000
    echo "256" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_min_interval || fail "Can't set adv_min"
    echo "1024" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_max_interval || fail "Can't set adv_max"
}&lt;/LI-CODE&gt;&lt;P&gt;Let me know if you you additional ideas on how to determine what is causing the failures.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 19:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1584935#M2529</guid>
      <dc:creator>dvlogic</dc:creator>
      <dc:date>2023-01-18T19:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: 3Mbps baud for BT interface</title>
      <link>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1585167#M2530</link>
      <description>&lt;P&gt;HI, Dave,&lt;/P&gt;&lt;P&gt;Could you please have a try with below code and add more sleep time?&lt;/P&gt;&lt;P&gt;Like below:&lt;/P&gt;&lt;P&gt;function increase_port_speed&lt;BR /&gt;{&lt;BR /&gt;rate=${1:-3000000}&lt;/P&gt;&lt;P&gt;echo "change the speed to $rate"&lt;BR /&gt;rateStr=$(printf "0x3f 0x0009 0x%x 0x%x 0x%x 0x%x" \&lt;BR /&gt;$((rate &amp;amp; 255)) $((rate&amp;gt;&amp;gt;8 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;16 &amp;amp; 255)) $((rate&amp;gt;&amp;gt;24 &amp;amp; 255)))&lt;BR /&gt;hcitool -i hci0 cmd $rateStr&lt;BR /&gt;sleep 5&lt;BR /&gt;killall hcitool&lt;BR /&gt;sleep 5&lt;BR /&gt;killall hciattach&lt;BR /&gt;sleep 5&lt;BR /&gt;hciattach /dev/ttymxc0 any -s $rate $rate flow&lt;BR /&gt;hciconfig hci0 up || fail "Can't bring hci0 up at rate $rate"&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;function start&lt;BR /&gt;{&lt;BR /&gt;echo "Starting server.."&lt;BR /&gt;# make sure the WIFI driver is loaded&lt;BR /&gt;modprobe moal mod_para=nxp/wifi_mod_para.conf&lt;BR /&gt;sleep 5&lt;BR /&gt;# make sure the Bluetooth is configured&lt;BR /&gt;hciattach /dev/ttymxc0 any -s 115200 115200 flow&lt;BR /&gt;hciconfig hci0 up || fail "Can't start at 115200"&lt;BR /&gt;sleep 5&lt;BR /&gt;# Increase the BT baud rate&lt;BR /&gt;increase_port_speed 3000000&lt;BR /&gt;echo "256" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_min_interval || fail "Can't set adv_min"&lt;BR /&gt;echo "1024" &amp;gt; /sys/kernel/debug/bluetooth/hci0/adv_max_interval || fail "Can't set adv_max"&lt;BR /&gt;}&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if still fail, please also share me the related logs. Thanks.&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Christine.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jan 2023 03:29:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wi-Fi-Bluetooth-802-15-4/3Mbps-baud-for-BT-interface/m-p/1585167#M2530</guid>
      <dc:creator>Christine_Li</dc:creator>
      <dc:date>2023-01-19T03:29:13Z</dc:date>
    </item>
  </channel>
</rss>

