Skip to content
  • 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. OpenHardware.io
  3. 💬 Sensebender Gateway
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

💬 Sensebender Gateway

Scheduled Pinned Locked Moved OpenHardware.io
mysensorsgatewaysamd
382 Posts 59 Posters 151.2k Views 53 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.
  • F Fabien

    @tbowmo : with wich RFM69 driver ?

    tbowmoT Offline
    tbowmoT Offline
    tbowmo
    Admin
    wrote on last edited by
    #325

    @Fabien legacy, unless you would reflash all your nodes with the new driver as well. (they are not compatible)

    F 1 Reply Last reply
    0
    • F Offline
      F Offline
      Fabien
      wrote on last edited by
      #326

      @tbowmo : Just flash my SBGW today with arduino 1.8.5, last boards.txt and dev branch of mysensors.
      We will see if it's more stable. All my Node still in 2.1.1

      1 Reply Last reply
      0
      • stefaanvS Offline
        stefaanvS Offline
        stefaanv
        wrote on last edited by
        #327

        Which driver to use on Ubuntu 16.04 ?

        1 Reply Last reply
        0
        • stefaanvS Offline
          stefaanvS Offline
          stefaanv
          wrote on last edited by
          #328

          Hi, I'm trying to activate a sensebender gateway in OH2 on Ubuntu 16.04, however I'm having trouble setting up the serial port. Is there a how-to somewhere ? I suspect the serial port name is /dev/ttyACM0, but I'm not sure. How can I test ?
          MySensors bundle is reported to be active, but there's no messages coming in. I set the log level for mysensors to DEBUG, but nothing on the log.

          1 Reply Last reply
          0
          • stefaanvS Offline
            stefaanvS Offline
            stefaanv
            wrote on last edited by
            #329

            Here is my configuration file (mysensors.things)
            Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyACM0", sendDelay=200 ]
            {
            humidity keuken_vochtigheid [ nodeId="3", childId="2", smartSleep=true ]
            temperature keuken_temperatuur [ nodeId="3", childId="1", smartSleep=true ]
            }

            I suppose ttyACM0 because of
            stefaan@home:~$ dmesg |grep -i tty
            [ 0.000000] console [tty0] enabled
            [ 22.328631] 8086228A:00: ttyS4 at MMIO 0x81420000 (irq = 39, base_baud = 2764800) is a 16550A
            [ 22.329059] 8086228A:01: ttyS5 at MMIO 0x8141e000 (irq = 40, base_baud = 2764800) is a 16550A
            [ 23.106128] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0
            [362074.592743] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

            There seems to be a premissions problem om the port :
            stefaan@home:~$ cat /dev/ttyACM0
            cat: /dev/ttyACM0: Permission denied

            doing 'sudo usermod -a -G dialout openhab' doesn't help

            Anyone any ideas ?

            zboblamontZ 1 Reply Last reply
            0
            • stefaanvS Offline
              stefaanvS Offline
              stefaanv
              wrote on last edited by
              #330

              ttyUSB0 is a (different) RFXcom device

              1 Reply Last reply
              0
              • stefaanvS stefaanv

                Here is my configuration file (mysensors.things)
                Bridge mysensors:bridge-ser:gateway [ serialPort="/dev/ttyACM0", sendDelay=200 ]
                {
                humidity keuken_vochtigheid [ nodeId="3", childId="2", smartSleep=true ]
                temperature keuken_temperatuur [ nodeId="3", childId="1", smartSleep=true ]
                }

                I suppose ttyACM0 because of
                stefaan@home:~$ dmesg |grep -i tty
                [ 0.000000] console [tty0] enabled
                [ 22.328631] 8086228A:00: ttyS4 at MMIO 0x81420000 (irq = 39, base_baud = 2764800) is a 16550A
                [ 22.329059] 8086228A:01: ttyS5 at MMIO 0x8141e000 (irq = 40, base_baud = 2764800) is a 16550A
                [ 23.106128] usb 1-4: FTDI USB Serial Device converter now attached to ttyUSB0
                [362074.592743] cdc_acm 1-3:1.0: ttyACM0: USB ACM device

                There seems to be a premissions problem om the port :
                stefaan@home:~$ cat /dev/ttyACM0
                cat: /dev/ttyACM0: Permission denied

                doing 'sudo usermod -a -G dialout openhab' doesn't help

                Anyone any ideas ?

                zboblamontZ Offline
                zboblamontZ Offline
                zboblamont
                wrote on last edited by
                #331

                @stefaanv I can only suggest scanning the ports. When I connected the Gateway to the Pi3 it came up with /dev/ttyS0 instead of the listed options, although I ultimately ended up changing to a Pro-Mini as the radio did not work, and connected direct to the GPIO the serial port it worked with.

                1 Reply Last reply
                0
                • tbowmoT Offline
                  tbowmoT Offline
                  tbowmo
                  Admin
                  wrote on last edited by
                  #332

                  it should pop up as ttyACM0 or ttyACM1 (if you have another usb device that enumerates first and gets ttyACM0)

                  I added the following to /etc/udev/rules.d/10-local.rules file:

                  ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="6949", SYMLINK+="ttyNRF24"
                  

                  What that does is to create a symlink from the real device to ttyNRF24, so regardless of what I add to my rPI, i always know that ttyNRF24 is for my gateway.

                  (and then I use /dev/ttyNRF24 for the serial port in my controller)

                  stefaanvS 1 Reply Last reply
                  0
                  • tbowmoT tbowmo

                    it should pop up as ttyACM0 or ttyACM1 (if you have another usb device that enumerates first and gets ttyACM0)

                    I added the following to /etc/udev/rules.d/10-local.rules file:

                    ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="6949", SYMLINK+="ttyNRF24"
                    

                    What that does is to create a symlink from the real device to ttyNRF24, so regardless of what I add to my rPI, i always know that ttyNRF24 is for my gateway.

                    (and then I use /dev/ttyNRF24 for the serial port in my controller)

                    stefaanvS Offline
                    stefaanvS Offline
                    stefaanv
                    wrote on last edited by
                    #333

                    @tbowmo Definately ttyACM0
                    However, the setserial command returns information that doesn't look good : port0 and IRQ0. Does the board need a driver under Linux ?

                    stefaan@home:~$ sudo setserial /dev/ttyACM0
                    /dev/ttyACM0, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency```
                    1 Reply Last reply
                    0
                    • tbowmoT Offline
                      tbowmoT Offline
                      tbowmo
                      Admin
                      wrote on last edited by
                      #334

                      @stefaanv

                      No, it doesn't need a driver..

                      I get the same for mine, if I use setserial:

                      thomas at jarvis in ~ 
                      >sudo setserial /dev/ttyNRF24 
                      /dev/ttyNRF24, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency
                      thomas at jarvis in ~ 
                      >ll /dev/ttyNRF24 
                      lrwxrwxrwx 1 root root 7 nov 11 13:39 /dev/ttyNRF24 -> ttyACM1
                      

                      Btw. the permission problem.. You are logged in using your normal user (stefaan) and then you set permissions for openhab user? (see below). Have you tried setting the permissions for your user, and then cat /dev/ttyACM0?

                      @stefaanv said in 💬 Sensebender Gateway:

                      There seems to be a premissions problem om the port :
                      stefaan@home:~$ cat /dev/ttyACM0
                      cat: /dev/ttyACM0: Permission denied

                      doing 'sudo usermod -a -G dialout openhab' doesn't help

                      Anyone any ideas ?

                      stefaanvS 1 Reply Last reply
                      0
                      • tbowmoT tbowmo

                        @stefaanv

                        No, it doesn't need a driver..

                        I get the same for mine, if I use setserial:

                        thomas at jarvis in ~ 
                        >sudo setserial /dev/ttyNRF24 
                        /dev/ttyNRF24, UART: unknown, Port: 0x0000, IRQ: 0, Flags: low_latency
                        thomas at jarvis in ~ 
                        >ll /dev/ttyNRF24 
                        lrwxrwxrwx 1 root root 7 nov 11 13:39 /dev/ttyNRF24 -> ttyACM1
                        

                        Btw. the permission problem.. You are logged in using your normal user (stefaan) and then you set permissions for openhab user? (see below). Have you tried setting the permissions for your user, and then cat /dev/ttyACM0?

                        @stefaanv said in 💬 Sensebender Gateway:

                        There seems to be a premissions problem om the port :
                        stefaan@home:~$ cat /dev/ttyACM0
                        cat: /dev/ttyACM0: Permission denied

                        doing 'sudo usermod -a -G dialout openhab' doesn't help

                        Anyone any ideas ?

                        stefaanvS Offline
                        stefaanvS Offline
                        stefaanv
                        wrote on last edited by
                        #335

                        @tbowmo OK, is working now after restarting the bundle in OH.
                        Must have been the permission problem after all.
                        Thanks for your help !!

                        1 Reply Last reply
                        0
                        • rzyliusR Offline
                          rzyliusR Offline
                          rzylius
                          wrote on last edited by
                          #336

                          When I try to compile SensebenderGW sketch with signing features, I receive a bunch of errors. What am I missing?

                          Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Sensebender Gateway"

                          In file included from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:88:0:

                          C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin'

                          static uint8_t device_pin;

                                      ^
                          

                          In file included from C:\Users\rzylius\Documents\Arduino\libraries\MySensors/MySensors.h:131:0,

                                       from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:86:
                          

                          C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here

                          static uint8_t device_pin;

                                      ^
                          

                          In file included from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:88:0:

                          C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)':

                          C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)'

                          static void swi_set_signal_pin(uint8_t is_high)

                                   ^
                          

                          In file included from C:\Users\rzylius\Documents\Arduino\libraries\MySensors/MySensors.h:131:0,

                                       from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:86:
                          

                          C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: 'void swi_set_signal_pin(uint8_t)' previously defined here

                          static void swi_set_signal_pin(uint8_t is_high)

                                   ^
                          

                          and the same type of errors reoccurs multiple times.

                          AnticimexA 1 Reply Last reply
                          0
                          • rzyliusR rzylius

                            When I try to compile SensebenderGW sketch with signing features, I receive a bunch of errors. What am I missing?

                            Arduino: 1.8.5 (Windows Store 1.8.10.0) (Windows 10), Board: "Sensebender Gateway"

                            In file included from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:88:0:

                            C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: redefinition of 'uint8_t device_pin'

                            static uint8_t device_pin;

                                        ^
                            

                            In file included from C:\Users\rzylius\Documents\Arduino\libraries\MySensors/MySensors.h:131:0,

                                         from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:86:
                            

                            C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:6:16: error: 'uint8_t device_pin' previously declared here

                            static uint8_t device_pin;

                                        ^
                            

                            In file included from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:88:0:

                            C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp: In function 'void swi_set_signal_pin(uint8_t)':

                            C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: redefinition of 'void swi_set_signal_pin(uint8_t)'

                            static void swi_set_signal_pin(uint8_t is_high)

                                     ^
                            

                            In file included from C:\Users\rzylius\Documents\Arduino\libraries\MySensors/MySensors.h:131:0,

                                         from C:\Users\rzylius\AppData\Local\Temp\arduino_modified_sketch_737033\SensebenderGatewaySerial.ino:86:
                            

                            C:\Users\rzylius\Documents\Arduino\libraries\MySensors/drivers/ATSHA204/ATSHA204.cpp:24:13: error: 'void swi_set_signal_pin(uint8_t)' previously defined here

                            static void swi_set_signal_pin(uint8_t is_high)

                                     ^
                            

                            and the same type of errors reoccurs multiple times.

                            AnticimexA Offline
                            AnticimexA Offline
                            Anticimex
                            Contest Winner
                            wrote on last edited by
                            #337

                            @rzylius I think you have an #include in the sketch for the atsha driver. Try to remove that #include from the sketch.

                            Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

                            1 Reply Last reply
                            0
                            • rzyliusR Offline
                              rzyliusR Offline
                              rzylius
                              wrote on last edited by
                              #338

                              @Anticimex yes, when I delete #include atsha driver line, it compiles well. thanks.

                              1 Reply Last reply
                              0
                              • tbowmoT tbowmo

                                @Fabien legacy, unless you would reflash all your nodes with the new driver as well. (they are not compatible)

                                F Offline
                                F Offline
                                Fabien
                                wrote on last edited by
                                #339

                                @tbowmo After 2 month on the dev version, no more problem with the gateway. Perhaps it's time to made a new stable release ?

                                1 Reply Last reply
                                1
                                • tbowmoT Offline
                                  tbowmoT Offline
                                  tbowmo
                                  Admin
                                  wrote on last edited by
                                  #340

                                  @Fabien

                                  It's on the todo list.. :)

                                  1 Reply Last reply
                                  1
                                  • 8 Offline
                                    8 Offline
                                    8667
                                    wrote on last edited by
                                    #341

                                    I am looking for Gateway that will get me the results to MQTT but will support encryption + signing. That mean it should be easy to add new signatures (recompile/reflash) the module

                                    I suppose if I use Sensebender with LAN module it will be a pain to do that

                                    Is this doable if I use Orange zero as USB host for the Sensbender and let it act as serial gateway, then convert serial to mqtt with software on the Linux side? Also is it possible to reflash it easily this way? I do not want to rewire the hardware each time a add new node.

                                    1 Reply Last reply
                                    0
                                    • tbowmoT Offline
                                      tbowmoT Offline
                                      tbowmo
                                      Admin
                                      wrote on last edited by
                                      #342

                                      @8667

                                      Is it over the air encryption / signing that you are aiming after? Then that is possible with the gateway, it has the ATSHA204 onboard for signing capabilities. And it also works with the W5100 module attached. The Gateway have 256Kb of flash onboard, so it has "enough" room for both network stack, and signing.

                                      1 Reply Last reply
                                      0
                                      • rzyliusR Offline
                                        rzyliusR Offline
                                        rzylius
                                        wrote on last edited by
                                        #343

                                        Are there performance limitations to be considered for mysensors and SensebenderGW specifically. Will the gateway handle the load of signed communications if rules will be firing messages to different sensors like 1-2-5-10 per second?

                                        AnticimexA 1 Reply Last reply
                                        0
                                        • rzyliusR rzylius

                                          Are there performance limitations to be considered for mysensors and SensebenderGW specifically. Will the gateway handle the load of signed communications if rules will be firing messages to different sensors like 1-2-5-10 per second?

                                          AnticimexA Offline
                                          AnticimexA Offline
                                          Anticimex
                                          Contest Winner
                                          wrote on last edited by
                                          #344

                                          @rzylius if you use the atsha204a chip, it is the single wire interface that limits your throughput. I have no figures, so best is to just test how fast you can push messages through. Of course there is overhead in the OTA handshaking as well. That would probably be the bottleneck if you use software based signing.

                                          Do you feel secure today? No? Start requiring some signatures and feel better tomorrow ;)

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


                                          4

                                          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
                                          • OpenHardware.io
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular