Hi,
Has anyone seen this too?
I'm using Synaser with Lazarus 1.0.8 on Lubuntu 13.04, and lsusb shows a HL-340 USB-Serial adapter.
When I connect /dev/ttyUSB0 the first time, everything works fine.
But after disconnecting (ser.free) I get error 5 (EIO) when I try to connect (ser.Connect('/dev/ttyUSB0') - after a new TBlockSerial.Create of course)
Looking into synaser.pas, the problem happens when calling fpOpen, as it returns -1 (and errno 5).
As it works the first time I suppose the port is not released properly.
I've tried with LinuxLock := false, purge, CloseSocket (those two are called by synaser anyway), I also added 300ms sleep between synaser function calls.
Synaser uses FileClose (fpClose repeated), I replaced it with fpClose to check for error, but no error there.
After disconnecting and reconnecting the USB-Serial cable it works again. Once.
This does not happen in WinXP.
Well, my wheels are spinning in the mud. Anyone's got a winch?
Thanks,
Adrien.