PlatformIO Community

Mbed ble examples on NRF52


#1

Hi,
How can i import this examples to Platformio ?

Will they run on NRF52 ?

I had tested but they didnt run!

Thanks!


#2

Could you share your project which does not work?


#3

Hi,
Here the code


It´s compile and i can transfer to NINA B112.
I can see only the GPIO1 blinking…but…BLE SCANNER can´t see the BLE module!
Thanks!


#4

Could you add mbed_app.json to the root of https://github.com/tcpipchip/led_ble_mbed_platformio?

See also mbed OS Configuraiton docs.


#5

Ivan
see my steps

*i opened your Platformio NRF52 thermometer example

#include <mbed_events.h>
#include <rtos.h>
#include “mbed.h”
#include “ble/BLE.h”
#include “LEDService.h”
#include “pretty_printer.h”

Then i compiled with platfomio, my leds (gpio01) blinks, but i can´t see the device on BLE SCANNER

No json on platformio, only on


#6

@valeros could you help here?


#7

Thank you so much! If all works i will do the BLOG about, using Platafomio with MBED BLE


#8

Hi @Miguel_Alexandre_Wis! Indeed, this example has some issues. Could you try the following configuration (change board field to your board name):

[platformio]
home_dir = C:\\.platformio

[env:nrf52_dk]
platform = https://github.com/platformio/platform-nordicnrf52.git
framework = mbed
board = nrf52_dk
build_flags = -DPIO_FRAMEWORK_MBED_RTOS_PRESENT

Don’t forget to copy source files LEDService.h, main.cpp, pretty_printer.h from the repository to the src folder in your project and copy mbed_app.json to the root folder of your project (near platformio.ini file).


#9

Hi,

Thanks to help all!

Still the led blinks but i can’t see the device on BLE SCANNER

here the GIT updated


#10

btw, if you compile online on MBED, works!


#11

Hi,

If i put
board = nrf52_dk works, i see the module on BLE SCANNER
If i put
board = ublox_evk_nina_b1 NOT works, i cant see the module on BLE SCANNER and the code size is about a few k bytes

I think that this can help to solve!


#12

Hi friends,

Any news ?


#13

Probably the example doesn’t work with ublox_evk_nina_b1 because this board it’s not specified in the mbed_app.json. You can try the next configuration in your mbed_app.json:

{
    "target_overrides": {
        "*": {
            "target.features_add": ["BLE"],
            "target.features_remove": ["LWIP", "COMMON_PAL", "IPV4", "NANOSTACK_FULL"],
            "target.extra_labels_add": ["CORDIO", "CORDIO_LL", "SOFTDEVICE_NONE", "NORDIC_CORDIO"],
            "target.extra_labels_remove": ["SOFTDEVICE_COMMON", "SOFTDEVICE_S132_FULL", "NORDIC_SOFTDEVICE"]
        }
    }
} 

#14

Hi,
Thanks to help
Still not works! No BLE scanned…


#15

That’s strange. Could you please try to build and upload your example using mbed-cli tool? Does it work?


#16

Yes, i will do, VALEROS

I did a lot of tests, i remember that using mbed-cli tools doesnt work, but works very nice on MBED ONLINE COMPILER.

I will try tomorrow!

THANKS!!!


#17

mbed-cli compiles, but BLE SCANNER didnt find it

I compiled (mbed-cli) the LED APPLICATION example to U-BLOX NINA B112 and execute it, but the BLE SCANNER didnt find it. But sends data to serial and blink led

mbed compile -t GCC_ARM -m UBLOX_EVK_NINA_B1

then i burned the BLE_LED.hex

I remember that this example had worked in the past!

image

Same with the mbed-compiler online version…

image

Fails too!

I tested on u-blox evb and module stand alone

Can you verify ?

Thanks


#18

One tip,

I did find some hex files created with mbed-cli weeks ago (wich includes the BLE LED example) and they works very fine after i burn on NINA B112.

Is it a MBED-OS update problem to NINA B112 ?


#19

I think the best way to solve the problem is try to find the last working framework version using mbed-cli or the online tool and then try this version with PlatformIO.