request help with tip and serial port problem

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

request help with tip and serial port problem

Fred Boatwright
Hello,

A user needs to connect to external equipment using tip and a serial port.

I created an /etc/remote file:
snake:br=9600:dv=/dev/tty01:hf:nb:pa=none

The group associated with /dev/tty01 was changed from dialer to one that
includes the user:
$ls -l /dev/tty01
crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01

Root can use tip and connect ok but if the user tries it:

$tip snake
/var/spool/lock/LCK...tty01:  No such file or directory
Can't open lock file.
all ports busy

I assume the user doesn't have permission to write to /var/spool/lock
and having root give the user rw permission on the port is probably not
the correct way to handle this.

How can I fix this problem?

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

patrick keshishian
On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:

> Hello,
>
> A user needs to connect to external equipment using tip and a serial port.
>
> I created an /etc/remote file:
> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>
> The group associated with /dev/tty01 was changed from dialer to one that
> includes the user:
> $ls -l /dev/tty01
> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01

so, the user is already in wheel group. Revert above change. Enable
sudo (if not already done so) for users in group wheel.

$ sudo -u uucp tip snake

--patrick


> Root can use tip and connect ok but if the user tries it:
>
> $tip snake
> /var/spool/lock/LCK...tty01:  No such file or directory
> Can't open lock file.
> all ports busy
>
> I assume the user doesn't have permission to write to /var/spool/lock and
> having root give the user rw permission on the port is probably not the
> correct way to handle this.
>
> How can I fix this problem?

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Nick Holland
On 07/12/10 19:32, patrick keshishian wrote:

> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>> Hello,
>>
>> A user needs to connect to external equipment using tip and a serial port.
>>
>> I created an /etc/remote file:
>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>
>> The group associated with /dev/tty01 was changed from dialer to one that
>> includes the user:
>> $ls -l /dev/tty01
>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>
> so, the user is already in wheel group. Revert above change. Enable
> sudo (if not already done so) for users in group wheel.
>
> $ sudo -u uucp tip snake
>
> --patrick

uh...if all else fails, do it as root?  I think we'd prefer to avoid
that, unless really a root-like activity.

The "dialer" group is set up just for this purpose.

The problem with changing the ownership (or group) of a device file is
the next upgrade will overwrite your ownership change.  Ask me how I
know.  Better idea, don't -- just use your imagination.

I'm not sure why you didn't just add that user to group "dialer", but it
is quite straight forward:

/home/nick $ grep nick /etc/group
wheel:*:0:root,nick
wsrc:*:9:nick
dialer:*:117:nick
nick:*:1000:

and...I (as "nick") have no trouble using my serial port without using
sudo and without changing device file ownership.

You will probably want to create a file /var/log/aculog which is
writable by group "dialer", as well... Squishes an error message, and
provides some useful logging, too.

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

patrick keshishian
On Mon, Jul 12, 2010 at 6:03 PM, Nick Holland
<[hidden email]> wrote:
> On 07/12/10 19:32, patrick keshishian wrote:
>> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>>> Hello,
>>>
>>> A user needs to connect to external equipment using tip and a serial
port.

>>>
>>> I created an /etc/remote file:
>>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>>
>>> The group associated with /dev/tty01 was changed from dialer to one that
>>> includes the user:
>>> $ls -l /dev/tty01
>>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>>
>> so, the user is already in wheel group. Revert above change. Enable
>> sudo (if not already done so) for users in group wheel.
>>
>> $ sudo -u uucp tip snake
>>
>> --patrick
>
> uh...if all else fails, do it as root?  I think we'd prefer to avoid
> that, unless really a root-like activity.

you saw root somewhere?

--patrick


> The "dialer" group is set up just for this purpose.
>
> The problem with changing the ownership (or group) of a device file is
> the next upgrade will overwrite your ownership change.  Ask me how I
> know.  Better idea, don't -- just use your imagination.
>
> I'm not sure why you didn't just add that user to group "dialer", but it
> is quite straight forward:
>
> /home/nick $ grep nick /etc/group
> wheel:*:0:root,nick
> wsrc:*:9:nick
> dialer:*:117:nick
> nick:*:1000:
>
> and...I (as "nick") have no trouble using my serial port without using
> sudo and without changing device file ownership.
>
> You will probably want to create a file /var/log/aculog which is
> writable by group "dialer", as well... Squishes an error message, and
> provides some useful logging, too.
>
> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Nick Holland
On 07/12/10 21:54, patrick keshishian wrote:
> On Mon, Jul 12, 2010 at 6:03 PM, Nick Holland
> <[hidden email]> wrote:
>> On 07/12/10 19:32, patrick keshishian wrote:
...

>>> $ sudo -u uucp tip snake
>>>
>>> --patrick
>>
>> uh...if all else fails, do it as root?  I think we'd prefer to avoid
>> that, unless really a root-like activity.
>
> you saw root somewhere?
>
> --patrick

yeah I did, but that doesn't mean it was there. :)
(i.e., "oops!" :)

Still...sudo is not needed for this process, and just adding to the
group "dialer" may be desirable over adding to "wheel"

Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Fred Boatwright
In reply to this post by Nick Holland
I restored the dialer group to /dev/tty01 and added the user to the
dialer group as Nick suggested.  It still doesn't work but the response
is different now.  I believe there is a cable problem now.  The cable
works with a Sun Ultra 10 but not with the PC running openbsd.

Thank you for the help.

Nick Holland wrote:

> On 07/12/10 19:32, patrick keshishian wrote:
>> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>>> Hello,
>>>
>>> A user needs to connect to external equipment using tip and a serial port.
>>>
>>> I created an /etc/remote file:
>>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>>
>>> The group associated with /dev/tty01 was changed from dialer to one that
>>> includes the user:
>>> $ls -l /dev/tty01
>>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>> so, the user is already in wheel group. Revert above change. Enable
>> sudo (if not already done so) for users in group wheel.
>>
>> $ sudo -u uucp tip snake
>>
>> --patrick
>
> uh...if all else fails, do it as root?  I think we'd prefer to avoid
> that, unless really a root-like activity.
>
> The "dialer" group is set up just for this purpose.
>
> The problem with changing the ownership (or group) of a device file is
> the next upgrade will overwrite your ownership change.  Ask me how I
> know.  Better idea, don't -- just use your imagination.
>
> I'm not sure why you didn't just add that user to group "dialer", but it
> is quite straight forward:
>
> /home/nick $ grep nick /etc/group
> wheel:*:0:root,nick
> wsrc:*:9:nick
> dialer:*:117:nick
> nick:*:1000:
>
> and...I (as "nick") have no trouble using my serial port without using
> sudo and without changing device file ownership.
>
> You will probably want to create a file /var/log/aculog which is
> writable by group "dialer", as well... Squishes an error message, and
> provides some useful logging, too.
>
> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Nicholas Marriott-2
And what is the response now?

You should be using cua01 not tty01.


On Tue, Jul 13, 2010 at 06:47:18AM -0600, fred wrote:

> I restored the dialer group to /dev/tty01 and added the user to the
> dialer group as Nick suggested.  It still doesn't work but the
> response is different now.  I believe there is a cable problem now.
> The cable works with a Sun Ultra 10 but not with the PC running
> openbsd.
>
> Thank you for the help.
>
> Nick Holland wrote:
> >On 07/12/10 19:32, patrick keshishian wrote:
> >>On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
> >>>Hello,
> >>>
> >>>A user needs to connect to external equipment using tip and a serial port.
> >>>
> >>>I created an /etc/remote file:
> >>>snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
> >>>
> >>>The group associated with /dev/tty01 was changed from dialer to one that
> >>>includes the user:
> >>>$ls -l /dev/tty01
> >>>crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
> >>so, the user is already in wheel group. Revert above change. Enable
> >>sudo (if not already done so) for users in group wheel.
> >>
> >>$ sudo -u uucp tip snake
> >>
> >>--patrick
> >
> >uh...if all else fails, do it as root?  I think we'd prefer to avoid
> >that, unless really a root-like activity.
> >
> >The "dialer" group is set up just for this purpose.
> >
> >The problem with changing the ownership (or group) of a device file is
> >the next upgrade will overwrite your ownership change.  Ask me how I
> >know.  Better idea, don't -- just use your imagination.
> >
> >I'm not sure why you didn't just add that user to group "dialer", but it
> >is quite straight forward:
> >
> >/home/nick $ grep nick /etc/group
> >wheel:*:0:root,nick
> >wsrc:*:9:nick
> >dialer:*:117:nick
> >nick:*:1000:
> >
> >and...I (as "nick") have no trouble using my serial port without using
> >sudo and without changing device file ownership.
> >
> >You will probably want to create a file /var/log/aculog which is
> >writable by group "dialer", as well... Squishes an error message, and
> >provides some useful logging, too.
> >
> >Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

J.C. Roberts-4
In reply to this post by Fred Boatwright
On Tue, 13 Jul 2010 06:47:18 -0600 fred <[hidden email]> wrote:
>
> I restored the dialer group to /dev/tty01 and added the user to the
> dialer group as Nick suggested.  It still doesn't work but the
> response is different now.  I believe there is a cable problem now.
> The cable works with a Sun Ultra 10 but not with the PC running
> openbsd.
>
> Thank you for the help.

Keeping with Nick's suggestion of not doing this as root or sudo,
another option is to use /etc/fbtab to *temporarily* change ownership or
permissions.

--
The OpenBSD Journal - http://www.undeadly.org

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Fred Boatwright
In reply to this post by Nicholas Marriott-2
Both cua01 and tty01 give the same result:

/dev/tty01:  Device not configured
link down

I believe it is a cable problem but I have not had time to resolve it yet.


Nicholas Marriott wrote:

> cua doesn't wait for handshaking, so it may work.
>
>
> On Tue, Jul 13, 2010 at 11:51:35AM -0600, fred wrote:
>> The response now is that the link is down.  The cable only uses rxd,
>> txd and sg.  The others are all tied together.  The Sun has at least
>> one signal pulling the others high but the pc does not.  I need to
>> add another wire to pull the handshake inputs high but won't have
>> time for that until late tonight.
>>
>> Fred
>>
>> Nicholas Marriott wrote:
>>> And what is the response now?
>>>
>>> You should be using cua01 not tty01.
>>>
>>>
>>> On Tue, Jul 13, 2010 at 06:47:18AM -0600, fred wrote:
>>>> I restored the dialer group to /dev/tty01 and added the user to the
>>>> dialer group as Nick suggested.  It still doesn't work but the
>>>> response is different now.  I believe there is a cable problem now.
>>>> The cable works with a Sun Ultra 10 but not with the PC running
>>>> openbsd.
>>>>
>>>> Thank you for the help.
>>>>
>>>> Nick Holland wrote:
>>>>> On 07/12/10 19:32, patrick keshishian wrote:
>>>>>> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> A user needs to connect to external equipment using tip and a serial port.
>>>>>>>
>>>>>>> I created an /etc/remote file:
>>>>>>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>>>>>>
>>>>>>> The group associated with /dev/tty01 was changed from dialer to one that
>>>>>>> includes the user:
>>>>>>> $ls -l /dev/tty01
>>>>>>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>>>>>> so, the user is already in wheel group. Revert above change. Enable
>>>>>> sudo (if not already done so) for users in group wheel.
>>>>>>
>>>>>> $ sudo -u uucp tip snake
>>>>>>
>>>>>> --patrick
>>>>> uh...if all else fails, do it as root?  I think we'd prefer to avoid
>>>>> that, unless really a root-like activity.
>>>>>
>>>>> The "dialer" group is set up just for this purpose.
>>>>>
>>>>> The problem with changing the ownership (or group) of a device file is
>>>>> the next upgrade will overwrite your ownership change.  Ask me how I
>>>>> know.  Better idea, don't -- just use your imagination.
>>>>>
>>>>> I'm not sure why you didn't just add that user to group "dialer", but it
>>>>> is quite straight forward:
>>>>>
>>>>> /home/nick $ grep nick /etc/group
>>>>> wheel:*:0:root,nick
>>>>> wsrc:*:9:nick
>>>>> dialer:*:117:nick
>>>>> nick:*:1000:
>>>>>
>>>>> and...I (as "nick") have no trouble using my serial port without using
>>>>> sudo and without changing device file ownership.
>>>>>
>>>>> You will probably want to create a file /var/log/aculog which is
>>>>> writable by group "dialer", as well... Squishes an error message, and
>>>>> provides some useful logging, too.
>>>>>
>>>>> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Sean Kamath
In reply to this post by J.C. Roberts-4
On Jul 14, 2010, at 3:55 AM, J.C. Roberts wrote:

> On Tue, 13 Jul 2010 06:47:18 -0600 fred <[hidden email]> wrote:
>>
>> I restored the dialer group to /dev/tty01 and added the user to the
>> dialer group as Nick suggested.  It still doesn't work but the
>> response is different now.  I believe there is a cable problem now.
>> The cable works with a Sun Ultra 10 but not with the PC running
>> openbsd.
>>
>> Thank you for the help.
>
> Keeping with Nick's suggestion of not doing this as root or sudo,
> another option is to use /etc/fbtab to *temporarily* change ownership or
> permissions.

Traditional (read: ancient) BSDs (such as 4.1 and 4.2 -- I'm not talking about
*recent* BSDs, mind you, I'm talking about BSD4.1 and BSD4.2 running on a Vax
780) had tip setgid to group 'uucp', with the locking system (i.e., files in a
directory owned by uucp:uucp) used by all modem-using apps setgid uucp as well
(i.e., uucico, cu, tip), as well as providing some form of access control to
the modems (by ownership permissions on the device) so that j-random person
couldn't just talk to the modem (since you could make tip do things like dial
the modem when you connect, etc).  That way users could use the modems when
UUCP traffic was idle, and vice versa, and you didn't have to worry about
collisions.  Arguably the "right" thing to do is something similar, but that
would involve an audit of 'tip' and 'cu' and probably a redesign of the whole
damn thing.  Something to consider doing once the infant is in college and
I've retired...

This ends out history lesson for the day, and we return you to our normal
discourse (and hopefully not more of the recent spate of trolls).

Sean

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Fred Boatwright
In reply to this post by Nicholas Marriott-2
I am sure the cable is ok.  The response from tip is:
/dev/tty01: Device not configured
link down

I connected a dumb terminal to the port to see if it expects a modem to
respond but this is not the case.

I tried:  echo "this is the time" >/dev/tty01
ksh: cannot create /dev/tty01: Device not configured

Before I added the user to the Dialer group, tip and the port would work
for root but it does not work for root now.  Maybe it is time for a reboot.



Nicholas Marriott wrote:

> cua doesn't wait for handshaking, so it may work.
>
>
> On Tue, Jul 13, 2010 at 11:51:35AM -0600, fred wrote:
>> The response now is that the link is down.  The cable only uses rxd,
>> txd and sg.  The others are all tied together.  The Sun has at least
>> one signal pulling the others high but the pc does not.  I need to
>> add another wire to pull the handshake inputs high but won't have
>> time for that until late tonight.
>>
>> Fred
>>
>> Nicholas Marriott wrote:
>>> And what is the response now?
>>>
>>> You should be using cua01 not tty01.
>>>
>>>
>>> On Tue, Jul 13, 2010 at 06:47:18AM -0600, fred wrote:
>>>> I restored the dialer group to /dev/tty01 and added the user to the
>>>> dialer group as Nick suggested.  It still doesn't work but the
>>>> response is different now.  I believe there is a cable problem now.
>>>> The cable works with a Sun Ultra 10 but not with the PC running
>>>> openbsd.
>>>>
>>>> Thank you for the help.
>>>>
>>>> Nick Holland wrote:
>>>>> On 07/12/10 19:32, patrick keshishian wrote:
>>>>>> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> A user needs to connect to external equipment using tip and a serial port.
>>>>>>>
>>>>>>> I created an /etc/remote file:
>>>>>>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>>>>>>
>>>>>>> The group associated with /dev/tty01 was changed from dialer to one that
>>>>>>> includes the user:
>>>>>>> $ls -l /dev/tty01
>>>>>>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>>>>>> so, the user is already in wheel group. Revert above change. Enable
>>>>>> sudo (if not already done so) for users in group wheel.
>>>>>>
>>>>>> $ sudo -u uucp tip snake
>>>>>>
>>>>>> --patrick
>>>>> uh...if all else fails, do it as root?  I think we'd prefer to avoid
>>>>> that, unless really a root-like activity.
>>>>>
>>>>> The "dialer" group is set up just for this purpose.
>>>>>
>>>>> The problem with changing the ownership (or group) of a device file is
>>>>> the next upgrade will overwrite your ownership change.  Ask me how I
>>>>> know.  Better idea, don't -- just use your imagination.
>>>>>
>>>>> I'm not sure why you didn't just add that user to group "dialer", but it
>>>>> is quite straight forward:
>>>>>
>>>>> /home/nick $ grep nick /etc/group
>>>>> wheel:*:0:root,nick
>>>>> wsrc:*:9:nick
>>>>> dialer:*:117:nick
>>>>> nick:*:1000:
>>>>>
>>>>> and...I (as "nick") have no trouble using my serial port without using
>>>>> sudo and without changing device file ownership.
>>>>>
>>>>> You will probably want to create a file /var/log/aculog which is
>>>>> writable by group "dialer", as well... Squishes an error message, and
>>>>> provides some useful logging, too.
>>>>>
>>>>> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Fred Boatwright
I would be happy to include a dmesg report but have not been able to
figure out how to copy and paste into Thunderbird 2.0.0.22.  However,
from looking at the dmesg output, com1 is apparently configured but com2
is not mentioned.  I don't care which serial port works.

A reboot did not solve the problem.  I changed /etc/remote to use tty00
and tip works now.

The problem appears to be solved.  Thank you for the help!

Fred

fred wrote:

> I am sure the cable is ok.  The response from tip is:
> /dev/tty01: Device not configured
> link down
>
> I connected a dumb terminal to the port to see if it expects a modem to
> respond but this is not the case.
>
> I tried:  echo "this is the time" >/dev/tty01
> ksh: cannot create /dev/tty01: Device not configured
>
> Before I added the user to the Dialer group, tip and the port would work
> for root but it does not work for root now.  Maybe it is time for a reboot.
>
>
>
> Nicholas Marriott wrote:
>> cua doesn't wait for handshaking, so it may work.
>>
>>
>> On Tue, Jul 13, 2010 at 11:51:35AM -0600, fred wrote:
>>> The response now is that the link is down.  The cable only uses rxd,
>>> txd and sg.  The others are all tied together.  The Sun has at least
>>> one signal pulling the others high but the pc does not.  I need to
>>> add another wire to pull the handshake inputs high but won't have
>>> time for that until late tonight.
>>>
>>> Fred
>>>
>>> Nicholas Marriott wrote:
>>>> And what is the response now?
>>>>
>>>> You should be using cua01 not tty01.
>>>>
>>>>
>>>> On Tue, Jul 13, 2010 at 06:47:18AM -0600, fred wrote:
>>>>> I restored the dialer group to /dev/tty01 and added the user to the
>>>>> dialer group as Nick suggested.  It still doesn't work but the
>>>>> response is different now.  I believe there is a cable problem now.
>>>>> The cable works with a Sun Ultra 10 but not with the PC running
>>>>> openbsd.
>>>>>
>>>>> Thank you for the help.
>>>>>
>>>>> Nick Holland wrote:
>>>>>> On 07/12/10 19:32, patrick keshishian wrote:
>>>>>>> On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> A user needs to connect to external equipment using tip and a
>>>>>>>> serial port.
>>>>>>>>
>>>>>>>> I created an /etc/remote file:
>>>>>>>> snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
>>>>>>>>
>>>>>>>> The group associated with /dev/tty01 was changed from dialer to
>>>>>>>> one that
>>>>>>>> includes the user:
>>>>>>>> $ls -l /dev/tty01
>>>>>>>> crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
>>>>>>> so, the user is already in wheel group. Revert above change. Enable
>>>>>>> sudo (if not already done so) for users in group wheel.
>>>>>>>
>>>>>>> $ sudo -u uucp tip snake
>>>>>>>
>>>>>>> --patrick
>>>>>> uh...if all else fails, do it as root?  I think we'd prefer to avoid
>>>>>> that, unless really a root-like activity.
>>>>>>
>>>>>> The "dialer" group is set up just for this purpose.
>>>>>>
>>>>>> The problem with changing the ownership (or group) of a device
>>>>>> file is
>>>>>> the next upgrade will overwrite your ownership change.  Ask me how I
>>>>>> know.  Better idea, don't -- just use your imagination.
>>>>>>
>>>>>> I'm not sure why you didn't just add that user to group "dialer",
>>>>>> but it
>>>>>> is quite straight forward:
>>>>>>
>>>>>> /home/nick $ grep nick /etc/group
>>>>>> wheel:*:0:root,nick
>>>>>> wsrc:*:9:nick
>>>>>> dialer:*:117:nick
>>>>>> nick:*:1000:
>>>>>>
>>>>>> and...I (as "nick") have no trouble using my serial port without
>>>>>> using
>>>>>> sudo and without changing device file ownership.
>>>>>>
>>>>>> You will probably want to create a file /var/log/aculog which is
>>>>>> writable by group "dialer", as well... Squishes an error message, and
>>>>>> provides some useful logging, too.
>>>>>>
>>>>>> Nick.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Owain Ainsworth-2
In reply to this post by Fred Boatwright
On Thu, Jul 15, 2010 at 07:23:21AM -0600, fred wrote:
> I am sure the cable is ok.  The response from tip is:
> /dev/tty01: Device not configured
> link down

Are you sure that tty01 is the device that you want?

please post a dmesg saying which port it is that you wish to poke, i
can't find one in the thread so far.

-0-
--
A language that doesn't affect the way you think about programming is
not worth knowing.

Reply | Threaded
Open this post in threaded view
|

Re: request help with tip and serial port problem

Paul de Weerd
In reply to this post by Fred Boatwright
I think Owain is on to something here...

        [weerd@desktop] $ cu -l /dev/tty01
        /dev/tty01: Device not configured
        link down
        [weerd@desktop] $ cu -l /dev/tty00
        can't open log file /var/log/aculog.
        Connected

You don't seem to have a /dev/tty01 device. Check that you
a) actually have the device
b) it has the correct device major/minor and type
c) you don't have a "special" kernel without the driver
d) your BIOS has COM2 disabled
e) another reason is preventing the kernel from knowing about this
   device

I'm really hoping you're not mistakenly assuming COM1 to be /dev/tty01
(COM1 is tty00). Most of these problems would've been easily
identified had you sent your dmesg along in the first post...

Paul 'WEiRD' de Weerd

On Thu, Jul 15, 2010 at 07:23:21AM -0600, fred wrote:
| I am sure the cable is ok.  The response from tip is:
| /dev/tty01: Device not configured
| link down
|
| I connected a dumb terminal to the port to see if it expects a modem
| to respond but this is not the case.
|
| I tried:  echo "this is the time" >/dev/tty01
| ksh: cannot create /dev/tty01: Device not configured
|
| Before I added the user to the Dialer group, tip and the port would
| work for root but it does not work for root now.  Maybe it is time
| for a reboot.
|
|
|
| Nicholas Marriott wrote:
| >cua doesn't wait for handshaking, so it may work.
| >
| >
| >On Tue, Jul 13, 2010 at 11:51:35AM -0600, fred wrote:
| >>The response now is that the link is down.  The cable only uses rxd,
| >>txd and sg.  The others are all tied together.  The Sun has at least
| >>one signal pulling the others high but the pc does not.  I need to
| >>add another wire to pull the handshake inputs high but won't have
| >>time for that until late tonight.
| >>
| >>Fred
| >>
| >>Nicholas Marriott wrote:
| >>>And what is the response now?
| >>>
| >>>You should be using cua01 not tty01.
| >>>
| >>>
| >>>On Tue, Jul 13, 2010 at 06:47:18AM -0600, fred wrote:
| >>>>I restored the dialer group to /dev/tty01 and added the user to the
| >>>>dialer group as Nick suggested.  It still doesn't work but the
| >>>>response is different now.  I believe there is a cable problem now.
| >>>>The cable works with a Sun Ultra 10 but not with the PC running
| >>>>openbsd.
| >>>>
| >>>>Thank you for the help.
| >>>>
| >>>>Nick Holland wrote:
| >>>>>On 07/12/10 19:32, patrick keshishian wrote:
| >>>>>>On Mon, Jul 12, 2010 at 2:58 PM, fred <[hidden email]> wrote:
| >>>>>>>Hello,
| >>>>>>>
| >>>>>>>A user needs to connect to external equipment using tip and a serial port.
| >>>>>>>
| >>>>>>>I created an /etc/remote file:
| >>>>>>>snake:br=9600:dv=/dev/tty01:hf:nb:pa=none
| >>>>>>>
| >>>>>>>The group associated with /dev/tty01 was changed from dialer to one that
| >>>>>>>includes the user:
| >>>>>>>$ls -l /dev/tty01
| >>>>>>>crw-rw---- 1 uucp wheel  8,  1 Feb  7  09:38 /dev/tty01
| >>>>>>so, the user is already in wheel group. Revert above change. Enable
| >>>>>>sudo (if not already done so) for users in group wheel.
| >>>>>>
| >>>>>>$ sudo -u uucp tip snake
| >>>>>>
| >>>>>>--patrick
| >>>>>uh...if all else fails, do it as root?  I think we'd prefer to avoid
| >>>>>that, unless really a root-like activity.
| >>>>>
| >>>>>The "dialer" group is set up just for this purpose.
| >>>>>
| >>>>>The problem with changing the ownership (or group) of a device file is
| >>>>>the next upgrade will overwrite your ownership change.  Ask me how I
| >>>>>know.  Better idea, don't -- just use your imagination.
| >>>>>
| >>>>>I'm not sure why you didn't just add that user to group "dialer", but it
| >>>>>is quite straight forward:
| >>>>>
| >>>>>/home/nick $ grep nick /etc/group
| >>>>>wheel:*:0:root,nick
| >>>>>wsrc:*:9:nick
| >>>>>dialer:*:117:nick
| >>>>>nick:*:1000:
| >>>>>
| >>>>>and...I (as "nick") have no trouble using my serial port without using
| >>>>>sudo and without changing device file ownership.
| >>>>>
| >>>>>You will probably want to create a file /var/log/aculog which is
| >>>>>writable by group "dialer", as well... Squishes an error message, and
| >>>>>provides some useful logging, too.
| >>>>>
| >>>>>Nick.
|

--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
                 http://www.weirdnet.nl/