Issue of the testing after merged the ESB PTX code to the Bluetooth®︎ mesh light fixture sample

Dear support Team

I would like to implement the ESB and the Bluetooth Mesh dual mode, and I ported the ESB PTX code from https://github.com/too1/ncs-esb-ble-mpsl-demo to the BluetoothRegistered mesh light fixture sample, but it print the error log like the picture below. Could you please teach me how to use this ESB PTX code to send data ? Many thanks.

The BluetoothRegistered Mesh Light Fixture sample is in the location like the picture below.

  • Hi 

    Are you using the LED to track how much if the time you are in a timeslot, as set up in my example? 

    If yes, approximately how big percentage of the time are you in a timeslot?

    Mesh is very radio heavy, and I am not sure how much time you will be able to get to run other protocols if you run mesh on the side. I have only tested the example with standard Bluetooth advertising and connections, not when running mesh. 

    Best regards
    Torbjørn

  • Hi Torbjørn

    Torbjørn: Are you using the LED to track how much if the time you are in a timeslot, as set up in my example? 

    But the LED resource have been all used on the nRF52DK by the mesh light fixture sample, is there second way to track how much the time in a timeslot? After I read the readme file, I still could confirm which API is used to get the timeslot.

    Torbjørn: If yes, approximately how big percentage of the time are you in a timeslot?

    Could the percentage of the time in a timeslot be adjust? If yes, how to adjust percentage of the time in a time slot? 

    Torbjørn: Mesh is very radio heavy, and I am not sure how much time you will be able to get to run other protocols if you run mesh on the side. I have only tested the example with standard Bluetooth advertising and connections, not when running mesh. 

    Could you please guide me to test how much time it can get to run ESB PTX? I just need to send small amount of data in the timeslot. And how to successfully send data by ESB?

    Many thanks。

    Best regards

  • Hi

    Tom.Fu said:
    But the LED resource have been all used on the nRF52DK by the mesh light fixture sample, is there second way to track how much the time in a timeslot?

    I don't usually support mesh, but have you checked if all 4 LED's are really needed to run the example? 

    I assume most of the LED's will only be set in specific situations, like when a particular message is received over the mesh. 

    In other words it should be possible to find a LED that is usually static, and set it up temporarily to show the timeslot status. 

    Alternatively you can enable a completely different pin on the DK that you connect to the scope, and use that to show timeslot status. 

    Tom.Fu said:
    Could the percentage of the time in a timeslot be adjust? If yes, how to adjust percentage of the time in a time slot? 

    My example will try to request timeslots as often as possible. The amount of time you actually get depends on how much Bluetooth activity there is, since the Bluetooth stack will get priority. 

    I would recommend pulling the latest version of my repository. It is update to use the extension feature of the timeslot API to request dynamically sized timeslots that get extended when possible. 

    Tom.Fu said:
    Could you please guide me to test how much time it can get to run ESB PTX? I just need to send small amount of data in the timeslot. And how to successfully send data by ESB?

    As mentioned, please try to find a LED that is usually static and use that to show the timeslot status, as done in my example here.

    If app_esb_send(..) never works it implies that you don't get any timeslots at all. 

    Best regards
    Torbjørn 

  • Hi Torbjørn

    Is the variable  elapsed_time in the picture below the timeslot?

    And it could run to the breakpoints under the event  APP_TS_STARTED and the  event  APP_TS_STOPPED when it always print the log of "ESB TX upload failed (err -12)" like the picture below.

    All in all, the LOG_INF("elapsed time: %u milliseconds\n", elapsed_time) is called many times, why it just printed twice the log of the elapsed time like the picture below.

    And the ESB could send the data successfully 8 times at the beginning, why it always fail to send ESB data after the eighth packet? 

    The attachment is my application code, and I use the v2.4.0 NCS. Could you please guide me how to do in the next step. Many thanks.

    light_ctrl.7z

    Best Regards!

  • Hi 

    Thanks for sharing your code and the log output. Looking at the log it seems to me that the only timeslots you get happen before the mesh stack is properly initialized. Once the mesh is running fully you will no longer get any timeslots, which makes sense since the mesh stack by default will use the radio all the time. 

    Could you try to add a 10 second delay before the call to bt_mesh_init(..) on line 86 of main.c, and see if you are able to get any packets through before the mesh stack is started? 

    The reason you are able to upload 8 packets successfully is that the TX payload message queue in app_esb.c is 8 items in size. Once the message queue is full you start to receive errors. 

    Best regards
    Torbjørn

Related