A good approach would be to use udev rules to create symlinks, then configure MH to use the appropriate symlinks. (/dev/caddx). You might be able to use the serial number as one option for ensuring the correct device gets the right symlinks created.

HTH!

/Mike
Sent from my iPhone 4

On 2012-10-24, at 0:07, Gianni Veloce <gianniveloce@yahoo.com> wrote:

Dear Jim
Thanks for your support.
The problem as you say happens intermittently but I have the suspicion that is accelerated by the number of serial events coming from the usb2toserial device.
As I have my Caddx alarm intergated to MH during weekends the motion sensors are giving more on-offs and then the problem happens even during 24hrs between the planned reboots.
Also I am not 100% sure yet that is device dependent. As usb2serial 4port devices cost more than 50 Euros I have further debuged the case.
When the disconnect happens dmesg shows the following messages and the problem is that when usb2serial reconnects it takes different ttyUSBxx names as the previous names seem allocated by the system (?) (I use ttyUSB0 1 and 3)
[3312642.098891] ftdi_sio 1-1.4:1.0: device disconnected
[3312642.344795] usb 1-1: new full speed USB device using uhci_hcd and address 10
[3312642.511893] usb 1-1: configuration #1 chosen from 1 choice
[3312642.514736] hub 1-1:1.0: USB hub found
[3312642.520138] hub 1-1:1.0: 4 ports detected
[3312642.876437] usb 1-1.1: new full speed USB device using uhci_hcd and address  11
[3312643.032615] usb 1-1.1: configuration #1 chosen from 1 choice
[3312643.038100] ftdi_sio 1-1.1:1.0: FTDI USB Serial Device converter detected
[3312643.038177] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[3312643.038514] usb 1-1.1: FTDI USB Serial Device converter now attached to ttyUSB2
[3312643.261122] usb 1-1.2: new full speed USB device using uhci_hcd and address 12
[3312643.419316] usb 1-1.2: configuration #1 chosen from 1 choice
[3312643.424925] ftdi_sio 1-1.2:1.0: FTDI USB Serial Device converter detected
[3312643.425008] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[3312643.425354] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB4
[3312643.633905] usb 1-1.3: new full speed USB device using uhci_hcd and address 13
[3312643.785083] usb 1-1.3: configuration #1 chosen from 1 choice
[3312643.787965] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[3312643.788037] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[3312643.788361] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB5
[3312643.996692] usb 1-1.4: new full speed USB device using uhci_hcd and address 14
[3312644.147904] usb 1-1.4: configuration #1 chosen from 1 choice
[3312644.154066] ftdi_sio 1-1.4:1.0: FTDI USB Serial Device converter detected
[3312644.154154] /build/buildd/linux-2.6.24/drivers/usb/serial/ftdi_sio.c: Detected FT232BM
[3312644.154491] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSb6

The case is similar to this posted in MH forum some time ago.
http://old.nabble.com/Device%3A%3ASerialPort-problem-on-ubuntu-td15911975.html

I am thinking to set udev rules to forcibly fix the ttyUSBxx device names, but not sure if this will work...
BTW I use Ubuntu 8.04.4 LTS (old I know) and kernel version is 2.6.24-32-generic #1 SMP

Any other ideas?

Thanks
GV



From: Jim Serack <jim@serack.ca>
To: 'Gianni Veloce' <gianniveloce@yahoo.com>
Sent: Monday, October 15, 2012 4:03 PM
Subject: RE: [mh] MH usb 2 serial problems

Gianni,
(Sorry about the typo)
 
The device would fail but not a hard failure – recover and then fail again. I don’t know about where in Europe you are but google for one should show you some vendors. (http://www.maplin.co.uk/usb-to-serial-9-pin-male-adaptor-29968, http://www.ebay.it/sch/i.html?_trksid=p5197.m570.l1313&_nkw=serial+to+USB&_sacat=0&_from=R40 (there are lots on ebay in Italy).
 
It’s been a long time ago that I had to play with the serial ports – I would look for some way to sniff the traffic and see if it is what you expect – at which point you are going to have to educate yourself as what to expect – hence the $15 check and see if it is hardware might be an easier tradeoff. This article will lead you down a USB monitoring path (http://biot.com/blog/usb-sniffing-on-linux) if that is way you want to go.
 
Jim
 
From: Gianni Veloce [mailto:gianniveloce@yahoo.com]
Sent: October-15-12 12:01 AM
To: Jim Serack
Subject: Re: [mh] MH usb 2 serial problems
 
Hi Jim
Thnx for the reply. My name is Gianni and am in Europe.
Do you have any contact for usb2serial supplier  in Europe? ( I use a 4-port device)
Then how can i debug the problem to verify it is due to the usb2serial and not to something else (computer hw-related to usb port, or sw-driver etc) to avoid spending 15+ Usd without reason.?
BTW what means that "
the device was intermittent"???

best regards
GV
 
 

From: Jim Serack <jim@serack.ca>
To: gianniveloce@yahoo.com; 'The main list for the MisterHouse home automation program' <misterhouse-users@lists.sourceforge.net>
Sent: Sunday, October 14, 2012 9:23 PM
Subject: RE: [mh] MH usb 2 serial problems
 
Gianna,
 
The USB to serial adapters should be readily available in about the $15 range in NA for 1:1. I use several on MH without issue (but had similar problems to yours in the past where the device was intermittent).
 
Jim
 
From: Gianni Veloce [mailto:gianniveloce@yahoo.com]
Sent: October-14-12 4:18 AM
To: The main list for the MisterHouse home automation program; jimbrotz@gmail.com
Subject: [mh] MH usb 2 serial problems
 
Dear MH friends
Using MH for the last 10 years i am enjoying this great an free sw capabilities in my house. But the few late years i do not receive email from this list and i though it may be dead (same as MH development?)
The reason to write this is that very recently my MH running on Ubuntu 9 (old i know) is giving problems connected  with the usb to serial adapter (ftdi chip) i use to connect serial devices as alarm, ibutton, x10 to it.
Specifically after some days of operation it started giving errors in mh shell window as "oops write failed" referring to serial adapter. This error can be simulated when unplugging the usb to serial adapter from power, but as i use a ups this seems not to be the real reason behind. I have tried as workaround a daily reboot of the system but has also happended once during the day....
Could you pls give some hint or advice to debug this? I can imagine that trying with another usb to serial adapter would be a good idea but i dont have one and is very rare and expensive to find...
Thanks in advance
Gv
Στάλθηκε από το Yahoo! Mail στο Android
 
 


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365