Ask our Experts
Didn't find what you are looking for? Ask our experts!
Share Your Feedback – Help Us Improve Search on Community! Please take a few minutes to participate in our Search Feedback Survey. Your insights will help us deliver the results you need faster and more accurately. Click here to take the survey
Schneider Electric SpaceLogic KNX forum to get support and share knowledge including selection, installation and troubleshooting for spaceLYnk, Wiser for KNX, eConfigure KNX, SpaceLogic KNX Hybrid module and other topics.
Search in
Link copied. Please paste this link to share this article on your social media post.
Hello everyone,
I have a Lua script reading data from a Linky meter via an FT232 USB-to-serial converter connected to /dev/ttyUSB0.
My script has robust error handling and can detect communication failures, but sometimes the FT232 chip gets "stuck" and a simple USB reset is not sufficient to recover. The chip needs a complete power cycle (5V cut) to restart properly.
Currently I'm using a reset function from user library, but it only does a software USB reset which doesn't cut the 5V power supply.
Question: Is there a way from a Lua script (or system command via os.execute()) to completely cut and restore the 5V power supply to a USB port on the SL?
I've considered:
uhubctl (if available on SL)Any suggestions or experience with this kind of USB power management on SL?
Thanks in advance!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Thanks Erwin,
I already tried the function ('/dev/usb ctrl', 'low') it doesn't work. For now I use the reboot but I don't like this solution at all
BR
Link copied. Please paste this link to share this article on your social media post.
For those who are interested, here is the solution:
function hardResetUSB()
log("Hard reset USB FT232 - Méthode authorized")
-- Déauthoriser le device USB (coupe la communication)
os.execute('echo "0" > /sys/bus/usb/devices/1-1/authorized')
-- Attendre déconnexion complète
os.execute('sleep 3')
-- Réauthoriser le device USB (reconnecte)
os.execute('echo "1" > /sys/bus/usb/devices/1-1/authorized')
-- Attendre reconnexion et re-création de /dev/ttyUSB0
os.execute('sleep 3')
log("Hard reset USB terminé - FT232 réinitialisé")
end
Link copied. Please paste this link to share this article on your social media post.
Always target the source of the issue instead of putting bandages in place..
I would replace the USB dongle for a better one that probably keeps working..
You’ve reached the end of your document
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.