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. Development
  3. Reducing number of cpu cycles while sending lots of data

Reducing number of cpu cycles while sending lots of data

Scheduled Pinned Locked Moved Development
6 Posts 2 Posters 1.2k Views 2 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.
  • OitzuO Offline
    OitzuO Offline
    Oitzu
    wrote on last edited by
    #1

    In my nesting-box project i have the case that i need to send a lot of data over the nrf24-link.

    The normal mysensors way of sending the data would be to define a message object outside the sending loop and then set the payload in the loop followed by a send.
    The actual "problem" with this is, that a call to send will each time set the last, sender, destination, version, command and requestack.

    To speed up i declared to methods "prepareSend" which sets all the stuff to the message object and a "send" method that just takes the message object and straight call radio.send.

    Pro: Properties of Message can be set one time -> faster loop
    Contra: Routing changes etc. will have no affect in the loop.

    What do other developers think of this, and is it maybe worthy to also implement it for real?

    1 Reply Last reply
    0
    • mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      I guess it depends... How much difference does this make in real throughput?

      Doesn't the OTA stuff use som sort of stream concept? Maybe that is a good solution for your data as well?

      1 Reply Last reply
      0
      • OitzuO Offline
        OitzuO Offline
        Oitzu
        wrote on last edited by
        #3

        My memory says: 5kb/s without modification and arround 20kb/s with modification.

        mfalkviddM 1 Reply Last reply
        0
        • OitzuO Oitzu

          My memory says: 5kb/s without modification and arround 20kb/s with modification.

          mfalkviddM Offline
          mfalkviddM Offline
          mfalkvidd
          Mod
          wrote on last edited by
          #4

          @Oitzu said:

          My memory says: 5kb/s without modification and arround 20kb/s with modification.

          Nice. Not fantastic, but a pretty ok speedup.

          OitzuO 1 Reply Last reply
          0
          • mfalkviddM mfalkvidd

            @Oitzu said:

            My memory says: 5kb/s without modification and arround 20kb/s with modification.

            Nice. Not fantastic, but a pretty ok speedup.

            OitzuO Offline
            OitzuO Offline
            Oitzu
            wrote on last edited by
            #5

            @mfalkvidd said:

            Doesn't the OTA stuff use som sort of stream concept? Maybe that is a good solution for your data as well?

            I don't know about the MYSBootloader 1.3 but the old one was more like a request <-> answer thing of blocks, this is fine but not very fast and not very "streamy" ^^

            @mfalkvidd said:

            Nice. Not fantastic, but a pretty ok speedup.

            Well it was enough to have a reasonable transfer time. There are still more things someone could do to speed things up.
            By example: Disable the auto-ack and send more then 24bytes at a time. (Keeping radio on and send multiple packets)
            But thats all a little bit more complicated with the mysensors lib.

            1 Reply Last reply
            0
            • OitzuO Offline
              OitzuO Offline
              Oitzu
              wrote on last edited by
              #6

              Also contra: no signing

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


              18

              Online

              11.7k

              Users

              11.2k

              Topics

              113.0k

              Posts


              Copyright 2025 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