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

  • Hello Alan.

    If there is no pca10040 folder then you must have deleted it. It is included in the SDK. But if you have the nRF52840 DK, then it shouldn't be a problem.

    If you want to test whether your DK is working, just erase everything on it, using either nrfjprog or nRFgo Studio. Then try to flash the file found in:

    SDK15.0.0\examples\ble_peripheral\ble_app_hrs\hex\ble_app_hrs_pca10056_s140.hex

    Only this one, no softdevice. The softdevice is also included in this .hex-file.

     

    Do you then see that LED1 starts blinking`and do you see the device in nRF Connect?

     

    BR,

    Edvin

  • Edvin,

    I did not delete anything. I am using the command line on linux and I thinik I would know if I used the rm -f command...:-/

    I just flashed again, I see 4 LED lights blinking in progression. This appears to erase the sectors on the device. Am I required to erase that separately? See nrfjprog command when it programs, it passes in --sectorerase. Wouldn't that ensure the device is clean? I have nrfjprog in my environment.

    The LEDs were blinking property when I flashed the device.

    Flash:

    [aland@eagle armgcc]$ pwd
    /home/aland/src/nRF5-15/examples/connectivity/ble_connectivity/pca10056/ser_s140_uart/armgcc
    [aland@eagle armgcc]$ make flash
    Flashing: _build/nrf52840_xxaa.hex
    nrfjprog -f nrf52 --program _build/nrf52840_xxaa.hex --sectorerase
    Parsing hex file.
    Erasing page at address 0x26000.
    Erasing page at address 0x27000.
    Erasing page at address 0x28000.
    Erasing page at address 0x29000.
    Erasing page at address 0x2A000.
    Erasing page at address 0x2B000.
    Erasing page at address 0x2C000.
    Erasing page at address 0x2D000.
    Erasing page at address 0x2E000.
    Erasing page at address 0x2F000.
    Erasing page at address 0x30000.
    Erasing page at address 0x31000.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    nrfjprog -f nrf52 --reset
    Applying system reset.
    Run.
    [aland@eagle armgcc]$

    Why don't I see the device in the nRF Blinky app? I installed that from the Google Play.

    Why do I see both the iPhone and BLU phone, but not the nRF52840??? I get the "CAN'T SEE YOUR BLINKY?" dialog.

    EDIT: I erased the device with nrfjprog -e and then it seemed dead, so I went into the following directory:

    /home/aland/src/nRF5-15/examples/peripheral/blinky/pca10056/blank

    This got the LEDs to blink, then I once again flashed the ble_app_uart:

    /home/aland/src/nRF5-15/examples/ble_peripheral/ble_app_uart/pca10056/s140/armgcc

    I saw the LEDs go out and then after it reset they started again, so it seemed it flashed.

    Why don't I see the device in any of the nRF apps? There must be something wrong on the board??? It doesn't seem to be broadcasting it's bluetooth...

    I need to get some sleep, will check back after I wake up.

    Alan

  • Did you try the .hex file that I told you to test? 

    The reason that the file that you are trying to flash doesn't work is because it is a serialization application. It is not what you are looking for.

  • Edvin,

    [aland@eagle hex]$ pwd
    /home/aland/src/nRF5-15/examples/ble_peripheral/ble_app_hrs/hex
    [aland@eagle hex]$ nrfjprog -f nrf52 --program ./ble_app_hrs_pca10056_s140.hex --sectorerase
    Parsing hex file.
    Erasing page at address 0x0.
    Erasing page at address 0x1000.
    Erasing page at address 0x2000.
    Erasing page at address 0x3000.
    Erasing page at address 0x4000.
    Erasing page at address 0x5000.
    Erasing page at address 0x6000.
    Erasing page at address 0x7000.
    Erasing page at address 0x8000.
    Erasing page at address 0x9000.
    Erasing page at address 0xA000.
    Erasing page at address 0xB000.
    Erasing page at address 0xC000.
    Erasing page at address 0xD000.
    Erasing page at address 0xE000.
    Erasing page at address 0xF000.
    Erasing page at address 0x10000.
    Erasing page at address 0x11000.
    Erasing page at address 0x12000.
    Erasing page at address 0x13000.
    Erasing page at address 0x14000.
    Erasing page at address 0x15000.
    Erasing page at address 0x16000.
    Erasing page at address 0x17000.
    Erasing page at address 0x18000.
    Erasing page at address 0x19000.
    Erasing page at address 0x1A000.
    Erasing page at address 0x1B000.
    Erasing page at address 0x1C000.
    Erasing page at address 0x1D000.
    Erasing page at address 0x1E000.
    Erasing page at address 0x1F000.
    Erasing page at address 0x20000.
    Erasing page at address 0x21000.
    Erasing page at address 0x22000.
    Erasing page at address 0x23000.
    Erasing page at address 0x24000.
    Erasing page at address 0x25000.
    Erasing page at address 0x26000.
    Erasing page at address 0x27000.
    Erasing page at address 0x28000.
    Erasing page at address 0x29000.
    Erasing page at address 0x2A000.
    Erasing page at address 0x2B000.
    Erasing page at address 0x2C000.
    Erasing page at address 0x2D000.
    Erasing page at address 0x2E000.
    Erasing page at address 0x2F000.
    Erasing page at address 0x30000.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    [aland@eagle hex]$

    Still I get nothing in any of the nRF Apps...nRF Connect nRF...Blinky nRF Logger

    Why don't I see my bluetooth?

    After I flashed the above I have only one LED, to the bottom left of the PCA10056 chip, none of the other 4 LEDs light up, but still I see no bluetooth on my Android BLU device. hmmm...???

    EDIT: I think that flash is working correctly in that Button 1 turns the single flashing LED off, and pressing it again will turn the single flashing LED back on. By default it gets power from VDD. I also tried the USB and plugged another cable into the micro USB for the nRF.

    There are 2 sets of VDD nRF pins on the header next to the nRF Power Source switch. Do those have any effect? I will try to look up the reference, I didn't get much with my DK, I know you have the info online. I want to look at what Li-Pro is for the Power Source. This was on VDD by default. The VDD is typically the Video Display Device, AFAIK I'm not sure how that relates to the power source but guess that comes from the ARM Cortex.

    Also there's a covered switch next to the power switch that says VEXT->nRF. I'm curious what this switch does, but probably nothing I need.

    Still the $64k question, err...that would be 64,000 Euros to you, why don't I see the bluetooth device, but see both my iPhone and BLU phone? My BLU phone sees itself and 2 Apple device. Nothing else. Something is fundamentally wrong.

    Alan

  • Edvin,

    I should add that I tried to get the sniffer setup. Unfortunately I'm using Ubuntu 18.04 and the document here was written for 14.04. I run into a problem compiling the wireshark tarball I downloaded along with the plugin. Eventually it tells me that I get an error because the code is not compiled for PIC. I've seen this on my last job and resorted to recompiling all of QT with PIC to resolve it. I would hate to have to do that here because this 52840 is only being used to prototype this project, my colleague will be using the nRF 52 in the device.

    This will not be an easy resolve on 18.04, which I have on my desktop and laptop at the moment. I could probably install 14.04 if all this could compile and work with the sniffer. Please let me know if this is the case, as far as Nordic knows?

    Has anyone else seen the issue on PIC code, where the default QT libs are using PIE?

    The other piece that seems to be tripping me up, and this could be why is that by default 18.04 uses qt5, yet it seems the wireshark needs qt4. I tried to set that as the default on my system, but compiling wireshark is still trying to use qt5 when it is configured for qt4. This might related to PIC/PIE, not sure. I just know that the system QT libs do not have PIC on them and it's needed for most embedded devices.

    Alan

Related