Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. My Project
  3. nRF5 action!

nRF5 action!

Scheduled Pinned Locked Moved My Project
1.9k Posts 49 Posters 630.8k Views 44 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Omemanti
    wrote on last edited by
    #1717

    What are the options of getting OTA working? Is it supported? Or is it still work in progress? (If so, ia there an ETA?)

    NeverDieN 1 Reply Last reply
    0
    • O Omemanti

      What are the options of getting OTA working? Is it supported? Or is it still work in progress? (If so, ia there an ETA?)

      NeverDieN Offline
      NeverDieN Offline
      NeverDie
      Hero Member
      wrote on last edited by
      #1718

      @omemanti said in nRF5 action!:

      What are the options of getting OTA working? Is it supported? Or is it still work in progress? (If so, ia there an ETA?)

      https://devzone.nordicsemi.com/f/nordic-q-a/38936/is-there-an-easier-to-use-ota-firmware-uploader

      T 1 Reply Last reply
      1
      • NeverDieN Offline
        NeverDieN Offline
        NeverDie
        Hero Member
        wrote on last edited by NeverDie
        #1719

        These are a bit cheaper than the Ebyte modules, and the breakout board is already built-in: https://www.aliexpress.com/item/NRF52832-Bluetooth-Module-BLE-4-2-Low-Power-Bluetooth-External-Antenna-IPEX-Support-Multi-Protocol/32904197412.html?spm=2114.search0104.3.102.772c16a3Fm2Lp8&ws_ab_test=searchweb0_0,searchweb201602_2_10065_10068_10130_10547_10546_10059_10884_10548_315_10545_10887_10696_100031_10084_531_10083_10103_10618_10307_449,searchweb201603_60,ppcSwitch_0&algo_expid=f8654a20-dd6e-4042-987f-5bd9eaf3c58d-15&algo_pvid=f8654a20-dd6e-4042-987f-5bd9eaf3c58d&transAbTest=ae803_4&priceBeautifyAB=0

        JokgiJ 1 Reply Last reply
        0
        • NeverDieN NeverDie

          These are a bit cheaper than the Ebyte modules, and the breakout board is already built-in: https://www.aliexpress.com/item/NRF52832-Bluetooth-Module-BLE-4-2-Low-Power-Bluetooth-External-Antenna-IPEX-Support-Multi-Protocol/32904197412.html?spm=2114.search0104.3.102.772c16a3Fm2Lp8&ws_ab_test=searchweb0_0,searchweb201602_2_10065_10068_10130_10547_10546_10059_10884_10548_315_10545_10887_10696_100031_10084_531_10083_10103_10618_10307_449,searchweb201603_60,ppcSwitch_0&algo_expid=f8654a20-dd6e-4042-987f-5bd9eaf3c58d-15&algo_pvid=f8654a20-dd6e-4042-987f-5bd9eaf3c58d&transAbTest=ae803_4&priceBeautifyAB=0

          JokgiJ Offline
          JokgiJ Offline
          Jokgi
          wrote on last edited by
          #1720

          @neverdie And it has the 32Khz crystal on it too which will reduce power consumption. And It looks like the DC/DC converter is also included?

          T 1 Reply Last reply
          0
          • JokgiJ Jokgi

            @neverdie And it has the 32Khz crystal on it too which will reduce power consumption. And It looks like the DC/DC converter is also included?

            T Offline
            T Offline
            Toyman
            wrote on last edited by
            #1721

            Guys, remind me pls: is CR2450 enough for the nrf52 Ebyte module acting as a Mysensors node?
            Is it capable to handle tx current spikes?
            Energizer datasheet states 9ma as max curent pulse. Is it sufficient?

            1 Reply Last reply
            0
            • NeverDieN NeverDie

              @omemanti said in nRF5 action!:

              What are the options of getting OTA working? Is it supported? Or is it still work in progress? (If so, ia there an ETA?)

              https://devzone.nordicsemi.com/f/nordic-q-a/38936/is-there-an-easier-to-use-ota-firmware-uploader

              T Offline
              T Offline
              Toyman
              wrote on last edited by
              #1722

              @neverdie I've setup the bootloader for my BT project and I confirm its much easier than it looks.
              Can it be used for MySensors? For BT, I create a hex file in Keil and then upload it via nrftoolbox app.
              Can the same procedure be used with MySensors? OTA needs Softdevice and Softdevice is not compatible with MySensors

              NeverDieN 1 Reply Last reply
              1
              • scalzS Offline
                scalzS Offline
                scalz
                Hardware Contributor
                wrote on last edited by scalz
                #1723

                @toyman said in nRF5 action!:

                Guys, remind me pls: is CR2450 enough for the nrf52 Ebyte module acting as a Mysensors node?
                Is it capable to handle tx current spikes?
                Energizer datasheet states 9ma as max curent pulse. Is it sufficient?

                yes but you need some power buffer for the spikes. So put 100uF low leakage ceramic capa close to batt holder, and you could also add one more close to your nrf5 module.

                Can the same procedure be used with MySensors? OTA needs Softdevice and Softdevice is not compatible with MySensors

                You already have your answer I think ;)

                1 Reply Last reply
                2
                • T Toyman

                  @neverdie I've setup the bootloader for my BT project and I confirm its much easier than it looks.
                  Can it be used for MySensors? For BT, I create a hex file in Keil and then upload it via nrftoolbox app.
                  Can the same procedure be used with MySensors? OTA needs Softdevice and Softdevice is not compatible with MySensors

                  NeverDieN Offline
                  NeverDieN Offline
                  NeverDie
                  Hero Member
                  wrote on last edited by NeverDie
                  #1724

                  @toyman said in nRF5 action!:

                  Can the same procedure be used with MySensors? OTA needs Softdevice and Softdevice is not compatible with MySensors

                  Ouch. :astonished: That does seem like a gotcha. :confounded: Thanks for pointing that out!

                  Let's enumerate the possible remedies: :thinking_face:

                  1. I guess theoretically the bootloader could use softdevice to handle uploads and then revert to MySensors afterward. After all, with these devices there's so much flash and memory that there's nothing which says the bootloader needs to be tiny. In that case your code would need to force a reboot, and the bootloader would need to wait a period of time to see if an OTA upload is being requested before continuing. But this is all theoretical, and I don't know enough to know whether that would be easy or difficult to make work. Far from elegant to be sure. Maybe there's a better solution than that? Admittedly, this looks like a rabbit hole I'd rather not go down.

                  2. Maybe (?) micropython is the the easier path out of this train wreck, assuming (?) it can assemble a string that it reads from OTA and then execute it (EVAL it) the way that. say, LISP, can. Then you could bypass softdevice entirely and use whatever radio communications you want. The relative ease of that might make it worth the added baggage of running an interpreter. Well, that might work for me, but for mysensors it would mean a major port to micropython, which, AFAIK, no one has yet done.

                  3. That leaves writing your own wireless bootloader, like I guess others here have done for mysensors and the atmega328p, but that doesn't sound trivial either.

                  4. Any other ideas?

                  I'm just thinking out loud here and above, but I'm admittedly now both stymied and flummoxed. Being wireless without the ability to do wireless updates is not good.

                  @scalz Does the TI platform have the same sort of issue, or does it handle OTA updates differently?

                  1 Reply Last reply
                  0
                  • NeverDieN Offline
                    NeverDieN Offline
                    NeverDie
                    Hero Member
                    wrote on last edited by
                    #1725

                    For instance, this buttonless approach stays in DFU mode for 30 seconds after a reset: https://thingtype.com/blog/dfu-ota-updating-an-nrf52-application-over-the-air/

                    I guess maybe that's the shortest path out of this dilemma.

                    monteM 1 Reply Last reply
                    0
                    • NeverDieN NeverDie

                      For instance, this buttonless approach stays in DFU mode for 30 seconds after a reset: https://thingtype.com/blog/dfu-ota-updating-an-nrf52-application-over-the-air/

                      I guess maybe that's the shortest path out of this dilemma.

                      monteM Offline
                      monteM Offline
                      monte
                      wrote on last edited by
                      #1726

                      @neverdie but all those bootloaders rely on bluetooth (thus softdevice) for DFU, that means we need to write our custom bootloader which uses different transport.

                      NeverDieN 1 Reply Last reply
                      1
                      • monteM monte

                        @neverdie but all those bootloaders rely on bluetooth (thus softdevice) for DFU, that means we need to write our custom bootloader which uses different transport.

                        NeverDieN Offline
                        NeverDieN Offline
                        NeverDie
                        Hero Member
                        wrote on last edited by
                        #1727

                        @monte said in nRF5 action!:

                        @neverdie but all those bootloaders rely on bluetooth (thus softdevice) for DFU, that means we need to write our custom bootloader which uses different transport.

                        In a perfect world, yes. However, since that doesn't yet exist, the question is: what else, if anything, can be done today?

                        Nca78N 1 Reply Last reply
                        1
                        • NeverDieN NeverDie

                          @monte said in nRF5 action!:

                          @neverdie but all those bootloaders rely on bluetooth (thus softdevice) for DFU, that means we need to write our custom bootloader which uses different transport.

                          In a perfect world, yes. However, since that doesn't yet exist, the question is: what else, if anything, can be done today?

                          Nca78N Offline
                          Nca78N Offline
                          Nca78
                          Hardware Contributor
                          wrote on last edited by
                          #1728

                          @neverdie said in nRF5 action!:

                          In a perfect world, yes. However, since that doesn't yet exist, the question is: what else, if anything, can be done today?

                          Today is either use bluetooth/ant/thread (all need softdevice) or write your own OTA bootloader for legacy radio without softdevice.

                          1 Reply Last reply
                          1
                          • NeverDieN Offline
                            NeverDieN Offline
                            NeverDie
                            Hero Member
                            wrote on last edited by
                            #1729

                            Looks as though micropython does support the bluetooth stack for both nRF52832 and nRF52840: https://github.com/micropython/micropython/tree/master/ports/nrf

                            Micropython also runs on the nRF51, but apparently (judging from the BBC micro:bit), there's not also enough extra space to also support the bluetooth at the same time on the nr51.

                            U 1 Reply Last reply
                            0
                            • NeverDieN NeverDie

                              Looks as though micropython does support the bluetooth stack for both nRF52832 and nRF52840: https://github.com/micropython/micropython/tree/master/ports/nrf

                              Micropython also runs on the nRF51, but apparently (judging from the BBC micro:bit), there's not also enough extra space to also support the bluetooth at the same time on the nr51.

                              U Offline
                              U Offline
                              Uhrheber
                              wrote on last edited by
                              #1730

                              @neverdie Speaking of micropython: Adafruits fork of micropython (called circuitpython) now also supports the nRF52840. The also added the nRF52840 dongle as make target (pca10059). After compiling, you can use nRF Connect to flash the hex file to the dongle, via the stock USB DFU bootloader, so you don't need an extra programmer.

                              I like that dongle, it's cheap yet powerful, and it may be the smallest micropython-capable board with native USB. Native USB is nice, because in this case it has not only a serial REPL, but also a virtual drive with the code files, like the original pyboard.

                              1 Reply Last reply
                              1
                              • NeverDieN Offline
                                NeverDieN Offline
                                NeverDie
                                Hero Member
                                wrote on last edited by NeverDie
                                #1731

                                After running through a gauntlet, I managed to get micropython running on the nRF52832-DK! I posted the firmware here: https://forum.micropython.org/viewtopic.php?f=2&t=5343&p=30756#p30756 to spare anyone else from running the same gauntlet. Just copy the firmware.hex file directly to the nRF52832-DK drive on your PC, and it will upload automatically to the DK and start running micropython. )

                                T 1 Reply Last reply
                                3
                                • NeverDieN NeverDie

                                  After running through a gauntlet, I managed to get micropython running on the nRF52832-DK! I posted the firmware here: https://forum.micropython.org/viewtopic.php?f=2&t=5343&p=30756#p30756 to spare anyone else from running the same gauntlet. Just copy the firmware.hex file directly to the nRF52832-DK drive on your PC, and it will upload automatically to the DK and start running micropython. )

                                  T Offline
                                  T Offline
                                  Toyman
                                  wrote on last edited by
                                  #1732

                                  @neverdie what are potential advantages of micropython?

                                  NeverDieN 1 Reply Last reply
                                  0
                                  • T Toyman

                                    @neverdie what are potential advantages of micropython?

                                    NeverDieN Offline
                                    NeverDieN Offline
                                    NeverDie
                                    Hero Member
                                    wrote on last edited by
                                    #1733

                                    @toyman OTA updates.

                                    T 1 Reply Last reply
                                    0
                                    • NeverDieN NeverDie

                                      @toyman OTA updates.

                                      T Offline
                                      T Offline
                                      Toyman
                                      wrote on last edited by
                                      #1734

                                      @neverdie I am afraid it still relies on Softdevice

                                      monteM NeverDieN 2 Replies Last reply
                                      0
                                      • T Toyman

                                        @neverdie I am afraid it still relies on Softdevice

                                        monteM Offline
                                        monteM Offline
                                        monte
                                        wrote on last edited by
                                        #1735

                                        @toyman no, if your code is in python. So the deal is "just" to port mysensors to python.

                                        1 Reply Last reply
                                        1
                                        • T Toyman

                                          @neverdie I am afraid it still relies on Softdevice

                                          NeverDieN Offline
                                          NeverDieN Offline
                                          NeverDie
                                          Hero Member
                                          wrote on last edited by NeverDie
                                          #1736

                                          @toyman Micropython on the BBC micro:bit (which uses the nRF51822) has a Radio library that uses Nordic's proprietary radio modes and doesn't involve Bluetooth. I suppose the question is: what would be involved in getting it to run on the nRF52832 or the nRF52840. Seems like it would be substantially the same.

                                          Faiing that, if I can directly manipulate the radio registers from miropython as I can from C, then it shouldn't be too hard to get at least minimal radio capability up and running from within micropython.

                                          If I can get rudimentary radio communications working in micropython, then from there it should be easy to do OTA updates via REPL. I did some proof of concept to that effect on the micro:bit, but quickly ran out of memory--the micro:bit has only a total of 16K of RAM, so there's very little headroom to begin with. On the nRF52840, lack of RAM shouldn't be an issue.

                                          U 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          6

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.0k

                                          Posts


                                          Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • MySensors
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular