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.6k 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.
  • O Offline
    O 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
      • O Offline
        O 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
        • O 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.

          O 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.

            O Offline
            O 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
            • O Offline
              O Offline
              Oitzu
              wrote on last edited by
              #6

              Also contra: no signing

              1 Reply Last reply
              0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              12

              Online

              12.1k

              Users

              11.2k

              Topics

              113.4k

              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