3 Replies Latest reply on Jul 8, 2020 7:17 AM by RoWo_4704901

    hello_sensor_management_callback never called in ble_hello_sensor




      I'm trying to get the most basic of BLE demos up and running with WICED on custom hardware. We're using a module that has a CYW4343W device on it.


      I want to get custom service and characteristics going, completely failed writing my own code, so thought I'd have a go with ble_hello_sensor. If I understamd this correctly, this should advertise to a phone and I should be able to connect and see its custom charcteristc and be able to write/read those characteristics. However, I cannot make any headway on this. Took me a day of battling with WICED just to get it cimpiled and running, but I'm finding that:




      Is never getting called so hello_sensor_application_init() is never getting called, which I guess is why it's not advertising, because that is where a lot of this setup seems to go on.


      What causes hello_sensor_management_callback to get called? I have imported ble_hello_sensor into my project, I have not run the project as a stand alone program and very much doubt it's possible on custom hardware. I slightly modded the ble_hello_sensor.c file as blow


      void ble_application_start( void )



          const wiced_bt_cfg_buf_pool_t *wiced_bt_cfg_buf_pools;



          wiced_bt_cfg_buf_pools = diplo_ble_config_get_config_buf_pool(); // Need to get these values form a different file

          wiced_bt_cfg_settings = diplo_ble_config_get_config_settings();


         // wiced_core_init(); //<-This is commented out as it's already been called

          WPRINT_APP_INFO( ( "Hello Sensor Start\n" ) );


          /* Register call back and configuration with stack */

          wiced_bt_stack_init( hello_sensor_management_callback , wiced_bt_cfg_settings, wiced_bt_cfg_buf_pools );




      I get these messages from the serial port/debugger we have setup.


      Hello Sensor Start

      00:00:00.035000 GKI_create_task func=0x8017191  id=1  name=BTU  stack=0x0  stackSize=4096

      00:00:00.038000 GKI_create_task func=0x80188cd  id=0  name=HCISU  stack=0x0  stackSize=3072


      Would some one confirm what I am tryingf to do with ble_hello_sensor should do what I want and can any pooint me in the direction of how to get this working, why hello_sensor_management_callback  is never getting called? I haven;t hacked the ble_hello_sensor.c code other than commenting out wiced_core_init() and adding the calls to get wiced_bt_cfg_buf_pools and wiced_bt_cfg_settings.


      Many thanks.