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. Hardware
  3. Connect Serial Gateway to Openwrt routers TX RX pins

Connect Serial Gateway to Openwrt routers TX RX pins

Scheduled Pinned Locked Moved Hardware
12 Posts 4 Posters 4.4k Views 3 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.
  • D Offline
    D Offline
    derrij
    wrote on last edited by
    #2

    found some thing - How to terminate console on serial port (UART)
    am i on right direction?

    1 Reply Last reply
    0
    • pansenP Offline
      pansenP Offline
      pansen
      wrote on last edited by
      #3

      Does the MySensors gateway + domoticz already run on your router? Then I would say yes, just tell mysgw that your serial gateway is /dev/ttyXXX (whatever your router serial port is).

      Orange Pi Plus 2e connected to nrf24 PA via SPI running git-development MySensors gateway, OpenHAB2, mosquitto and MySQL persistence.

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

        @derrij

        I think that you always get debug messages from uBoot on the router serial port. But this is only during booting.

        The kernel debug messages should be possible to disable (with the information from the link that you provided)

        1 Reply Last reply
        0
        • D Offline
          D Offline
          derrij
          wrote on last edited by
          #5

          MySensors and Domoticz are the best!
          I did not think it would be so easy.
          I did not have to make changes to the router's firmware.
          All i need set speed in serial gateway

          #define MY_BAUD_RATE 115200
          

          On router make

          ln -s /dev/ttyS0 /dev/ttyUSB1
          
          
          1 Reply Last reply
          1
          • D derrij

            It is possible to connect Serial Gateway to router's TX RX pins?

            Will be nice not using router's usb port, and leave it for someone else.
            Would like to use MySensors wit Domoticz installed on router.
            Right now WiFi Gateway used.

            J Offline
            J Offline
            Jan Gatzke
            wrote on last edited by
            #6
            This post is deleted!
            1 Reply Last reply
            0
            • D Offline
              D Offline
              derrij
              wrote on last edited by
              #7

              it works, but now i see it unstable. a lot of garbage received

              2;5;1;0;35;184.367
              ;0.13;1;1;013;6;1;0;16;1
              ;4;1;0;24;121056
              2;4;1;0;35;121.056```
              J 1 Reply Last reply
              0
              • D derrij

                it works, but now i see it unstable. a lot of garbage received

                2;5;1;0;35;184.367
                ;0.13;1;1;013;6;1;0;16;1
                ;4;1;0;24;121056
                2;4;1;0;35;121.056```
                J Offline
                J Offline
                Jan Gatzke
                wrote on last edited by
                #8

                @derrij

                Did you try it with a lower baud rate? 9600?

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  derrij
                  wrote on last edited by
                  #9

                  I tried 57600. Right now i tried on Padavan firmware on Xiaomi router 3.
                  And i can't compile firmware with lower than 57600

                  But I start domoticz with -verbose 0 -loglevel 0, and it working better. Need to test more.

                  J 1 Reply Last reply
                  0
                  • D derrij

                    I tried 57600. Right now i tried on Padavan firmware on Xiaomi router 3.
                    And i can't compile firmware with lower than 57600

                    But I start domoticz with -verbose 0 -loglevel 0, and it working better. Need to test more.

                    J Offline
                    J Offline
                    Jan Gatzke
                    wrote on last edited by
                    #10

                    @derrij

                    Are you sure you need to set the rate in the code and recompile? Shouldn't it be enough to change it in config.h and domoticz? The uart of the router should be able to change the speed at runtime like other Linux devices, right?

                    1 Reply Last reply
                    0
                    • D Offline
                      D Offline
                      derrij
                      wrote on last edited by
                      #11

                      I tried set rate in domoticz and by stty -F /dev/ttyS0 9600 clocal cread cs8 -cstopb -parenb
                      but after a time it come back to rate what set in

                      cat /proc/cmdline
                      console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=squashfs
                      

                      it looks like i need to recompile firmware.

                      J 1 Reply Last reply
                      0
                      • D derrij

                        I tried set rate in domoticz and by stty -F /dev/ttyS0 9600 clocal cread cs8 -cstopb -parenb
                        but after a time it come back to rate what set in

                        cat /proc/cmdline
                        console=ttyS0,115200n8 root=/dev/mtdblock4 rootfstype=squashfs
                        

                        it looks like i need to recompile firmware.

                        J Offline
                        J Offline
                        Jan Gatzke
                        wrote on last edited by Jan Gatzke
                        #12

                        @derrij

                        The console paramter needs to be removed completely. You cannot use the uart for domoticz and as serial console at the same time.

                        https://wiki.openwrt.org/doc/recipes/terminate.console.on.serial

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


                        24

                        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