Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pca10028 disconnects immediately when trying to connect using ble_app_uart

Can anyone tell me if there is a specific problem on the nFR 51 using the 12.3 DK, where a disconnect is seen when it connects? I'm using Android Lolipop 5.0 on a BLU device. I see the disconnect immediately after selecting the nordic device in the selection dropdown, so it does see the device.

I have read that the 51 had problems, and it wasn't clear if the 52 also has the same problem, or if this is similar with a timeout not being set at the start?

The project I'm working on will use the 52 and I'm thinking of just buying one, but before I do I wanted to find out if this is a common problem with 51 and 52 devices? Isolated to 51? Neither, an error in the ble_app_uart example?

I'm going to get the sniffer setup tonight and see what I see, but I'm using Linux so it requires some jumping through a couple hoops to get the nRF sniffer going...:(

Any help would be appreciated. Eventually I need to get a 52 board, but was trying to use this until the firmware iscomplete, that will be based around your 52 chipset. I'm not doing that portion, I'm on the software side.

The firmware engineer is on vacation, so I'm trying to get going in the meantime. AFAIK, I have the example built and flashed properly to the pca10028 device I'm using.

I'm attempting to use the UART profile with 32 bytes of data.

Compiler:
arm-none-eabi-gcc (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]

flash:
[aland@eagle armgcc]$ pwd
/home/aland/src/nRF5_12.3.0/examples/ble_peripheral/ble_app_uart/pca10028/s130/armgcc
[aland@eagle armgcc]$ make flash
Flashing: _build/nrf51422_xxac.hex
nrfjprog --program _build/nrf51422_xxac.hex -f nrf51 --sectorerase
Parsing hex file.
Erasing page at address 0x1B000.
Erasing page at address 0x1B400.
Erasing page at address 0x1B800.
Erasing page at address 0x1BC00.
Erasing page at address 0x1C000.
Erasing page at address 0x1C400.
Erasing page at address 0x1C800.
Erasing page at address 0x1CC00.
Erasing page at address 0x1D000.
Erasing page at address 0x1D400.
Erasing page at address 0x1D800.
Erasing page at address 0x1DC00.
Erasing page at address 0x1E000.
Erasing page at address 0x1E400.
Erasing page at address 0x1E800.
Erasing page at address 0x1EC00.
Erasing page at address 0x1F000.
Erasing page at address 0x1F400.
Erasing page at address 0x1F800.
Erasing page at address 0x1FC00.
Erasing page at address 0x20000.
Erasing page at address 0x20400.
Erasing page at address 0x20800.
Applying system reset.
Checking that the area to write is not protected.
Programming device.
nrfjprog --reset -f nrf51
Applying system reset.
Run.

OS:
Ubuntu 18.04 (bionic beaver)

Alan

Parents
  • I'm not sure what happened but I replied a couple days ago and don't see it here now...hmmm...

    Anyway, Edvin, I got the 52 but see the same thing...I suspect I should try with a different version of Android, but wanted to get your thoughts?

    I'm using Lolipop 5.0.

    I'm only using nRF Logger so far, but will get the nRF Sniffer setup.


    nRF Logger Output

    --------------------------

    nRF Connect, 2018-08-09
    No name (30:90:3F:2E:2C:67)
    V 15:36:21.248 Connecting to 30:90:3F:2E:2C:67...
    D 15:36:21.249 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE) (hidden)
    V 15:36:39.933 Cancelling connection...
    D 15:36:39.933 gatt.disconnect()
    I 15:36:39.937 Disconnected
    D 15:36:39.951 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    D 15:36:39.958 gatt.refresh() (hidden)
    D 15:36:41.286 [Callback] Connection state changed with status: 0 and new state: DISCONNECTED (0)
    D 15:36:41.289 gatt.refresh() (hidden)
    D 15:37:33.377 gatt.close()
    D 15:37:33.379 wait(200)
  • Edvin,

    What I have noticed is that if I leave the 52840 running for a long time, it doesn't seem to broadcast it's bluetooth properly and if I see it in the nRF Connect, it won't connect. A power cycle will alleviate that problem and it will connect. This Android doesn't like something about the device running for a long time. I had it running for about a week, but will make sure I power cycle it frequently. The other thing is I need to think about getting a more recent Android device.

    My next goal will be to see if I can setup a heart rate with a frequency that I could get a UART packet (32 bytes)  of data from the nRF52840. Somewhere I saw an Android App that was scrolling data on the screen, maybe that was a video of ble_app_uart, I can't remember...

    Alan

  • As I said:

    Most of our examples has an advertising timeout, typically set to 180 seconds. After this, the device will go into sleep mode, but it will typically wake up on a button press. I say typically, since it is defined in the source code, so it may vary between the different examples.

     

  • Edvin,

    Sorry to drop absent on this issue, I had a death in the family and had to take care of a few things in regard to it.

    I haven't forgot about this project, and will be revisiting it soon.

    My initial goal will be to send and receive a BLE packet using the ble_app_uart example. You had recommended a place that would be good to insert code for that, I'll have to read through this thread again. Thanks for your help, sorry to drop off the radar for a bit...but I haven't forgot about this.

    Alan

  • My condolences. 

    Yes. I suggest that you initially try the unmodified ble_app_uart example on the DK, and use e.g. Termite to write something to the DK via the UART, and see that it is received when you connect to it via nRF Connect either for Desktop or the mobile app.

    Then you can try to replace the data with whatever you want to send using the ble_nus_data_send() or ble_nus_string_send() (depending on what SDK version you use).

    Best regards,

    Edvin

  • Thanks Edvin, I will do just this but need about a week at least to get some things off my plate after getting back to work. This is a personal project with a friend who is doing the hardware, and will be using the 52 chipset. This reply of yours will definitely help, I will look at those functions.

Reply Children
No Data
Related