Re: Tcl can't access serial port



Per Hedeland <per@xxxxxxxxxxxx> wrote:
> In article <qtWDf.49010$PL5.20918@xxxxxxxxxxxxxxxxxxxxxxxxxx> bob

>>> Just guessing, but the changed onlcr could be the culprit - it's the
>>> "standard" setting that turns LF into CRLF on output, but it may
>>> interfere with sending commands to the printer.
>>
>>Just tried it, via the "ms" capability in printcap....no joy.
> 
> Well, see below - did it actually change the setting when running a
> print job? And I was only guessing:-), you might want to (try to) clear
> all flags that are set in 6.0 but not in 5.4.

Seemingly not, unless the system defaults are restored after the device file
is close. Don't know how to capture the data in that case....
 
>>> And you checked that you didn't have a getty running on the port? Or any
>>> other process for that matter...

Thanks for the clue about dropping the "u" option, the only gettys are 
running on ttyv* ports.


> I think you should have a look also at the .lock device - any flags set
> there are unchangeable on the "real" device, maybe on the .init device
> too (until you clear them on the lock device). This could explain both the
> failure of 'ms' above and your not being able to change .init (but we
> should be able to ignore .init if 'ms' is able to do what it should).

This is an interesting puzzle; it seems that /dev is depopulated on an
inactive root filesystem. Looks like the comparison has to be made between
running systems.  
 

[question on the origins of tty defaults]
> 
> Yeah, good question, they certainly don't live in /dev - i.e. they must
> come from the driver. There has been some shuffling around in sio(4) &
> Co in semi-recent times, in particular this change in sio.c seems
> "ominous":
> 
>  Revision 1.456, Wed Oct 13 08:27:20 2004 UTC (15 months, 2 weeks ago) by phk
>  Branch: MAIN
>  Changes since 1.455: +79 -521 lines
> 
>  Use generic tty code instead of local stuff.
> 
>  NB:  device names are now consistent:  {cua,tty}d$(port)[.lock,.init]
> 
> (not very recent perhaps, but it is only in 6.0, not 5.4) which among
> the diffs removes this:
> 
> -       /*
> -        * We don't use all the flags from <sys/ttydefaults.h> since they
> -        * are only relevant for logins.  It's important to have echo off
> -        * initially so that the line doesn't start blathering before the
> -        * echo flag can be turned off.
> -        */
> -       tp->t_init_in.c_iflag = 0;
> -       tp->t_init_in.c_oflag = 0;
> -       tp->t_init_in.c_cflag = TTYDEF_CFLAG;
> -       tp->t_init_in.c_lflag = 0;
> 
> Without the full 6.0 sources around I can't easily see the implications
> of this (i.e. what are those flags set to instead), but it seems like

If you can tell me how to extract the information I'd be happy to do it;
both 5.4 and 6.0 sources are readily at hand.

> 6.0 really *does* use <sys/ttydefaults.h> (except for echo actually
> being off) - breaking conventions that have been there since before
> there was a "Free" in FreeBSD, and against better judgement IMHO. And
> maybe it even locks down those settings, but it seems *too* improbable
> on second thought...

Unless the change troubles folks using serial consoles it's likely to go
unnoticed. I'm probably the only human being still using a serial printer
with FreeBSD and the second clause in that sentence is likely subject to 
debate 8-)

It's tempting to think this is a problem with the serial ports, but 
it would not be at all surprising if the lpd re-work is part of the
problem. I'll bet _nobody_ working on lpd has a serial PostScript printer
to use for testing. The Tcl folks have gone quiet on this thread, thats
a bad sign for my purposes. Without their pieces it's hard to assemble the
puzzle.

Thanks for reading and your good counsel.

bob prohaska



 



.



Relevant Pages

  • Re: Open Ports on Cisco Router
    ... bob bob wrote: ... > I have a Cisco 1720 router that showed telnet open ... > ports appear open when scanning at different times. ... > deny icmp any timestamp-request ...
    (Security-Basics)
  • Re: Blocking Ports
    ... Bob wrote: ... ports except 80. ... This is something you really need to do in your firewall/router. ... disregard the replies and advice from anyone you choose, ...
    (microsoft.public.windows.server.general)
  • RE: DMZ to SQL Server 2nd instance connection issue
    ... Bob, to connect to instances of SQL there are more ports required, 1434 from memory, you'll find info on this on TechNet if you search under SQL. ... > "Bob Robert" wrote: ...
    (microsoft.public.sqlserver.server)
  • Re: open command failing on serial port
    ... PCI card, the ports and irqs may be assigned dynamically at ... PCI slot the card is plugged into. ...
    (comp.unix.sco.misc)