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. Troubleshooting
  3. Things get funky when there's a bit more traffic

Things get funky when there's a bit more traffic

Scheduled Pinned Locked Moved Troubleshooting
22 Posts 7 Posters 3.9k Views 7 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.
  • mtiutiuM Offline
    mtiutiuM Offline
    mtiutiu
    Hardware Contributor
    wrote on last edited by mtiutiu
    #1

    Hi,

    I hope this is the right section to post this observation. I have a sensors/actuators network which is RFM69W based(868MHz) and the gateway is the serial type. Initially I thought that it was some issue from the hardware(noise filtering/dc-dc converters, emi, bla, bla) but after reducing the network traffic things started to come to normal.

    So in the initial setup I was sending lots of status information from actuators and battery powered nodes..things that were redundant in the end so I removed them. BUT...a question still remains: is the underlying RF hw and/or software stack which takes care of the transport(collision detection/reduction) susceptible to funky behavior when the network traffic goes a little bit high? I'm asking this because at some point in time it may increase as I add more sensors/actuators. I don't use repeaters as I don't need for the moment.

    About the funky stuff that I mentioned:

    1. From time to time I get nodes with extra sensors: for example on the relay actuator node I get a temperature sensor attached from nowhere :simple_smile: which reports some value - funny thing is that I removed it and after a day or two it appeared again - same temperature sensor and with same temperature - this is strange(like ghosts stumbling across my hardware)
    2. Some light actuators were triggered randomly
    3. The above strange things happened also when network discovery was issued by the controller and/or gateway - so when BROADCASTING data

    Did anyone experienced something similar? Is it because of high collision rate so the actuators perceive something wrong going through the air?

    Note: I double checked my hardware(triple checked) and my sketches and I didn't suspect anything in there. It's not first time when I start electronics and design hw so I'm thinking is not something I did wrong. I'm using the stable release version of mysensors which is: 2.1.1

    YveauxY 1 Reply Last reply
    0
    • mtiutiuM mtiutiu

      Hi,

      I hope this is the right section to post this observation. I have a sensors/actuators network which is RFM69W based(868MHz) and the gateway is the serial type. Initially I thought that it was some issue from the hardware(noise filtering/dc-dc converters, emi, bla, bla) but after reducing the network traffic things started to come to normal.

      So in the initial setup I was sending lots of status information from actuators and battery powered nodes..things that were redundant in the end so I removed them. BUT...a question still remains: is the underlying RF hw and/or software stack which takes care of the transport(collision detection/reduction) susceptible to funky behavior when the network traffic goes a little bit high? I'm asking this because at some point in time it may increase as I add more sensors/actuators. I don't use repeaters as I don't need for the moment.

      About the funky stuff that I mentioned:

      1. From time to time I get nodes with extra sensors: for example on the relay actuator node I get a temperature sensor attached from nowhere :simple_smile: which reports some value - funny thing is that I removed it and after a day or two it appeared again - same temperature sensor and with same temperature - this is strange(like ghosts stumbling across my hardware)
      2. Some light actuators were triggered randomly
      3. The above strange things happened also when network discovery was issued by the controller and/or gateway - so when BROADCASTING data

      Did anyone experienced something similar? Is it because of high collision rate so the actuators perceive something wrong going through the air?

      Note: I double checked my hardware(triple checked) and my sketches and I didn't suspect anything in there. It's not first time when I start electronics and design hw so I'm thinking is not something I did wrong. I'm using the stable release version of mysensors which is: 2.1.1

      YveauxY Offline
      YveauxY Offline
      Yveaux
      Mod
      wrote on last edited by
      #2

      @mtiutiu what controller are you using?
      It would be good to rule out either the controller or the mySensors network upfront.

      http://yveaux.blogspot.nl

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

        The rfm69 radio uses a 2 byte crc, so collisions should result in the message being discarded rather than getting garbled messages.

        Could the serial prints become interleaved if there is much traffic?

        1 Reply Last reply
        0
        • gohanG Offline
          gohanG Offline
          gohan
          Mod
          wrote on last edited by
          #4

          Agreed, if there is too much traffic I'd expect messages to get lost. How fast did you set the baud rate on the serial port?

          1 Reply Last reply
          0
          • mtiutiuM Offline
            mtiutiuM Offline
            mtiutiu
            Hardware Contributor
            wrote on last edited by mtiutiu
            #5

            I'm using MyController and 115200 serial baudrate on the gw. The thing is that it's a little bit hard to debug this(at least for me) because these things happen somehow intermittent. I watched MyController logs and indeed I see that sometimes I receive values which are correct from the controller point of view but in reality are not because I don't have those extra sensors attached in hardware :simple_smile:.

            Regarding the gw and interleaved serial prints I was thinking to use a atsamd21 or any arm MCU that is supported by software in order to process things faster and maybe use a higher serial baudrate(if the MCU allows it and the baudrate error rate is acceptable). But to be honest I don't think this helps if the messages are interleaved as in that situation I'm assuming that we need some kind of arbitration right?

            1 Reply Last reply
            0
            • gohanG Offline
              gohanG Offline
              gohan
              Mod
              wrote on last edited by
              #6

              Have you tried a more powerful gateway hw just to see if something changes?

              mtiutiuM 1 Reply Last reply
              0
              • gohanG gohan

                Have you tried a more powerful gateway hw just to see if something changes?

                mtiutiuM Offline
                mtiutiuM Offline
                mtiutiu
                Hardware Contributor
                wrote on last edited by
                #7

                @gohan

                Not yet as I don't have the required parts yet. But I will and post the results.

                AWIA 1 Reply Last reply
                0
                • mtiutiuM mtiutiu

                  @gohan

                  Not yet as I don't have the required parts yet. But I will and post the results.

                  AWIA Offline
                  AWIA Offline
                  AWI
                  Hero Member
                  wrote on last edited by
                  #8

                  @mtiutiu Just curious, what are you using now for the gateway?

                  mtiutiuM 1 Reply Last reply
                  0
                  • AWIA AWI

                    @mtiutiu Just curious, what are you using now for the gateway?

                    mtiutiuM Offline
                    mtiutiuM Offline
                    mtiutiu
                    Hardware Contributor
                    wrote on last edited by mtiutiu
                    #9

                    @AWI

                    I'm rolling my own(with CP2102 usb-serial converter) https://www.openhardware.io/view/316/MySensors-RFM69W-serial-GWATMEGA328P. Oh and I changed several serial GW's all based on Atmega328p of course but with different usb to serial converters like: CH340G, atmega16u2 from Arduino UNO board and I think I used arduino nano at some point in time with FTDI 232 chip.

                    Results are the same. Not to mention that after 20-25 days the usb to serial connection stops working so bye-bye serial gw and no output from it. That's why I changed and tested so many usb to serial converters and different boards. But that's another issue and story not related to this tread which I'm still investigating.

                    1 Reply Last reply
                    1
                    • gohanG Offline
                      gohanG Offline
                      gohan
                      Mod
                      wrote on last edited by
                      #10

                      Have you considered to try a more standard gateway hw? Or try ethernet gateway?

                      mtiutiuM 1 Reply Last reply
                      0
                      • gohanG gohan

                        Have you considered to try a more standard gateway hw? Or try ethernet gateway?

                        mtiutiuM Offline
                        mtiutiuM Offline
                        mtiutiu
                        Hardware Contributor
                        wrote on last edited by mtiutiu
                        #11

                        @gohan

                        What do you mean by a "more standard gw hw" :simple_smile: ? Isn't the serial gw the defacto? If I remember well this was the first one supported. I tried the ESP8266 based one but after a day it started to become unstable and in the end iresponsive. I used the nodemcu board to test it - maybe because of the board and/or power supply issues because I've read that esp modules are very picky regarding that part so I abandoned it.

                        What I wanted to try was the orange pi board with rfm69w attached directly on the SPI port but no luck as it only supports nrf24l01 in the mysensors 2.1.1 version. Maybe I'll come back to it when switching to the new upcoming version of mysensors core.

                        Next W5100 ethernet board...well I didn't had any pleasant experiences with this one either before (not mysensors related) so I think I'll skip this one too.

                        Is there something else that I missed?

                        gohanG 1 Reply Last reply
                        0
                        • mtiutiuM Offline
                          mtiutiuM Offline
                          mtiutiu
                          Hardware Contributor
                          wrote on last edited by mtiutiu
                          #12

                          One other thing that I'm waiting for is the MySensors core to become fully portable and independent of Arduino framework so that I can use it for example with STM32 mcu's and libopencm3 or cmsis or cubemx hal maybe. I'm not really a software guy - still learning this part. And maybe I'll never be the software guy type :simple_smile: in the future too...but still we have now such powerful ARM mcu's and cheaper too and it's a pitty to not take advantage of them. Now it's true that in most of the cases the old plain 8bit ones are more than enough for simple tasks like reading sensors and driving some relays...so why bother with those 32bit complex beasts :simple_smile:

                          1 Reply Last reply
                          0
                          • hekH Offline
                            hekH Offline
                            hek
                            Admin
                            wrote on last edited by
                            #13

                            @mtiutiu

                            You might have missed it but basic STM32F1 support has already been implemented in the dev-branch.

                            https://github.com/mysensors/MySensors/pull/795

                            1 Reply Last reply
                            0
                            • mtiutiuM mtiutiu

                              @gohan

                              What do you mean by a "more standard gw hw" :simple_smile: ? Isn't the serial gw the defacto? If I remember well this was the first one supported. I tried the ESP8266 based one but after a day it started to become unstable and in the end iresponsive. I used the nodemcu board to test it - maybe because of the board and/or power supply issues because I've read that esp modules are very picky regarding that part so I abandoned it.

                              What I wanted to try was the orange pi board with rfm69w attached directly on the SPI port but no luck as it only supports nrf24l01 in the mysensors 2.1.1 version. Maybe I'll come back to it when switching to the new upcoming version of mysensors core.

                              Next W5100 ethernet board...well I didn't had any pleasant experiences with this one either before (not mysensors related) so I think I'll skip this one too.

                              Is there something else that I missed?

                              gohanG Offline
                              gohanG Offline
                              gohan
                              Mod
                              wrote on last edited by
                              #14

                              @mtiutiu I was referring to boards like UNO or mega and an ethernet shield

                              1 Reply Last reply
                              0
                              • hekH Offline
                                hekH Offline
                                hek
                                Admin
                                wrote on last edited by
                                #15

                                @gohan,

                                Hehe, @mtiutiu seems way beyond the uno stage, designing his own boards. :)

                                1 Reply Last reply
                                0
                                • gohanG Offline
                                  gohanG Offline
                                  gohan
                                  Mod
                                  wrote on last edited by
                                  #16

                                  I got that, I'm just trying to see if taking some steps back could get different results. I've learned many time that sticking too much to a certain idea is bad for troubleshooting.

                                  1 Reply Last reply
                                  1
                                  • mtiutiuM Offline
                                    mtiutiuM Offline
                                    mtiutiu
                                    Hardware Contributor
                                    wrote on last edited by
                                    #17

                                    Thank you all for your suggestions I appreciate. I will try the ethernet gw too and see what happens.

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

                                      @mtiutiu
                                      There is also the Sensebender GW,
                                      or in case you're interested i already designed an atsam usb dongle (i'll upload my latest files though), and could send one to you if you want. i'll order some others pcb projects during the weekend (and always choose express shipping), and i'll order the new rev at same time so..it's as you wish, just tell me, no problem, it's a quick tiny board to assemble ;)

                                      mtiutiuM 1 Reply Last reply
                                      0
                                      • scalzS scalz

                                        @mtiutiu
                                        There is also the Sensebender GW,
                                        or in case you're interested i already designed an atsam usb dongle (i'll upload my latest files though), and could send one to you if you want. i'll order some others pcb projects during the weekend (and always choose express shipping), and i'll order the new rev at same time so..it's as you wish, just tell me, no problem, it's a quick tiny board to assemble ;)

                                        mtiutiuM Offline
                                        mtiutiuM Offline
                                        mtiutiu
                                        Hardware Contributor
                                        wrote on last edited by
                                        #19

                                        @scalz

                                        I saw that project - really nice btw(as all of your hw projects). I inspired a little bit from yours and I created my version using the atsamd21e variant as you can see here: https://github.com/mtiutiu/kicad/tree/master/mysensors/gw/serial_gw_ATSAMD21E.

                                        Waiting for the boards though...The fact is that I like to design my own boards whenever possible as you may noticed already. And the satisfaction is bigger of course when you design your own and in the end it just works :simple_smile: .

                                        Sensebender GW is a great project too and very well made as I studied it a little bit so big congrats to @tbowmo. But as I said I like to roll my own boards :simple_smile:.

                                        Thanks for the support @scalz . And to express my gratitude for the openhardware community I always try to give something back as I already did on the openhardware.io site.

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

                                          @mtiutiu
                                          thx for the kind words, i appreciate. I understand you, same for me.
                                          Your designs are nice too, i've seen them ;)
                                          I'll upload my updated sch as i've changed a few things and routes, and it's also thinner now.

                                          your atsam gw looks good, i see you've simplified a few things, curious as usual.. :)
                                          no usb protection, regarding usb specs ?
                                          why not using the more powerful radio (HW/HCW rev) as it's a GW? Will you put the antenna wire in the enclosure, or let it go outside? however i prefer a connector for this.
                                          Well, just some feedbacks, i've different mcu&gw too, so i know it's fun to experiment but not interested to reinvent the wheel each time lol.

                                          Keep the good work :+1: , i hope you'll get your stuff working as you wish, and i should be back asap on software, put more load on my network and see what happens (still a lot entertained by hw too)

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


                                          12

                                          Online

                                          11.7k

                                          Users

                                          11.2k

                                          Topics

                                          113.1k

                                          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