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!

Parents
  • Hi Calin,

    I am looking at a similar project (reprogramming those chinese iBeacons for a different purpose). Can you share anything you have learned? I will start tomorrow trying to program the flash through the nRF DK using the swdio but it seems daunting. The difference between the QFAA and the QFAC is just the beginning I guess.

    Thanks in advance!

  • 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

  • Hey Johannes, I did not expect an answer that quick. Awesome. Slight smile

    I bought these: https://www.aliexpress.com/item/32885909449.html and https://www.aliexpress.com/item/32907643142.html

    At the moment I just want to test both nRF51822 and nRF52832 version of these beacons and re-program them as iBeacons, so that I can freely configure everything by myself and add a password and maybe other things later, as the firmware they came with is not secure enough.

    Unfortunately I don't have any Nordic-DK yet (except for a nRF52840 dongle). Is it really necessary for programming or could it be done with the mentioned ARM debugger?

    The programming pins are easy to find:

    Thanks in advance. Slight smile

  • Funny I had the same beacon when I was doing my research. I ended up disliking the flimsy case and the hard to push button - but I am not really using these as beacons but rather as stop watches.

    Some additional observations:

    1. if you can't get the schematics from the vendor, you can try to use a multimeter to determine the pin layout

    2. generally, don't use nrf51 for any new project, they are obsolete and no longer supported by the latest SDK's. Use nrf52 if possible. Many dirt cheap beacons use these but then later you won't be able to get the latest softdevice or use DFU for instance. The nrf52 also has better range.

    3. the nrf52 development kit is very useful and only costs ~$50. It's a very worthwhile investment

    4. many of the cheap ARM debuggers sold on Amazon are not properly licensed and will have issues later. I have one of those and don't use it anymore. The development kits come with a fully licensed debugger (license is restricted to Nordic chips only)

    Johannes

Reply
  • Funny I had the same beacon when I was doing my research. I ended up disliking the flimsy case and the hard to push button - but I am not really using these as beacons but rather as stop watches.

    Some additional observations:

    1. if you can't get the schematics from the vendor, you can try to use a multimeter to determine the pin layout

    2. generally, don't use nrf51 for any new project, they are obsolete and no longer supported by the latest SDK's. Use nrf52 if possible. Many dirt cheap beacons use these but then later you won't be able to get the latest softdevice or use DFU for instance. The nrf52 also has better range.

    3. the nrf52 development kit is very useful and only costs ~$50. It's a very worthwhile investment

    4. many of the cheap ARM debuggers sold on Amazon are not properly licensed and will have issues later. I have one of those and don't use it anymore. The development kits come with a fully licensed debugger (license is restricted to Nordic chips only)

    Johannes

Children
Related