This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nrf8001 communication msp430 and UART

Hi,

I would like to connect my msp430f1611 with NRF8001 bluetooth module and send data with an SPI communication. I found an interesting guide here with the main part of the code already developed. There are many files and especially the ones of the bluetooth are somewhat complicated. I want just to know if with thisminimal port of the ACI/SPI driver for the msp430 is also "included" the communication with the UART app (nrf2.0) on the phone. In other words: using this minimal port and configuring correctly the SPI interface, once the data is sent to the bluetooth is it also "automatic" the transfer of the data over the bluetooth to the phone with the UART app?

Thanks. Claudio

  • The minimal port as mentioned in the question handles only the hardware SPI/ACI implementation and also implements the Echo test so that the ACI/SPI transport layer can be tested. It should be easy to add the code for UART over BLE from the nRF8001 SDK for Arduino, however you need to rewrite the UART parts of the code for the msp430.

    The parts that need to be re-written are the Arduino specific pieces for DigitalRead , DigitalWrite and the Serial. The Serial is used to communicate betweem the COM port of the PC and the Arduino. You also need to port over the functions in lib_aci.cpp in the Arduino version that are used to construct ACI messages.

    edit: spacing

  • Thanks.

    So if I understood well I need to change the code in the BLE files but I don't understand which the UART part of the code you are referring to. What I think is that the communication is "divided" in two parts. From the msp430 to the nrf8001 and from the nrf8001 to the phone. The two parts should be independent from each other so that the type of microcontroller that I am using should not interfere with the nrf8001 to UART APP communication. The code for the second part of the communication (bluetooth) should be already there and should be the same of the bluetooth communication when the microcontroller is replaced by the Arduino module. Ok, I may need to add this code to the example provided for the msp430 (mentioned in the question) but it's not clear to me why the code for UART bluetooth communication has to be changed and which files (part) of the code.

    Thanks. Claudio

  • Maybe I found it. Is it the lib_aci.c file? Because it seems completely rewritten compared to the lib_aci.cpp file implemented in the getting started example for the communication between arduino to the phone over the nrf8001. More specifically, in the lib_aci.c (the one included in the project for the SPI communication only) a lot of functions that are present in the lib_aci.cpp are missing.

  • Edit : Added more info in the original answer. You are correct there may be a lot of missing functions in the msp430 port for lib_aci.c , but you can port them from the Arduino lib_aci.cpp. The initial set of functions was only to verify the transport layer.

Related