Re: [Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)

2012-12-06 Thread Denis Gottardello
> Dear Denis, did you see my solution? You can use ls to get the available
> ttyUSB devices attached and you can use ls to get the locks in the
> /var/lock folder. Please review my previous answer and see if that helps.

Thanks for your reply.
In order to guarantee the right operation of all programs I have implemented a 
restart of the device when  a serial interface will be unplug and replug.


-- 
Denis Gottardello
Sintesi S.r.l.
049.9301135

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)

2012-12-06 Thread Denis Gottardello
> So your OS is assigning different device names after reattaching? Sounds
> like a Linux problem, not a programming problem.
> Look at e.g. udev rules to persistently name the device ttyUSB0

Yes, you're right. But, read below:

1) Normal condition, /dev/ttyUSB0
2) Program starts and open USB0
3) Unplug USB0
4) Program closes USB0 and deletes the lock in /var/lock
5) Replug USB0
6) Now the serial interface is not USB0 but USB1. How the kernel remembers 
that USB0 was open from a still running program? The program has close USB0 
and removed the lock... Is there another directory - file where there is a 
lock?

Sorry for my bad English.

-- 
Denis Gottardello
Sintesi S.r.l.
049.9301135

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


Re: [Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)

2012-12-06 Thread Reinier Olislagers
On 6-12-2012 9:18, Denis Gottardello wrote:
> Hi everybody. I have a problem with usb serial interfaces on Linux. If a 
> serial device is disconnected from the machine and then reconnected, if 
> before 
> the serial had as name ttyUSB0, then it will assume ttyUSB1. Now the sequence:
> 1) The device is connected and has name ttyUSB0
> 2) The program open the serial interface.
> 3) The device will be unplugged.
> 4) The program has an exception and close the serial and wait till ttyUSB0 is 
> present.
> 5) Now the device is reattached but it will be ttyUSB1
> 
> For obtain ttyUSB0 I must close the program, unplug and replug.
> 
> How can I do for obtain ttyUSB0 when the program is running?

So your OS is assigning different device names after reattaching? Sounds
like a Linux problem, not a programming problem.
Look at e.g. udev rules to persistently name the device ttyUSB0


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)

2012-12-06 Thread Denis Gottardello
Hi everybody. I have a problem with usb serial interfaces on Linux. If a 
serial device is disconnected from the machine and then reconnected, if before 
the serial had as name ttyUSB0, then it will assume ttyUSB1. Now the sequence:
1) The device is connected and has name ttyUSB0
2) The program open the serial interface.
3) The device will be unplugged.
4) The program has an exception and close the serial and wait till ttyUSB0 is 
present.
5) Now the device is reattached but it will be ttyUSB1

For obtain ttyUSB0 I must close the program, unplug and replug.

How can I do for obtain ttyUSB0 when the program is running?


Up!


-- 
Denis Gottardello
Sintesi S.r.l.
049.9301135

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public


[Synalist] Synaser, /dev/ttyUSB* unplug problem (Linux)

2012-11-28 Thread Denis Gottardello
Hi everybody. I have a problem with usb serial interfaces on Linux. If a 
serial device is disconnected from the machine and then reconnected, if before 
the serial had as name ttyUSB0, then it will assume ttyUSB1. Now the sequence:
1) The device is connected and has name ttyUSB0
2) The program open the serial interface.
3) The device will be unplugged.
4) The program has an exception and close the serial and wait till ttyUSB0 is 
present.
5) Now the device is reattached but it will be ttyUSB1

For obtain ttyUSB0 I must close the program, unplug and replug.

How can I do for obtain ttyUSB0 when the program is running?


-- 
Denis Gottardello
Sintesi S.r.l.
049.9301135

--
Keep yourself connected to Go Parallel: 
INSIGHTS What's next for parallel hardware, programming and related areas?
Interviews and blogs by thought leaders keep you ahead of the curve.
http://goparallel.sourceforge.net
___
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public