gnokii-users
[Top][All Lists]
Advanced

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

Re: GSM device in virtual serial port via USB


From: Vieri
Subject: Re: GSM device in virtual serial port via USB
Date: Wed, 2 Sep 2009 09:28:20 -0700 (PDT)

--- On Mon, 8/31/09, Vieri <address@hidden> wrote:

> --- On Mon, 8/31/09, Pawel Kot <address@hidden>
> wrote:
> 
> > On Mon, Aug 31, 2009 at 12:44, Vieri<address@hidden>
> > wrote:
> > > Actually, after defining this udev rule:
> > >
> > > SUBSYSTEMS=="usb", ATTRS{product}=="usb serial
> > converter", ATTRS{manufacturer}=="FTDI",
> > ATTRS{serial}=="FTCTWS1T",
> SYMLINK+="ttyUSB-GSM-630725830"
> > >
> > > and after unplugging and re-connecting the USB
> cable
> > to the system, gnokii fails if trying to communicate
> with
> > port ttyUSB-GSM-630725830:
> > >
> > > Gnokii serial_open: tcgetattr: Inappropriate
> ioctl for
> > device
> > > Couldn't open ATBUS device: Inappropriate ioctl
> for
> > device
> > > Telephone interface init failed: Command failed.
> > >
> > > (it was working well before disconnecting the
> USB
> > cable)
> > >
> > > /dev/ttyUSB0 is still present and if I tell
> gnokii to
> > use /dev/ttyUSB0 instead of /dev/ttyUSB-GSM-630725830
> then
> > it works fine.
> > >
> > > Can someone please shed some light here?
> > 
> > Just guessing: probably it's a problem that it's a
> symlink.
> > You would
> > need to check it in Linux kernel sources.
> > What I can advice is not to create symlink but device
> file
> > itself (I
> > think: NAME="ttyUSB-GSM-...", but please verify).
> 
> Thanks for the feedback but I tried NAME="ttyUSB-GSM-..."
> but the result is almost the same, or even worse:
> 
> ttyUSB0 is NOT created; only ttyUSB-GSM-... is created (as
> expected).
> 
> At first, gnokii works fine with the NAMEd device.
> 
> However, if I unplug the USB cable and plug it in again,
> ttyUSB-GSM-... is apparently still available in /dev/ but
> gnokii fails to communicate with the device (the error
> messages are the same (tcgetattr: Inappropriate ioctl for
> device...).
> 
> At this point, no matter where I plug the USB and how many
> times I do it, gnokii keeps failing.
> 
> I'll have to get my feet wet with udev...


Well, I think I can guess what the problem is but I have no idea how to fix it.

ttyUSB0 is a virtual serial port and always works.
The SYMLINK I create with my custom udev rule points to something like 
bus/usb/001/003 after a usb cable re-connect...
I don't know why the FIRST time "SYMLINK+=" or "NAME=" is processed by udev, 
gnokii works fine with the device path. However, when the device is 
"regenerated" after replugging the USB cable, *maybe* udev is creating the 
SYMLINK or NAME to point to the USB device and not the "virtual serial port". 
That would explain why the AT driver within Gnokii fails with an "Inappropriate 
ioctl"; it was expecting serial but got usb. I don't know if any of this makes 
sense.

Does anyone on this mailing list know how virtual serial ports connected via 
usb and UDEV actually work? Or if they can work together?
Or maybe it's the kernel driver I'm using that's not doing all it's supposed to 
do.

Thanks,

Vieri



      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]