On Friday, November 25, 2016 at 4:50:34 AM UTC-8, Richard Brown wrote: > > An update to this - I have done some more investigation and discovered > that in the 'Not Working' scenario the RTS output is mostly high but goes > low whilst the port is open, and in the 'Working' scenario the RTS output > has somehow been forced low and so stays low when the port is opened. > The Dongle gets reset by a high-to-low transition of RTS, so no falling > edge, no Reset and everything works. For reference my Dongle uses an FTDI > device (FT230X) and hence the FTDI driver supplied with the latest Raspbian > (Jessie) release. > > The question now, therefore, is how Web2py forces RTS low - either by the > saving of a file or when I access the index page of my Site, and How I can > replicate this in the Scheduler code! Using 'touch' to update the file does > not work, it has to be saved from within Web2py. > > Richard >
I can't imagine how saving the file causes RTS to go low. Web2py should not have any reason to do anything to the serial port on its own, and probably doesn't even know the serial port exists (it's only concerned with the console). (I haven't done any serial port handling under Ubuntu, nor on the RaspberryPi, so I can't tell you about any special tricks such ports need.) You may want to investigate having a separate program that gets started on system startup, runs forever, and holds the serial port open all the time. It can check for a file existing, write the current value to the file, and snooze again. Your scheduled task would the create the file, wait briefly, and then read the file to get the current value. I do know someone with a RaspberryPi, and he's a bit of hacker, but it will be next week before I see him again. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

