Connect BMS to nrf9160DK through Bluetooth

Hi,

I am working on the project of BMS(Battery Management system) sending data to nordic board nrf9160DK through UART and then board will send that data to the Azure cloud which is successfully working fine.

Now I want to change the way it works.

I need to connect 1,2 or maybe more BMS to the 9160 DK board and 52840 DK board (which is already present in the nrf9160DK) over Bluetooth, for that I need a sample code that I can take as an initial sample code for the project.

 Please Guide me ASAP.

I am working on ncs version 1.9.1
MFW version :- mfw_nrf9160_1.3.1
  • Hello,

    For BLE FW running on the nRF91, I suggest that you look into the NCS\nrf\samples\nrf9160\lte_ble_gateway. This sample shows how to control the nRF52 from the nRF91, to use it as a BLE slave.

    Further, if you need more assistance, I suggest you try to split up your questions into either BLE or LTE. This is because our staff usually works with either BLE or LTE, so you will get faster replies if you have questions only concerning BLE or only LTE. 

    To ease the development, I may even suggest that you create your application on an nRF52840 DK first, as a standalone BLE application, and then you port it over to run from the nRF91 using the nRF52 as a BLE slave.

    Regarding the Bluetooth application, I suggest you look into the NCS\nrf\samples\bluetooth\peripheral_uart and central_uart. I don't understand what is going to be transferred over UART and what is going to be transferred over BLE, but either way this sample set (central and/or peripheral) may be a good starting point.

    Best regards,

    Edvin

  • Further, if you need more assistance, I suggest you try to split up your questions into either BLE or LTE. This is because our staff usually works with either BLE or LTE, so you will get faster replies if you have questions only concerning BLE or only LTE. 

    I am working for BLE

    To ease the development, I may even suggest that you create your application on an nRF52840 DK first, as a standalone BLE application, and then you port it over to run from the nRF91 using the nRF52 as a BLE slave.

    Okay, I also support your suggestion and will work on nrf52840Dk first 

    I don't understand what is going to be transferred over UART and what is going to be transferred over BLE,

    As I already mentioned I am working on BMS so I need to transfer the sensor data or other data like the voltage, temperature, min voltage, etc. through Bluetooth Right now it is sending through UART.

    but either way this sample set (central and/or peripheral) may be a good starting point.

    Is that support the nrf9160DK/nrf52840DK board, cause I have read the -readme- which doesn't mention that it supports the board.

  • sachinrawat said:
    Okay, I also support your suggestion and will work on nrf52840Dk first

    Agree. When you later want to run it on a 91DK, it should only be a matter of some configuration settings in the prj.conf file.

    sachinrawat said:
    As I already mentioned I am working on BMS so I need to transfer the sensor data or other data like the voltage, temperature, min voltage, etc. through Bluetooth Right now it is sending through UART.

    I understand.

    sachinrawat said:
    Is that support the nrf9160DK/nrf52840DK board, cause I have read the -readme- which doesn't mention that it supports the board.

    the peripheral_uart sample is running on the nRF52840 DK, and all other nRF52XXX DKs, and the nRF5340 DK.

    How you want to implement the BLE part is up to you. This sample will set up one service with two characteristics. One characteristic for sending data, and one for receiving.

    Whether you use something like this, to set up a "virtual UART". This way you can send all the data you need over this virtual UART.

    Another way to implement this is for example to set up one service, and then this service can hold one characteristic for voltage, one for temperature and so on. The way you set up more characteistics is more or less the same as the characteristic that is already set up.

    Best of luck!
    Edvin

  • the peripheral_uart sample is running on the nRF52840 DK, and all other nRF52XXX DKs, and the nRF5340 DK.

    No, I am talking about the board nrf9160Dk which already has the other processor nrf52 in it ...

    This board has a toggle switch for nrf91 or nrf52 ..We need to use the BLE that is available for nrf52dk in nrf91dk.

    WE DON"T WANT SEPARATE nrf52840DK 

    Whether you use something like this, to set up a "virtual UART". This way you can send all the data you need over this virtual UART.

    Can you please elaborate on the "Virtual UART"?

    Thanks for the  quick responses Slight smile

  • sachinrawat said:

    WE DON"T WANT SEPARATE nrf52840DK 

    It is not possible to use the nRF52 on the nRF91 DK as a standalone development chip. This chip is used to control too much of the HW on the DK to use it as a standalone nRF52 DK, unfortunately.

    sachinrawat said:
    Can you please elaborate on the "Virtual UART"?

    Well, as the name of the sample says, "peripheral_uart" and "central uart", the default behavior of this sample is that the two devices running peripheral_uart and central_uart will connect to eachother, and anything received on the UART on one of the devices will be sent over BLE and output on the UART on the connected device. 

    BR,

    Edvin

Related