Re: Simple serial question...

From: Alain Mosnier (alain.mosnier_at_chello.se)
Date: 11/09/05

  • Next message: Grant Edwards: "Re: Simple serial question..."
    Date: Wed, 09 Nov 2005 15:43:05 +0100
    
    

    Grant Edwards wrote:
    > On 2005-11-08, Alain Mosnier <alain.mosnier@chello.se> wrote:
    >
    >
    >>Be aware of the byte ordering issue though: your source and
    >>destination might order the bytes differently. This is not a
    >>problem if both source and destination are Linux, which is
    >>always little-endian, as far as I know
    >
    >
    > Wha?
    >
    > There are plenty of big-endian architectures running Linux:
    >
    > SPARC
    > PPC
    > 68000
    > IBM-370 (and I presume z-series),
    > H8/300
    > ARM
    > etc.
    >
    > I suspect that the majority of Linux-supporting architectures
    > are big-endian, even though most Linux machines are
    > little-endian.
    All right, I guess I was just talking about x86 then.

    Anyway, I guess my point about byte ordering was even more relevant that
    I thought. ;-)
    >
    >
    >>>NB: Don't use the Linux serial programming HOWTO.
    >>
    >>Just out of curiosity, why is that? Anything specific that
    >>would be wrong in that HOWTO?
    >
    >
    > Yes. Mainly the code used to open devices. I have vague
    > recollections of problems with the way some of the termios
    > stuff is done too, but I can't remember the details. There are
    > also large amounts of stuff that's just not there (e.g.
    > accessing modem control/status lines).
    >
    Good to know. Thanks for the info.
    >
    >>I'm rather using the "Serial Programming Guide for POSIX
    >>Operating Systems" which is more recent myself, but I would
    >>still be interested to hear what's wrong in that HOWTO.
    >
    >
    > You're the only one, then. Corrections and entirely new
    > chapters have been submitted but have been ignored.
    >
    Do you mean that people don't know that document? I found it immediately
    at my first Google search about Linux serial programming (actually, the
    HOWTO points to it). I think that document fills a surprising hole in
    books like "Advanced programming in the UNIX environment", "Advanced
    UNIX programming" and "UNIX network programming", which are very good
    books otherwise.

    Regards,

    Alain


  • Next message: Grant Edwards: "Re: Simple serial question..."

    Relevant Pages

    • Re: Linux administration book
      ... Linux in a Nutshell O'Reilly 0-596-00482-6 ... Practical Unix & Internet Security O'Reilly ... The C Programming Language Prentice Hall 0-13-110362-9 ...
      (alt.os.linux)
    • Re: dilemmas galore
      ... programming environment' by Brian Kernighan but i'm not finding the my ... of unix and i can see its source code but is it advisable to learn ... standard books or/and sites for unix and linux. ...     thanking in anticipation. ...
      (comp.unix.internals)
    • Re: Where is C language used mainly thes days?
      ... programming part while also well-versed in out of the office ... Cisco router such as whether it is in Unix environment or not. ... I am thinking to install Linux via VM Ware and do my ... networking related analysis and coding, ...
      (comp.lang.c.moderated)
    • Re: Is "System Programing in Unix" the same as programing in C in Unix?
      ... > Linux operating system but plan to install Linux in the near future. ... UNIX OS of choice. ... > start studying programming with C in on the side on my own so that I ...
      (comp.unix.programmer)
    • Is "System Programing in Unix" the same as programing in C in Unix?
      ... Linux operating system but plan to install Linux in the near future. ... each is 1 unit): the book used it "A Guide to Unix ... start studying programming with C in on the side on my own so that I ...
      (comp.unix.programmer)