Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flash firmware with openocd works but there is no advertisement so far #2

Closed
mowtschan opened this issue May 13, 2021 · 15 comments
Closed

Comments

@mowtschan
Copy link
Contributor

I flashed nrf51 device with the firmware apps/openhaystack-alternative/compiled/nrf51_firmware.bin (without any modifications), I used openocd and stlink adapter. Flashing process worked without any issues but there is no advertisement so far, am I missing something?

Open On-Chip Debugger
> halt
target halted due to debug-request, current mode: Handler SVCall
xPSR: 0x6100000b pc: 0x000091f4 msp: 0x20003f48
> nrf51 mass_erase
nRF51822-QFAA(build code: H0) 256kB Flash, 16kB RAM
Mass erase completed.
A reset or power cycle is required if the flash was protected before.
> program /openhaystack-firmware/apps/openhaystack-alternative/compiled/nrf51_firmware.bin
target halted due to debug-request, current mode: Thread
xPSR: 0xc1000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Adding extra erase range, 0x0001cc70 .. 0x0001cfff
** Programming Finished **
> resume
> exit
@acalatrava
Copy link
Owner

Keep in mind that the advertisement is set to 5000 msec so you may miss some of the advertisements. For iPhone I saw that the eBeacon app (https://apps.apple.com/es/app/ebeacon-ble-scanner/id730279939) works better than others. Sometimes you may need to wait 20-30 seconds to see the first advertisement though.

@mowtschan
Copy link
Contributor Author

I'm using the BlueSee app for macOS which is even better than the iPhone app

@acalatrava
Copy link
Owner

I installed BlueSee app and I don't see the device but I can see it on eBeacon on iPhone.... In fact I only see 2 devices on BlueSee while eBeacon shows me 6, including my TV... Not sure why

@mowtschan
Copy link
Contributor Author

Did you install BlueSee app on mac or on iPhone?

@mowtschan
Copy link
Contributor Author

mowtschan commented May 13, 2021

anyway with BlueSee (on mac) I can exactly see which device is mine (I can see the public key of the device) but with all other tools I cannot see it

@acalatrava
Copy link
Owner

On Mac. Ok, I forgot to uncheck the filter to show only connectable devices... After some time the device appears:
Captura de pantalla 2021-05-13 a las 12 10 40

@mowtschan
Copy link
Contributor Author

do you have original openhaystack firmware or is it your alternative firmware? is it on nf51 device?

image

@acalatrava
Copy link
Owner

This is my alternative firmware just downloaded from releases and flash it on a nRF51 device. The only difference with you is that I flash it using JLink since I don't have STLink. But this is the same file you flash and on the same device....

@acalatrava
Copy link
Owner

It took some time to appear though, like 30-40 seconds

@mowtschan
Copy link
Contributor Author

I can successfully build, flash (with stlink) and see advertising (with bluesee app) from example nrf5x-base/apps/s130-beacon:

image

but still no luck with your firmware :-/

@acalatrava
Copy link
Owner

acalatrava commented May 13, 2021 via email

@mowtschan
Copy link
Contributor Author

apps/openhaystack-alternative/main.c

image

@mowtschan
Copy link
Contributor Author

mowtschan commented May 13, 2021

it works! :-) (for my device nRF51822-QFAA)
if I change NRF_CLOCK_LFCLKSRC:

image

image

@acalatrava
Copy link
Owner

Yeah! I thought about that but I couldn’t reply earlier. That’s because your board has no external crystal so you need to use the internal one. You can change this on the board_custom file instead or create a custom board file for your board.

@acalatrava
Copy link
Owner

Forced to not use an external crystal by default 1524dea

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants