2 Replies Latest reply on May 10, 2020 9:50 AM by LeHs_2283161

    Non standard wiced hci command will cause CYW20719 reset or hang

    LeHs_2283161

      I can successfully use customer command to communicate with CY20706 via HCI UART,

      but it is failed when I try to use the same code setting on CYW20719

      So I change customer command to wiced hci command with CYW20719 HCI UART, then it works as expected.

      But when I send the wrong wiced hci command, such as: 0x19 0x01 0x00 0x20 0x1 any wrong command, it would cause system to reset or response slowly.

      How could we avoid system resetting or hanging ?

        • 1. Re: Non standard wiced hci command will cause CYW20719 reset or hang
          SheetalJ_96

          Hi LeHs_2283161,

           

          I do not understand what do you mean by 'customer commands'?

          Also if you could elaborate more on your setup, it would be easier to diagnose the problem.

          Ideally, controller should respond with Unknown command error to wrong HCI command.

          • 2. Re: Non standard wiced hci command will cause CYW20719 reset or hang
            LeHs_2283161

            Hi SheetalJ,

             

            List my parts of code:

             

            const wiced_transport_cfg_t  transport_cfg =

            {

            WICED_TRANSPORT_UART,

            {WICED_TRANSPORT_UART_HCI_MODE, 115200/*HCI_UART_DEFAULT_BAUD*/},

            {0, 0},

            NULL,

            hci_control_proc_rx_cmd,

            NULL

            };

             

            APPLICATION_START( )

            {

            wiced_transport_init( &transport_cfg );

            wiced_set_debug_uart(WICED_ROUTE_DEBUG_TO_PUART);

            wiced_bt_stack_init( gatt_serial_management_cback, &wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );

            }

             

            static uint32_t hci_control_proc_rx_cmd( uint8_t *p_buffer, uint32_t length )

            {

                WICED_BT_TRACE( "length=%d\n", length );

                wiced_transport_free_buffer( p_buffer );

                return 0;

            }

             

            also remark

            //wiced_bt_dev_register_hci_trace(gatt_serial_hci_trace_cback);

             

            =====================================================================

            When I enter correct wiced hci command "19 AA CC 04 00 01 00 00 00" every time,

            hci_control_proc_rx_cmd will be triggered every time, and get length=8;

             

            When I try to send wrong customer command as "19 AA CC 03 00 01 00 00 00",

            hci_control_proc_rx_cmd will just be triggered after entering command at first time, and only get length = 7.

             

            List hci uart port message as below while I enter "19 AA CC 03 00 01 00 00 00"

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            04 0E 04 01 00 00 0C

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            19 AA CC 03 00 01 00 00 00

            04 0E 04 01 00 00 0C

             

            Could we process wrong wiced hci command before hci_control_proc_rx_cmd triggered?