From: Martin Gregorie on
On Wed, 17 Dec 2008 01:32:43 +0000, Unruh wrote:

> Martin Gregorie <martin(a)see.sig.for.address.invalid> writes:
>
>>On Tue, 16 Dec 2008 19:05:38 +0000, Unruh wrote:
>
>>> Martin Gregorie <martin(a)see.sig.for.address.invalid> write> Well,
>>> since the usb port has a 5 V power supply, using that to power the
>>> receiver is trivial. Then the question is whether or not one can drive
>>> the signal lines of the usb appropriately is the only question. I am
>>> not sure how or how well the usb-serial ports mimic the control lines.
>>> But that would seem to me to be the best bet for you.
>>>
>>Why do you think that's better than adding a PCI card with a few more
>>pukka serial ports?
>
> That is fine too. But I though that you doubted that you actually had a
> spare PCI card port.
>
The mobo has three PCI 2.2 slots. One is longer than the other two but
I'm told that the six-port card should be fine in it. Besides its only a
tenner plus VAT and, in the unlikely event of it all turning to worms, I
can use the two real ports for the logger and MSF receiver and move the
serial connection to my OS-9 box to the USB adapter.

I've connected to the OS-9 box through the same USB adapter in the past,
but I'd prefer to avoid that as a permant solution.


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
From: Theo Markettos on
Martin Gregorie <martin(a)see.sig.for.address.invalid> wrote:
> FYI, this part of the WINE config has changed entirely: .wine/wine.conf
> no longer exists. Instead, you configure non-default serial ports by
> putting COMx symlinks in .wine/dosdevices alongside the drive letter
> definitions.
>
> Anyway, I tried linking COM2, COM3, COM2: and COM3: to /dev/ttyUSB0 but
> without any success for any of them. I know that's the right name for the
> USB adapter because I could see it in /var/log/messages when I plugged
> the adapter in. None of these allowed the downloader to see the EW logger.

Ah, that'll be what I'd forgotten. There was nothing else in my wine.conf
which looked a bit odd. And now I look in .wine/dosdevices I see:

lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 22:00 com2 -> /dev/ttyUSB0
lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:57 COM2 -> /dev/ttyUSB0
lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:55 COM2: -> /dev/ttyUSB0

looks like I had the same problem :(

It was for a mobile phone unlocker which reported no information other than
'error' - it just didn't work. So I had to try all sorts of things.
Eventually it turned out to be a duff cable (which has a USB-RS232 adaptor
built in).

I should probably give it a try with a known-working adaptor at some
point...

Theo
From: Martin Gregorie on
On Wed, 17 Dec 2008 21:45:38 +0000, Theo Markettos wrote:

>
> Ah, that'll be what I'd forgotten. There was nothing else in my
> wine.conf which looked a bit odd. And now I look in .wine/dosdevices I
> see:
>
> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 22:00 com2 -> /dev/ttyUSB0
> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:57 COM2 -> /dev/ttyUSB0
> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:55 COM2: -> /dev/ttyUSB0
>
> looks like I had the same problem :(
>
> It was for a mobile phone unlocker which reported no information other
> than 'error' - it just didn't work. So I had to try all sorts of
> things. Eventually it turned out to be a duff cable (which has a
> USB-RS232 adaptor built in).
>
I know my adapter is working because I just tried using it for the
terminal connection to my OS-9 box with kermit as the Linux end.

I've realised there's another snag with USB. The /dev/ttyUSBx device file
vanishes when the adapter is disconnected and is recreated when its
plugged back in. The problem is that this sets its permissions to "rw"
for root and its group while I'm running WINE as a normal user. I've
manually used "sudo chmod uga+rw /dev/ttyUSB0" as a temporary fix. This
is OK for experimenting but not for normal use. In any case it doesn't
actually help the situation: the WINE app still can't see it.

I've run into a similar permission problem in the past with the serial
ports ( /dev/ttyS[0-3] ), because the permissions get reset at boot time.
I'm currently kludging it for these ports by putting a chmod command in
/etc/rc.d/rc.local but this obviously won't work for the USB-serial
adapter since its probably not plugged in at boot time.

I'm sure I'm missing the obvious, but can anybody show me a better way to
fix the serial port permissions than my rc.local kludge and also a way to
set more appropriate permissions when the ttyUSBn device file is created.

TIA


--
martin@ | Martin Gregorie
gregorie. | Essex, UK
org |
From: Unruh on
Martin Gregorie <martin(a)see.sig.for.address.invalid> writes:

>On Wed, 17 Dec 2008 21:45:38 +0000, Theo Markettos wrote:

>>
>> Ah, that'll be what I'd forgotten. There was nothing else in my
>> wine.conf which looked a bit odd. And now I look in .wine/dosdevices I
>> see:
>>
>> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 22:00 com2 -> /dev/ttyUSB0
>> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:57 COM2 -> /dev/ttyUSB0
>> lrwxrwxrwx 1 atm26 atm26 12 2008-02-13 21:55 COM2: -> /dev/ttyUSB0
>>
>> looks like I had the same problem :(
>>
>> It was for a mobile phone unlocker which reported no information other
>> than 'error' - it just didn't work. So I had to try all sorts of
>> things. Eventually it turned out to be a duff cable (which has a
>> USB-RS232 adaptor built in).
>>
>I know my adapter is working because I just tried using it for the
>terminal connection to my OS-9 box with kermit as the Linux end.

>I've realised there's another snag with USB. The /dev/ttyUSBx device file
>vanishes when the adapter is disconnected and is recreated when its
>plugged back in. The problem is that this sets its permissions to "rw"
>for root and its group while I'm running WINE as a normal user. I've
>manually used "sudo chmod uga+rw /dev/ttyUSB0" as a temporary fix. This
>is OK for experimenting but not for normal use. In any case it doesn't
>actually help the situation: the WINE app still can't see it.

>I've run into a similar permission problem in the past with the serial
>ports ( /dev/ttyS[0-3] ), because the permissions get reset at boot time.
>I'm currently kludging it for these ports by putting a chmod command in
>/etc/rc.d/rc.local but this obviously won't work for the USB-serial
>adapter since its probably not plugged in at boot time.

>I'm sure I'm missing the obvious, but can anybody show me a better way to
>fix the serial port permissions than my rc.local kludge and also a way to
>set more appropriate permissions when the ttyUSBn device file is created.

Cannot tell you how but suggest you look at the hotplug stuff-- eg
/etc/udev/rules.d/70-hotplug_map.rules or other files in that directory.


>TIA


>--
>martin@ | Martin Gregorie
>gregorie. | Essex, UK
>org |
From: Theo Markettos on
Unruh <unruh-spam(a)physics.ubc.ca> wrote:
> Cannot tell you how but suggest you look at the hotplug stuff-- eg
> /etc/udev/rules.d/70-hotplug_map.rules or other files in that directory.

Indeed. Depending on how old your distro is, it'll either be hotplug (quite
old now) or udev. You'll have to look up the docs for each.

On my work machine I have udev, with the following in a file in
/etc/udev/rules.d/

KERNEL=="ttyS0", NAME="%k", MODE="0667", OPTIONS="last_rule", OWNER="1941"
(where '1941' is the numeric UID for my account)

If you swap that for KERNEL=="ttyUSB[0-2]" that might do the trick. You
might need to restart udev or reboot for this to take effect.

Theo
First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4 5 6 7 8
Prev: World domination foiled again...
Next: Missing?