HylaFAX The world's most advanced open source fax server

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

[hylafax-users] Configuration change for USB modem



OK. Thanks to your suggestions we found a solution.

Initially did not works because once set a modem with a name and added line in the inittab file for faxgetty, faxgetty prevents proper use and the modem answers with strange characters and locks in minicom. It was necessary to remove modems from inittab and restart inittab. Then everything has worked well.

 

We post solution for everyone interested for CentOS 5.

-          Mapping USB modem devices statically to USB port:

 

We found only USB port for static mapping with udev as cannot we find other info (like modem serial number or something like that).

Launch udevinfo command to get device infos:

udevinfo -a -p /sys/class/tty/ttyUSB0

 

Output:                                              

                        Udevinfo starts with the device specified by the devpath and then

                        walks up the chain of parent devices. It prints for every device

                        found, all possible attributes in the udev rules key format.

                        A rule to match, can be composed by the attributes of the device

                        and the attributes from one single parent device.

                                                              

                        looking at device '/class/tty/ttyUSB0':

                        KERNEL=="ttyUSB0"

                        SUBSYSTEM=="tty"

                        SYSFS{dev}=="188:0"

                                                              

                        looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/ttyUSB0':

                        ID=="ttyUSB0"

                        BUS=="usb-serial"

                        DRIVER=="pl2303"

                                                              

                        looking at parent device '/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0':

                        ID=="3-1:1.0"

                        BUS=="usb"

                        DRIVER=="pl2303"

                        SYSFS{modalias}=="usb:v0557p2008d0300dc00dsc00dp00icFFisc00ip00"

                        SYSFS{bInterfaceProtocol}=="00"

                        SYSFS{bInterfaceSubClass}=="00"

                        SYSFS{bInterfaceClass}=="ff"

                        SYSFS{bNumEndpoints}=="03"

                        SYSFS{bAlternateSetting}==" 0"

                        SYSFS{bInterfaceNumber}=="00"

                        ...

                        ...

                              

              From above, we can use KERNEL and ID to identify USB port number:

                       KERNEL=="ttyUSB0"

                          ID=="3-1:1.0"

                     

                       Add file for our new udev rule in /etc/udev/rules.d:

                          vi /etc/udev/rules.d/10-apslocal.rules

 

                       Add this line in 10-apslocal.rules:

                          KERNEL=="ttyUSB*", ID=="3-1:1.0", SYMLINK+="apsfax429"

                                  For example:

                               KERNEL=="ttyUSB*", ID=="3-1:1.0", SYMLINK+="apsfax429"

                                                                                                             

                          Restart udev:

                             start_udev

                              

                          Change or add line in for faxgetty in /etc/inittab:

                                    t0:2345:respawn:/usr/sbin/faxgetty apsfax429

                                              

                               Use minicom to check modem. If you have problem communicating with modem (unresponsiveness, lock, ...), it means faxgetty lock modem previously configured. so:

                             - stop Hylafax

                             - delete modem from hylafax

                             - delete or comment out faxgetty line for old device (ttyUSB0, ...) then

                             - restart inittab with "init q" command or restart machine

                             - check with minicom

                             - if all works faxaddmodem to hylafax and restart hylafax

 

Best Regards.




Project hosted by iFAX Solutions