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

finding pin assignment for unknown beacon.

Hi,

I bought an nrf51822 beacon from ebay, it has an LED and a button. I am trying to figure out what pins the LED and the button are connected to, without much success. For a start, I was hoping the code below would blink the led, but it doesn't. The beacon works fine, I can run other code on it, and the LED did work with the original firmware. Any other ideas?

for (int pin_number = 1; pin_number <= 31; pin_number++) {
	nrf_gpio_cfg_output(pin_number);    //config pin as output
}

while (true) {
	for (int pin_number = 1; pin_number <= 31; pin_number++) {
		nrf_gpio_pin_toggle(pin_number);
		nrf_delay_ms(500);
	}
}

Thanks!

  • Hi Johannes,

    Here are the schematics:

    https://drive.google.com/drive/folders/1nbTQ9UkFYFB1UESDMIMpEI_YteWTDJCu?usp=sharing

    The company is very helpful and communicative (Radioland)

    I used one of these for programming:

    https://www.ebay.com/itm/J-Link-OB-ARM-Debugger-Programmer-Downloader-replace-v8-SWD-M74-New-/331807270184?hash=item4d41412528

    had to solder wires, but I should probably make a flashing device to program bulk, something that clamps on the contact points.

    I was using the gcc toolchain, I had to create a *.h file for this board, but I'm not sure I got all the values right. If I can find it, I'll post it (haven't had time for this for a while). Did not have any problems with the hardware. The lack of memory is a bit limiting because I did not have space for some of the software I wanted to flash on them. I wanted to create a mesh application, but some software did not compile small enough, some other did not run low power enough.

    I haven't tried the original firmware and phone app, not sure what it does.

    Good luck, let me know how it goes.

    C.

  • Oh awesome!. Did you ever try to program it using the nrf5x DK board? Supposedly that's possible. You don't have the .h file by any chance?

  • the .h file will likely not match your sdk version, just take the "custom" board setup and modify it.

    I don't use the nrf5 DK boards, but I imagine the programmer is connected to the onboard 51822 with some jumpers that you can disconnect and you can hook up this board instead.

  • Hey Johannes,

    I was very happy to find this thread and someone who tinkered with these chinese iBeacons, too. (I have one with a nRF51822 and one with a nRF5282 chip, both QFAA)

    I am in the very same situation you were, as I want to reprogram them and am on the hunt for information on best practices and tools to do this. Your post is 2 years old now, so I guess you have finished your project?

    My current plan is to connect them with the OB-ARM Debugger and start with a ble_advertising sample from the nordic sdk for nRF51xx via Segger Embedded Studio.

    So my question is exactly the same right now to get me started: Can you share anything you have learned? Slight smile

    kind regards

    jaquoh

  • Hi Jaquoh,

    a project like that is never finished :-) but yes I got pretty far. The main issue for me was to find a beacon that met the mechanical requirements - I needed a push button that goes on a lanyard - and I finally settled for this particular one: https://www.alibaba.com/product-detail/CR2032-battery-broadcasting-sensor-ibeacon-with_60801253300.html

    The first job is to find the programming pins - ususlly these chinese vendors are quite helpful. I ended up soldering jumper pins to the pads on the PCB so that it was easier to connect them to the Nordic DK - these are able to program and debug external devices. see https://devzone.nordicsemi.com/f/nordic-q-a/14058/external-programming-using-nrf52-dk

    Once you have successfully connected the device you can start with one of the SDK examples and go from there.

    Currently I have the vendor make batches of 100 for me, I just email them the firmware and they program it for me at the factory.

    Johannes

1 2 3 4 5