lost serial gateway after un plug power Rpi
-
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.
-
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 outputthe 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.
@tbowmo
now i run this
lsusb-> provide the output
unplug / plug the usb device
once more in your terminal
lsusb
-> provide outputthe 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

-
@Reza just to be sure: unplug power you mean:
Unplug the power cord from raspberry right?
Not unplug and replug FTDI device?@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...) -
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:

-
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:

-
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:

-
I have the same problem, i posted a question at the Domoticz Forum :
Not reconnecting serial porttGreetz Peer
-
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 -
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:
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/ttyUSB30This way you avoid having the problem of USB devices not being detected on boot.
-
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.
