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

Data exchange through UART

I have nRF8001-DK and Arduino Uno. ble_uart_project_template from nRF8001 SDK for Arduino (Bluetooth_low_energy_for_Arduino_0_5_0_0_RC2) was used. It was used with Master Emulator with nRFUart sample code included. By using this template I can send string from nRFUart and recieve this one in Arduino Serial Monitor. How I can add functionality to send string to nRFUart from Arduino Serial Monitor?

And I can't start with ble_uart_project_modify_setup. nRFUart can't discover nRF8001.

  • I know it. I think if i have not right connection I can't detect device and transfer data to the one derection (from the MPC to the SM) but I can do it.

    PIN3 -> RDYN PIN4 -> RESET PIN5 -> ACTIVE

    PIN10 -> REQN/SS PIN11 -> MOSI PIN12 -> MISO PIN13 -> SCK

    3.3V -> VCC_nRF GND -> GND

    On the nRF2740 board the connectors are 1 - GND 2 - VCC_nRF 3 - ACTIVE 4 - Not in use 5 - SCK 6 - MOSI 7 - MISO 8 - RDYN 9 - REQN 10- RESET

  • I am able to get it running perfectly even at 19200 baud. I am looking for the "Newline" in the string that the SM sends to the Arduino so Newline should also be on in the SM. I am also attaching the BLE library that I am using as a zip file, that works with the sketch that I attached earlier. Use the BLE library I am sending with the sketch.

    Can you also turn on debug printing in your sketch and send me the traces that you see.

    //We reset the nRF8001 here by toggling the RESET line connected to the nRF8001 //and initialize the data structures required to setup the nRF8001 lib_aci_init(&aci_state);

    //Turn debug printing on for the ACI messages lib_aci_debug_print(true);

    This will print all the ACI commands and events that are sent to the nRF8001.

    BLE_4-Sep-2013.zip

  • Nice. Thank you very much. I am happy. I was not inattentive to "\n". I choose "newline" in the bottom of SM and it works. :))))))))))

  • Where I can find information how to decipher it ? And why I recieved " Evt Cmd respone: Error. Arduino is in an while(1); loop" ?

    
    Arduino setup
     E4 :4, 81, 2, 0, 2, 
    Evt Device Started: Setup
    C7 :7, 6, 0, 0, 3, 2, 41, D7, 
    C31 :1F, 6, 10, 0, 0, 0, 0, 0, 0, 0, 4, 0, 4, 1, 1, 0, 0, 6, 0, 0, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    C31 :1F, 6, 10, 1C, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 14, 3, 90, 1, 64, 
    C31 :1F, 6, 10, 38, 2, FF, 2, 58, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    C5 :5, 6, 10, 54, 0, 0, 
    C31 :1F, 6, 20, 0, 4, 4, 2, 2, 0, 1, 28, 0, 1, 0, 18, 4, 4, 5, 5, 0, 2, 28, 3, 1, E, 3, 0, 0, 2A, 4, 14, 7, 
    C31 :1F, 6, 20, 1C, 4, 0, 3, 2A, 0, 1, 55, 41, 52, 54, 69, 63, 73, 4, 4, 5, 5, 0, 4, 28, 3, 1, 2, 5, 0, 1, 2A, 6, 
    C31 :1F, 6, 20, 38, 4, 3, 2, 0, 5, 2A, 1, 1, 0, 0, 4, 4, 5, 5, 0, 6, 28, 3, 1, 2, 7, 0, 4, 2A, 6, 4, 9, 8, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
    C31 :1F, 6, 20, 54, 0, 7, 2A, 4, 1, 6, 0, 12, 0, 0, 0, A, 0, 4, 4, 2, 2, 0, 8, 28, 0, 1, 1, 18, 4, 4, 10, 10, 
    C31 :1F, 6, 20, 70, 0, 9, 28, 0, 1, 9E, CA, DC, 24, E, E5, A9, E0, 93, F3, A3, B5, 1, 0, 40, 6E, 4, 4, 13, 13, 0, A, 28, 
    C31 :1F, 6, 20, 8C, 3, 1, 4, B, 0, 9E, CA, DC, 24, E, E5, A9, E0, 93, F3, A3, B5, 2, 0, 40, 6E, 44, 10, 14, 0, 0, B, 0, 
    C31 :1F, 6, 20, A8, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 13, 13, 0, C, 
    C31 :1F, 6, 20, C4, 28, 3, 1, 10, D, 0, 9E, CA, DC, 24, E, E5, A9, E0, 93, F3, A3, B5, 3, 0, 40, 6E, 14, 0, 14, 0, 0, D, 
    C31 :1F, 6, 20, E0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 14, 3, 2, 0, 
    C31 :1F, 6, 20, FC, E, 29, 2, 1, 0, 0, 4, 4, 2, 2, 0, F, 28, 0, 1, A, 18, 4, 4, 5, 5, 0, 10, 28, 3, 1, 2, 11, 
    C25 :19, 6, 21, 18, 0, 27, 2A, 4, 4, 9, 1, 0, 11, 2A, 27, 1, A, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
    C31 :1F, 6, 40, 0, 2A, 0, 1, 0, 80, 4, 0, 3, 0, 0, 0, 2, 2, 0, 8, 4, 0, B, 0, 0, 0, 3, 2, 0, 2, 4, 0, D, 
    C15 :F, 6, 40, 1C, 0, E, 2A, 27, 1, 0, 80, 4, 0, 11, 0, 0, 
    C19 :13, 6, 50, 0, 9E, CA, DC, 24, E, E5, A9, E0, 93, F3, A3, B5, 0, 0, 40, 6E, 
    C15 :F, 6, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    C6 :6, 6, F0, 0, 3, D3, 88, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 1, 
     E3 :3, 84, 6, 2, 
     E4 :4, 81, 3, 0, 2, 
    Evt Device Started: Standby
    C5 :5, F, B4, 0, 50, 0, 
    Advertising started
     E3 :3, 84, F, 0, 
     E15 :F, 85, 1, 2, D8, 98, CB, 7A, 63, 10, 0, 0, 0, 2C, 1, 1, 
    Evt Connected
    C1 :1, 9, 
     E17 :11, 88, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    Evt Pipe Status
     E12 :C, 84, 9, 0, 15, 0, 2, 3, 0, 0, 0, 0, 0, 
    C11 :B, D, 4, 15, 0, 2, 3, 0, 0, 0, 0, 0, 
     E3 :3, 84, D, 0, 
     E17 :11, 88, 1F, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
    Evt Pipe Status
    C1 :1, 13, 
     E3 :3, 84, 13, 0, 
     E7 :7, 89, 6, 0, 0, 0, A, 0, 
    Evt link connection interval changed
     E5 :5, 8C, 2, 34, 34, 35, 
    UART RX: 0x2 Data(Hex) : 4 4 5 
    Sending: 223
    
    C6 :6, 15, 3, 32, 32, 33, A, 
     E2 :2, 8A, 1, 
    Sending: 44455
    
    C8 :8, 15, 3, 34, 34, 34, 35, 35, A, 
     E2 :2, 8A, 1, 
    Sending: 4
    
    C4 :4, 15, 3, 34, A, 
     E2 :2, 8A, 1, 
     E3 :3, 84, 0, 82, 
    ACI Command 0
    Evt Cmd respone: Error. Arduino is in an while(1); loop
    
    
    
Related