Andrew Hogue | 7 Oct 2003 17:37
Picon

Hanging on Reads

Hi,

I'm currently experiencing a problem with my serial port code and was
hoping that someone has a solution to this problem.

Basically, I open the serial port, set the attributes, write to the device
and then since I expect a response, I call read(), but it seems to hang on
the read indefinitely.

The weird thing is that there is a workaround to this problem which makes
everything work, but it is ugly.

The workaround is to simply open() the serial port, close() the serial
port and then re-open it at the beginning of the program.

Here is a piece of my code,

/* stupid workaround here */
f = fopen(SERIALPORT, O_RDWR);
close(f);

f = fopen(SERIALPORT, O_RDWR);
...
	tcgetattr(f,&termold);
	term.c_cflag = B38400 | CS8 | CLOCAL | CREAD;
	term.c_iflag = 0;
	term.c_oflag = 0;
	term.c_lflag = 0;
	term.c_cc[VMIN] = 1;
	term.c_cc[VTIME] = 0;
(Continue reading)

Sampath Kumar | 10 Oct 2003 16:57

Non-standard baud rate setting 14400 ..Possible?

Hello ,

Is there a way to set the serial port on the i386 Linux 2.4.17 at non
standard baud rates like 14400,28800,etc.?

Regards
Sampath

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Gerald Emig | 10 Oct 2003 19:58
Picon

Re: Non-standard baud rate setting 14400 ..Possible?


There is no such way;
main reason is that the serial hardware does not support these data
speeds (even under Win***).

But as I see from the rates that you mention, it seems that you talk via
a modem. Note that modem speed and speed of the serial port are two
different things. Modem speeds are normally handled by the modem
(automatically or by AT-commands), not by the linux serial driver.

I hope this helps, but feel free to ask more questions.

On Fri, 10 Oct 2003 20:27:59 +0530
"Sampath Kumar" <sampath <at> spartanlabs.com> wrote:

> Hello ,
> 
> Is there a way to set the serial port on the i386 Linux 2.4.17 at non
> standard baud rates like 14400,28800,etc.?
> 
> Regards
> Sampath
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-serial" in the body of a message to majordomo <at> vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--

-- 
(Continue reading)

rich+ml | 10 Oct 2003 23:41

Re: Non-standard baud rate setting 14400 ..Possible?

Why not? Uart baud rate is 115200/divisor, use 4 for 28800, 5 for 14400.  
But you are right it is better to set uart to highest possible baud and
let modem convert, esp. if V.42bis compression is used.

On Fri, 10 Oct 2003, Gerald Emig wrote:

> Date: Fri, 10 Oct 2003 19:58:49 +0200
> From: Gerald Emig <gme <at> emig-software.de>
> To: Sampath Kumar <sampath <at> spartanlabs.com>
> Cc: linux-serial <at> vger.kernel.org
> Subject: Re: Non-standard baud rate setting 14400 ..Possible?
> 
> 
> There is no such way;
> main reason is that the serial hardware does not support these data
> speeds (even under Win***).
> 
> But as I see from the rates that you mention, it seems that you talk via
> a modem. Note that modem speed and speed of the serial port are two
> different things. Modem speeds are normally handled by the modem
> (automatically or by AT-commands), not by the linux serial driver.
> 
> I hope this helps, but feel free to ask more questions.
> 
> 
> 
> On Fri, 10 Oct 2003 20:27:59 +0530
> "Sampath Kumar" <sampath <at> spartanlabs.com> wrote:
> 
> > Hello ,
(Continue reading)

David Lawyer | 11 Oct 2003 01:08
Favicon

Re: Non-standard baud rate setting 14400 ..Possible?

On Fri, Oct 10, 2003 at 08:27:59PM +0530, Sampath Kumar wrote:
> Hello ,
> 
> Is there a way to set the serial port on the i386 Linux 2.4.17 at non
> standard baud rates like 14400,28800,etc.?
Since the baud-base of 115,200 is divisible by these numbers you can do
it.  Use a divisor of 8 to get 14400.

But the speed of transmission over a serial line can be any rate at all,
provided it's under the serial port speed selected.  For example, if
it's  been set for 115,200 I can (sort of) send bits at 96,049.37
bits/sec.  Each byte is sent at 115,200 bits/sec but there is a rest
period after each byte to result in 96,049.37 bits/sec average.  One may
calculate that for this example that there will be a 1.817 micro-sec
pause after the transmission of each byte during which time the line is
held at mark (-12 v) beyond the end of the stop bit (which also happens
to be mark).  This is like inserting extra long stop bits so as to
adjust for the correct speed.  

			David Lawyer
-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Sampath Kumar | 13 Oct 2003 15:02

How to check whether the last character in the serial port is flushed/sent.

Hello all
How to check whether the last character sent to the serial port has been
sent . And the port has nothing in its buffer to send?
Regards
sampath

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Michael V. David | 19 Oct 2003 13:57

RocketModemII under Linux kernel 2.6.0-test8

I have two RocketModemII 4-modem PCI boards installed in a PC clone running
Linux kernel 2.6.0-test8, using the Rocket driver included with the kernel,
compiled as a module, as recommended in Comtrol's documentation. I have the
latest software from the Comtrol site (v2.04/1800024H.tgz). The rc.rocket
script runs on startup, and finds all 8 ports. The firmware is uploaded. The
active lines can be opened with minicom, and act like serial lines with
modems attached, responding appropriately to the documented AT commands.
Normally, I run mgetty to allow tty logins on some of the modem lines.
Nothing in the kernel files or the Comtrol software has been changed from
the defaults.

When I dial in with a terminal program, the line is answered and I can log
in. I use the bash shell. If I type a command line that produces less than
256 bytes of output, I get the expected output. If it produces more than 256
bytes of output, I get approximately 256 bytes of the expected output, and
then something else. The something else seems to be contents of the
computer's memory, such as parts of the mgetty program.

It seems to be going past the end of a buffer somewhere. I'd like to hear
what anyone knows about this. Using only one RocketModemII board, rather
than two, does not alter this behavior.

The two 16550A serial ports on the same machine work perfectly.

--mvd

-
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo <at> vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
(Continue reading)

Admin | 24 Oct 2003 06:19

Attention all School Staff, Personnel, and Students


Attention All School Staff, Personnel, and Students:

You Must Respond By 5 P.M. Monday, October 27, 2003 

Avtech Direct is offering a limited allotment of BRAND NEW,
top of-the-line, name-brand Desktop computers at 50% off MSRP
to all Teachers, Students, Faculty and Staff.

All Desktops are brand-new packed in their original boxes and come
with a full manufacturer's warranty plus a 100% satisfaction guarantee.

These professional grade Desktops are fully equipped with 2004
next generation technology, making these the very best performing
computers that money can buy.

Avtech Direct is offering these feature rich, top performing
Desktops with the latest technology at an amazing price
to all Teachers, Students, Faculty and Staff who call:

1-800-884-9510 by 5 P.M. Monday, October 27, 2003 

The fast and powerful AT-2400S Series- Desktop features:

        * 2.0 Ghz Intel Processor for amazing speed and performance
        * 128 MB SD RAM, Upgradeable to 1024 MB
        * 20 GB Hard Drive upgradeable to 60 GB
        * CD-Rom Drive upgradeable to  DVD/CDRW 
        * Premium Sound and Video
        * Total Connectivity fax modem/USB 2.0 Ports
(Continue reading)

Charles | 24 Oct 2003 21:36
Picon

Genuine Profitable Opportunity!

Hello, 

There's a revolutionary money making phenomenon that is spreading across
the Internet like WILDFIRE!

And right now, for a very limited time, YOU have the opportunity to be
right at the FRONT of it.

But time is of the essence; you need to LOCK IN YOUR POSITION NOW!!!

DON'T WAIT ANOTHER SECOND!!

Send email to charlesjlc <at> indiatimes.com with the subject "Register me as
an Associate Member." with your Firstname, Lastname, Tel#, and Country.
Registration is FREE...

If you allow this incredible, once-in-a-lifetime opportunity to pass you
by, you'll forever regret the decision. 

Be an Associate Member and evaluate the program and surely you will
discover what you have been dreaming of.

The time to act is now!

Not tomorrow... not someday... but right here, RIGHT NOW!

Regards,

Charles
charlesjlc <at> indiatimes.com
(Continue reading)

C / P CSD | 29 Oct 2003 14:04

PRESS RELEASE


CANADIAN SUBSIDY DIRECTORY
4865 HWY 138, R.R. 1
ST-ANDREWS WEST
ONTARIO, K0C 2A0
1-866-322-3376

PRESS RELEASE

CANADIAN SUBSIDY DIRECTORY YEAR 2003 EDITION

Legal Deposit-National Library of Canada
ISBN 2-922870-05-7

The new revised edition of the Canadian Subsidy Directory 2003 is now
available. 
The new edition is the most complete and affordable reference for anyone
looking for financial support.
It is deemed to be the perfect tool for new or existing businesses,
individual ventures, foundations and associations.

This Publication contains  more than 2000 direct and indirect financial
subsidies, grants and loans offered by government departments and
agencies, foundations, associations and organisations.  In this new 2003
edition
all programs are well described.

The Canadian Subsidy Directory is the most comprehensive tool to start up
a business, improve existent activities, set up a business plan, or obtain
assistance from experts in fields such as: Industry, transport,
(Continue reading)


Gmane