Easily programmable nrf5


  • Plugin Developer

    And how about this one? It uses the newer nRF52840 chip.

    https://www.aliexpress.com/item/Nordic-nRF52840-BLE-dongle-bluetooth-4-0-bluetooth-5-0-for-computer/32950640108.html

    My main concern is that it should be programmable by simply plugging it in. I want to make it as painless as possible for the end user.


  • Hardware Contributor

    you can copy compiled fw directly to usb. But from arduino, I think it's swd/jlink only, if i remember.
    with this dongle, I don't think you'll get a huge range, less range as regular 20db PA boosted nrf24, it might be directive too (orientation may matter).
    Cool for dev and experiments, but for production? depends how such tiny thing and antenna is plugged and hidden.. I would prefer a lot an external antenna.


  • Plugin Developer

    @scalz Thanks.

    How would I generate this firmware file? Can this be done using, for example, the Arduino CLI? Can I turn an .ino file into a firmware with a few commands? And then I suspect I should move that file onto the disk that the USB key emulates?

    Is there any reason this could not be scripted? I already use the Arduino CLI to let users upload code to their attached Arduino's via a web interface.

    In the end I'd like this to happen:

    • User opens web interface
    • User selects "Turn USB stick into gateway"
    • User is prompted to enter Simple Security password.
    • User is prompted to insert the USB stick.
    • User clicks "ok".
    • Done.

  • Hardware Contributor

    you can get compiled fw from arduino, then upload it if a dedicatedf usb/dfu bootloader is there.
    But, you still need a jlink when mcu is blank, bootloader issue, to erase it, or when you want to update bootloader for new feature.
    Whereas for an avr8 you would need avrspi, for nrf5, samd and lot of ARM mcus (if not all) you need an swd programmer. I think it's been mentioned multiple times on forum. Better source some hw and try, to better get processes.

    Still I think it's good habit to have minimal tools, and know how to upload to the regular way mcu, else when it fails you're stuck without tool (eg. I already saw issue with a samd usb bootloader and it needed reprog the bootloader because no more usb boot..). I'm not saying your customers should become tech guys, but there is a minimum to learn, especially so many points in diy HA to pay attention.
    Same to you, if no more boot, then how would you know if it's hw or bootloader, without being able to restore bootloader?
    This also applies to avr8, like arduino nano/mini.., how do you upload Mysbootloader/dualoptiboot for FOTA, or update the crappy bootloader and its wdt from cheap clones??).


  • Plugin Developer

    @scalz Ah too bad.

    The BBC Micro:bit allowed me to program it straight away, without needing to flash a boot loader. It presents itself as a flash drive. Kids can then just copy .hex files into that flash drive. It's really easy to use. I was hoping that the NRF52840 chips had a similar capability, since they are advertised as having built in USB support.


  • Hardware Contributor

    @alowhum
    you're confusing things a bit.
    to do this, microbit board use an additional mcu with a special fw. Which means,

    • option 1) the 2nd mcu includes jlink reprogramming tool and targets nrf swd pins, in that case, no bootloader needed in the nrf
    • option 2) the 2nd mcu reprograms the nrf by serial, then there is a bootloader in both mcus.

    but the two ic, when blank, doesn't know how to do usb, usb-cdc, serial etc, even if one has builtin support, it needs a first programming tool. they only know special reprogramming protocols..nothing new, like I said above, all mcus work the same, so read&experiment to better get the picture 😉 and it can be useful to know, in case you want to teach your customers/users, or they ask you, how to change/update for another bootloader, erase the mcu etc. what would you say, it is too advanced?? not true! you don't know what you don't know.. preconceived ideas on programming tools (limiting yourself and future answers to your users too) 🙂

    I think this is off topic, and maybe polluting Sancho's project. Sorry Sancho.


  • Plugin Developer

    Thanks @scalz , that puts the final dagger into this idea 🙂


  • Mod

    I took the liberty to fork this discussion into a new thread, leaving the project thread for project-related stuff.


  • Admin

    @mfalkvidd, I took the liberty to move the forked discussion from "OpenHardware" to the "Hardware" category.


  • Plugin Developer

    Thanks to both 🙂


 

230
Online

8.6k
Users

9.4k
Topics

99.0k
Posts