nRF5340 ESB OTA

Hello,

I have tested the smp_svr with hci_rpmsg Bluetooth OTA feature and I have successfully uploaded the firmware which worked with the old device manager Android app. I would like to use 2 nrf5340 with ESB protocol. What would be a good starting point do I use the hci_rpmsg existing code and enable ESB and configure it as such or is it better to use bootloader UART code? I am a bit stuck as the hci_rpmsg sample code is dependent on bluetooth defines and ESB and bluetooth give an error message when both are enabled. So if you could give me some guidance on the right decision and how I should handle the problem. Thank you

I am using:
2x NRF5340 DK 
nRF Connect for desktop v4.1.2
nRF Connect SDK v2.4.0

Parents
  • Hi

    How does your config file look here? The error messages seem to be struggling to find CONFIG_BT_MAX_PAIRED which should be enabled in the configs of the Bluetooth Host controller. I think starting out with a Bluetooth sample and adding ESB features will be easier than adding the overlay-bt.conf altogether on your end. Have you made sure that the NET core has the Bluetooth controller enabled in its configs as well (should be done in the child image).

    Best regards,

    Simon

  • Hello,

    I am modifying the hci_rpmsg project that gets called from smp_svr as child image. I am trying to build only the hci_rpmsg project now for the nrf5340_cpunet core but with the included files from the github the build always fails based on missing configs. I modified the prj.conf of the hci_rpmsg project like this:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y

    CONFIG_HEAP_MEM_POOL_SIZE=8192

    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512

    CONFIG_BT=y
    CONFIG_BT_HCI=y
    CONFIG_BT_HCI_RAW=n
    #CONFIG_BT_HCI_RAW_RESERVE=1
    #CONFIG_BT_MAX_CONN=16

    CONFIG_BT_RPC_STACK=y
    #CONFIG_BT_HCI_HOST=y


    CONFIG_BT_MAX_PAIRED=2
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10

    # Enable and adjust the below value as necessary
    # CONFIG_BT_BUF_EVT_RX_COUNT=16
    # CONFIG_BT_BUF_EVT_RX_SIZE=255
    # CONFIG_BT_BUF_ACL_RX_SIZE=255
    # CONFIG_BT_BUF_ACL_TX_SIZE=251
    # CONFIG_BT_BUF_CMD_TX_SIZE=255

    Some of the old things like CONFIG_BT_HCI_RAW I had to disable as CONFIG_BT_MAX_PAIRED has dependencies on CONFIG_BT_HCI_HOST that has dependencies on !CONFIG_BT_HCI_RAW. I have added the ones that had dependencies form others. But the problem now is BT_MAX_PAIRED still isn't assignable because BT_CONN isn't set. BT_CONN cannot be user set and is dependent on CONFIG_BT and CONFIG_BT_HCI which are both set and yet the system gives me back that CONFIG_BT_CONN=n. Picture from nRF Kconfig GUI:

    I would like to use the smp_svr + hci_rpmsg as it is a good starting point on porting the transmission protocol from bluetooth to ESB and just reverse engineer the packets and how to send the binary over ESB and keep the stack that writes the packets into the bootloader. If you have any other better suggestion on how to solve this or another angle please let me know.

    Best regards,

    Domen

Reply
  • Hello,

    I am modifying the hci_rpmsg project that gets called from smp_svr as child image. I am trying to build only the hci_rpmsg project now for the nrf5340_cpunet core but with the included files from the github the build always fails based on missing configs. I modified the prj.conf of the hci_rpmsg project like this:

    CONFIG_IPC_SERVICE=y
    CONFIG_MBOX=y

    CONFIG_HEAP_MEM_POOL_SIZE=8192

    CONFIG_MAIN_STACK_SIZE=512
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512

    CONFIG_BT=y
    CONFIG_BT_HCI=y
    CONFIG_BT_HCI_RAW=n
    #CONFIG_BT_HCI_RAW_RESERVE=1
    #CONFIG_BT_MAX_CONN=16

    CONFIG_BT_RPC_STACK=y
    #CONFIG_BT_HCI_HOST=y


    CONFIG_BT_MAX_PAIRED=2
    # Workaround: Unable to allocate command buffer when using K_NO_WAIT since
    # Host number of completed commands does not follow normal flow control.
    CONFIG_BT_BUF_CMD_TX_COUNT=10

    # Enable and adjust the below value as necessary
    # CONFIG_BT_BUF_EVT_RX_COUNT=16
    # CONFIG_BT_BUF_EVT_RX_SIZE=255
    # CONFIG_BT_BUF_ACL_RX_SIZE=255
    # CONFIG_BT_BUF_ACL_TX_SIZE=251
    # CONFIG_BT_BUF_CMD_TX_SIZE=255

    Some of the old things like CONFIG_BT_HCI_RAW I had to disable as CONFIG_BT_MAX_PAIRED has dependencies on CONFIG_BT_HCI_HOST that has dependencies on !CONFIG_BT_HCI_RAW. I have added the ones that had dependencies form others. But the problem now is BT_MAX_PAIRED still isn't assignable because BT_CONN isn't set. BT_CONN cannot be user set and is dependent on CONFIG_BT and CONFIG_BT_HCI which are both set and yet the system gives me back that CONFIG_BT_CONN=n. Picture from nRF Kconfig GUI:

    I would like to use the smp_svr + hci_rpmsg as it is a good starting point on porting the transmission protocol from bluetooth to ESB and just reverse engineer the packets and how to send the binary over ESB and keep the stack that writes the packets into the bootloader. If you have any other better suggestion on how to solve this or another angle please let me know.

    Best regards,

    Domen

Children
No Data
Related