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. Controllers
  3. Domoticz
  4. lost serial gateway after un plug power Rpi

lost serial gateway after un plug power Rpi

Scheduled Pinned Locked Moved Domoticz
45 Posts 8 Posters 13.8k 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.
  • sinczeS sincze

    No problem.

    I had problems with original FTDI arduino.
    For testing i changed to 340 arduino that worked.

    Than ordered new FTDI arduino.. And it worked again.
    Do you have a spare ARDUINO that you can flash with your gateway software??

    If your gateway is not assigned a /dev/ttyUSBx address It will not work.

    R Offline
    R Offline
    Reza
    wrote on last edited by
    #31

    @sincze
    sorry again , i am beginner :)
    first i do this Instructions (https://www.domoticz.com/wiki/PersistentUSBDevices) and dont work , after this , @tbowmo told me :
    lsusb

    -> provide the output

    unplug / plug the usb device

    once more in your terminal
    lsusb
    -> provide output
    also i do :
    dmesg

    -> provide the output

    unplug / plug the usb device

    so now after unplug/plug , my gateway dont detect and dont work

    1 Reply Last reply
    0
    • R Offline
      R Offline
      Reza
      wrote on last edited by
      #32

      0_1474907053201_kdkdkdkdk.jpg

      i change usb port for my gateway and this working now , but after reset my problem again,,,,

      1 Reply Last reply
      0
      • sinczeS sincze

        No problem.

        I had problems with original FTDI arduino.
        For testing i changed to 340 arduino that worked.

        Than ordered new FTDI arduino.. And it worked again.
        Do you have a spare ARDUINO that you can flash with your gateway software??

        If your gateway is not assigned a /dev/ttyUSBx address It will not work.

        R Offline
        R Offline
        Reza
        wrote on last edited by
        #33

        @sincze
        i use a spare ARDUINO but there is my problem yet...
        0_1474908555516_0.jpg

        1 Reply Last reply
        0
        • tbowmoT tbowmo

          after you have powered on your raspberry, you log in

          then at the command prompt you type:

          lsusb

          -> provide the output

          unplug / plug the usb device

          once more in your terminal
          lsusb
          -> provide output

          the same for dmesg. In a terminal type "dmesg" hit return, and provide the output, both before you unplug a device that is not working, and after you have done it, and it is working.

          R Offline
          R Offline
          Reza
          wrote on last edited by Reza
          #34

          @tbowmo
          now i run this
          lsusb

          -> provide the output

          unplug / plug the usb device

          once more in your terminal
          lsusb
          -> provide output

          the same for dmesg. In a terminal type "dmesg" hit return, and provide the output, both before you unplug a device that is not working, and after you have done it, and it is working.

          but after unplug power . there is my problem yet

          0_1474909146153_00.jpg

          1 Reply Last reply
          0
          • sinczeS Offline
            sinczeS Offline
            sincze
            MySensors Evangelist
            wrote on last edited by
            #35

            @Reza just to be sure: unplug power you mean:

            Unplug the power cord from raspberry right?
            Not unplug and replug FTDI device?

            R 1 Reply Last reply
            1
            • sinczeS sincze

              @Reza just to be sure: unplug power you mean:

              Unplug the power cord from raspberry right?
              Not unplug and replug FTDI device?

              R Offline
              R Offline
              Reza
              wrote on last edited by
              #36

              @sincze said:

              just to be sure: unplug power you mean:

              Unplug the power cord from raspberry right?
              Not unplug and replug FTDI device?

              my serial gateway is always plug and connect. i mean unplug power of raspberry.
              Suppose i use solar panel and battery for home and in cloudy day . power's home is off... so raspberry will be turn off...(or other reason for power off...)

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

                @Reza

                from the initial logs, after powerup, there is no FT232 listed in your lsusb listing, then you unplug and plug it again, and THEN the FT232 is present..

                This IS not a bug in mysensors, as it's an HW chip (FT232) that your linux doesn't see before it's unplugged / plugged, it smells of a hardware issue with your nano. Now @sincze mentioned to you that he have had the same issues, and he cured it by exchanging the arduino, maybe it's worth a shot?

                @awi also linked to a document, that describes how to make USB devices persistent in the naming (this can happen once in a while, that a USB device enumerates as a different device number.. That is, /dev/ttyUSB1 instead of /dev/ttyUSB0).

                @Reza said:
                0_1474903726513_12.jpg

                R 2 Replies Last reply
                1
                • tbowmoT tbowmo

                  @Reza

                  from the initial logs, after powerup, there is no FT232 listed in your lsusb listing, then you unplug and plug it again, and THEN the FT232 is present..

                  This IS not a bug in mysensors, as it's an HW chip (FT232) that your linux doesn't see before it's unplugged / plugged, it smells of a hardware issue with your nano. Now @sincze mentioned to you that he have had the same issues, and he cured it by exchanging the arduino, maybe it's worth a shot?

                  @awi also linked to a document, that describes how to make USB devices persistent in the naming (this can happen once in a while, that a USB device enumerates as a different device number.. That is, /dev/ttyUSB1 instead of /dev/ttyUSB0).

                  @Reza said:
                  0_1474903726513_12.jpg

                  R Offline
                  R Offline
                  Reza
                  wrote on last edited by Reza
                  #38

                  @tbowmo
                  thank you my friend . so this is related to my arduino totally . very very thank you
                  so i think , when complete gateway with a Rpi , this problem will be solved !!!

                  1 Reply Last reply
                  0
                  • tbowmoT tbowmo

                    @Reza

                    from the initial logs, after powerup, there is no FT232 listed in your lsusb listing, then you unplug and plug it again, and THEN the FT232 is present..

                    This IS not a bug in mysensors, as it's an HW chip (FT232) that your linux doesn't see before it's unplugged / plugged, it smells of a hardware issue with your nano. Now @sincze mentioned to you that he have had the same issues, and he cured it by exchanging the arduino, maybe it's worth a shot?

                    @awi also linked to a document, that describes how to make USB devices persistent in the naming (this can happen once in a while, that a USB device enumerates as a different device number.. That is, /dev/ttyUSB1 instead of /dev/ttyUSB0).

                    @Reza said:
                    0_1474903726513_12.jpg

                    R Offline
                    R Offline
                    Reza
                    wrote on last edited by
                    #39

                    @tbowmo
                    i test some arduino but all have this problem .
                    i have a question . is there a code in linux(Rpi) that after turn off/ on or reset Rpi (after some minutes) , usb port Be reset once !?
                    is there a ready code for this ?

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

                      @Reza

                      Not that I know of..

                      R 1 Reply Last reply
                      0
                      • tbowmoT tbowmo

                        @Reza

                        Not that I know of..

                        R Offline
                        R Offline
                        Reza
                        wrote on last edited by
                        #41

                        @tbowmo
                        I'm looking for a solution for this issue :)
                        thank you

                        1 Reply Last reply
                        0
                        • peerkersezuukerP Offline
                          peerkersezuukerP Offline
                          peerkersezuuker
                          wrote on last edited by
                          #42

                          I have the same problem, i posted a question at the Domoticz Forum :
                          Not reconnecting serial portt

                          Greetz Peer

                          Domoticz / My Sensors / Z-Wave
                          https://www.kermisbuks.nl

                          1 Reply Last reply
                          0
                          • bjacobseB Offline
                            bjacobseB Offline
                            bjacobse
                            wrote on last edited by
                            #43

                            Somehow I think it's more related to the linux kernel than it's a mysensors or Domticz related issue
                            I would start to check which linux kernel you are using with uname -a and then start to search from this
                            Maybe it could also be USB power related? Try to use a better USB power supply to your RPI
                            https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=53832

                            1 Reply Last reply
                            1
                            • dbemowskD Offline
                              dbemowskD Offline
                              dbemowsk
                              wrote on last edited by
                              #44

                              Why not connect the gateway to one of the onboard serial ports through the GPIO header? I have an Orange Pi which has a GPIO header that is pin compatible with the Raspberry Pi and I ran my gateway from there with no problems. I used pins 6, 8 and 10 which for me was /dev/ttyS3:
                              alt text
                              The trick in doing this with Domoticz is to create a synlink. The reason for this is that Domoticz looks for a ttyUSBxxx device, so with the symlink you are basically tricking Domoticz into thinking that the onboard serial port is USB. In my case I created a symlink for ttyS3 to ttyUSB30 like this:

                              sudo ln -s /dev/ttyS3 /dev/ttyUSB30
                              

                              This way you avoid having the problem of USB devices not being detected on boot.

                              Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
                              Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

                              1 Reply Last reply
                              1
                              • peerkersezuukerP Offline
                                peerkersezuukerP Offline
                                peerkersezuuker
                                wrote on last edited by
                                #45

                                Thank's for the answers to this problem.
                                They didn't work for me, but i think i solved mine.
                                Stop monitoring the serial port for data from a terminal session.
                                See my post at Domoticz forum.

                                Domoticz / My Sensors / Z-Wave
                                https://www.kermisbuks.nl

                                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