Programming a Minew Tech iBeacon Bluetooth module - Nordic nRF51822
Introduction
The Minew Tech i4 Pilot iBeacon is a very low cost Bluetooth module based on the popular Nordic nRF51822 SoC which is already supported by the mbed Compiler. The board includes a 1000mAH coin-cell battery (CR2477) making it suitable for applications where is desirable to not replace the battery for at least a couple of years.
The module can be bought on Alibaba
Connections
Programming the MiniBeacon board might be a bit tricky because the module does not include a dedicated CMSIS-DAP interface, as opposite to the classic mbed boards. However, the board populates the SWD (Serial Wire Debug) pins, therefore it is possible to use an external programmer, for example the nRF51-DK that includes the J-Link interface and make the required connections.
Looking at the schematics of the nRF51-DK board, it is clear which pins should be used:
Programming
Writing programs for the MiniBeacon is easy. Make sure that you choose the correct platform, for example nRF51822-mKIT. Then compile your code and download the binary to the J-Link interface. The following code snippet shows how to access to the LEDs populated on the board.
#include "mbed.h"
//miniBeacon board
DigitalOut myled3(P0_12);
DigitalOut myled2(P0_15);
DigitalOut myled1(P0_16);
int main() {
while(1) {
myled3 = 1;
myled2 = 1;
myled1 = 1;
wait(0.05);
myled3 = 0;
myled2 = 0;
myled1 = 0;
wait(1.95);
}
}
9 comments on Programming a Minew Tech iBeacon Bluetooth module - Nordic nRF51822:
Does this iBeacon have pins routed so I could connect to a sensor via I2C or SPI? Maybe if I desolder the LEDs - could those pins be used for I2C?
Thanx it works.
Few things that has to be mentioned for this to work are that the DK-board is equipped with the latest nrf51422 so if you are using a custom module equipped with nrf51822 make sure you select one of the boards that are nrf51822 compatible like the nRF51822-mKIT or the Seeed Tiny BLE in your compiler. Use nRfgo to program you module.
Soft-D are included within the exported .hex file.
good luck.
regards
Basit
iderrington
#
28 Sep 2015
Hello,
Is there a schematic available for the Minew Tech module?
Regards
Iain
is there any schematic for making a custom mbed ble board?
Thankyou for you tutorial, it's very much appreciated :)
I've attempted the same with an i1 and an i7 device, but no joy. I started with a simple app, press button and LED comes on release button and LED goes off. It works fine on the nRF51 DK with p17 for Butont1 and p21 for LED1. I then change the code for the i1/7 devices p15 for LED and p18 for the Button.
I connect the device as per the schematics from Minew (they have been very helpful) and attempted to program the device. It does something to the device as the default behaviour no longer works but nor is the desired behavior happening.
On the jlink device on finder (I'm on a Mac) there is a FAIL.TXT file that contains "Error during flash operation" so something has gone wrong :(
I'm using the onLine mBED IDE to compile a hex file that I then save to the jlink device (nRF51 DK) connected to the Mac which in turn is wired to the device(i1/7) similar to how you have connected yous. As I say when I don't have the Minew device connected I can program the nRF51 DK fine, but if I attach the Minew device the same way you have it seems to attempt to program it but fails. I'm wondering if this is to do with Soft-D (not entirely sure what that is), I shall research now, but I get the feeling that it's required when programing an external device, but is automatically available when on the nRF51 DK. If that's the case then I believe that I will then need to use my Windows VM and install nRFgo to load the hex file using that tool - this seems to be mentioned in the comments on this page so that's something else I'm about to research.
Any pointers and advice you are able to provide would be much appreciated.
Hello,
I am trying to program my ibeacon using my development board, the links are exactly as described here, but I am not succeeding.
I can write to the development board without problem, but when I add the ibeacon externally it does not recognize.
Would it be necessary to interrupt some chip path that is on the development board? How do I select which one to receive the programmed?
Thank you.
Kleber
Hello,
I am trying to program my ibeacon using my development board, the links are exactly as described here, but I am not succeeding.
I can write to the development board without problem, but when I add the ibeacon externally it does not recognize.
Would it be necessary to interrupt some chip path that is on the development board? How do I select which one to receive the programmed?
Thank you.
check here
https://os.mbed.com/questions/54269/Problems-Programming-a-Minew-Tech-iBeaco/
/Baz
Hi,
Had anyone successfully programmed minewtech beacons using nrf DK? I have been trying very hard but no luck.
Please log in to post comments.
Does this iBeacon have pins routed so I could connect to a sensor via I2C or SPI? Maybe if I desolder the LEDs - could those pins be used for I2C?