Hottest Free Downloads - DownloadPipe.com Over 197,000 downloads! Bookmark Now!
DownloadPipe.com - New Downloads Every Minute
 SEARCH:
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Use of stty

 
   Mac (Home) -> General Discussion RSS
Next:  [ANN] ADHOC/MacHack sessions announcement & t..  
Author Message
vze35xda

External


Since: Sep 17, 2005
Posts: 53



(Msg. 1) Posted: Tue Jun 28, 2005 8:15 pm
Post subject: Use of stty
Archived from groups: comp>sys>mac>programmer>misc (more info?)

Has anyone here used stty to set the baud rate of a serial port in
a script or just from the command line ? I am trying to use "screen
<ser port path>" which gives you a serial (VT100) terminal through the
selected port. In my case I am using USB serial ports and the screen
command works just fine but only at 9,600 baud, the default rate. I
have tried running "stty -f <port path> speed 38400" and "stty speed
38400 < <port path>" before the screen command and this has not changed
the port baud rate. (I've also tried these commands using sudo with no
difference.)

I have looked at the source of stty and see it uses the standard
option and speed setting commands in the POSIX/BSD api. I know these
work since I use them in my serial I/O code I use in other programs
which use these same serial ports and set them to user selected baud
rates and serial parameters. (Also when I do this my programs run as
normal users not Admin so anyone should be able to set/change serial
parameters.)

I seem to be missing something like some other process owns the port
and while stty changes the settings, as soon as it quits they get reset
back to defaults or something. To test this I wrote a command line
program that used my serial port setting code, opened the port
non-exclusively, set the baud rate to 38,400 then before closing the
serial port called system() and ran the screen program. Even there the
screen program still ran at 9,600 baud.

Any suggestions would be welcome.

I'm asking in this group because the "screen port" thing is probably
useful to a lot of programmer types.

--jim
Back to top
Login to vote
Display posts from previous:   
Related Topics:
[BINDINGS] NSTableView vs. NSUserDefaultsController - I've already posted the following message to Apple's cocoa-dev mailing list, so if you subscribe to that list or are a regular reader of CocoaBuilder.com, you've already seen this. I'm posting here since I've appeared to have violated list..

Any tame MAC users out there ? - Hi all, could anyone tell me why the HTML generated from an XSL/XML merge would not display on an apple Mac. http://www.bedfords.co.uk/pages/search/search.asp (and just click "search") The page works fine on IE5,IE6, Mozilla and Firefox. Th...

[ANN] ADHOC/MacHack sessions announcement & the Transition.. - Apple is moving to Intel -- Don't Panic! Come to ADHOC and learn what developers need to do. Held in Dearborn, Michigan from July 27th through 31st (a little over a month after WWDC), ADHOC has always been focused on giving developers the edge when i...

NSData's +dataWithContentsOfFile - Hi, I'm considering using Cocoa rather than Carbon... How do I init an NSData object with data from a file *but* only from x bytes in with a length of y bytes into the file? I don't want to read the whole file into one data object then copy x bytes..

Question Regarding Key Windows - I am just learning Mac programming (coming over from .NET on Windows & Web), and I was going through "Introduction to Developing Cocoa Objective-C Applications: A Tutorial". In it, Apple says, "Key windows respond to key presses for an...
       Mac (Home) -> General Discussion All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact