Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #16009

Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!amsnews11.chello.com!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <nizamov.shawkat@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'subject:Python': 0.05; '===': 0.09; 'available)': 0.09; 'linux.': 0.09; 'to:addr:comp.lang.python': 0.09; 'topic:': 0.09; 'bit)': 0.16; 'bit.': 0.16; 'bits,': 0.16; 'modes': 0.16; 'posix': 0.16; 'side.': 0.16; 'cc:addr:python-list': 0.16; 'cc:no real name:2**0': 0.20; 'trying': 0.21; 'discussion': 0.22; 'header:In- Reply-To:1': 0.22; 'figure': 0.23; 'defined': 0.24; 'cc:2**0': 0.24; 'mode': 0.25; 'module': 0.26; '"the': 0.26; "i'm": 0.26; 'testing': 0.26; 'described': 0.28; 'bit': 0.28; 'message- id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'definition': 0.30; '(since': 0.30; "i've": 0.31; 'words,': 0.32; 'received:209.85.216.46': 0.32; 'received:mail- qw0-f46.google.com': 0.32; 'implement': 0.32; 'setting': 0.34; 'set.': 0.34; 'subject:/': 0.35; 'project': 0.35; 'regular': 0.35; 'device': 0.36; 'uses': 0.36; 'subject:with': 0.36; 'two': 0.37; 'but': 0.37; 'received:google.com': 0.37; 'using': 0.38; 'some': 0.38; 'received:209.85': 0.38; 'relatively': 0.39; 'mark': 0.39; 'subject: (': 0.40; 'received:209': 0.40; 'communicate': 0.40; 'dedicated': 0.61; 'matter': 0.61; 'your': 0.61; 'stop': 0.63; 'devices': 0.63; 'view': 0.65; 'view.': 0.67; 'url:php': 0.82; '8th': 0.91; 'subject:Serial': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=lxk03reZK7pbyNLKHUyhk0bqCeGm0Z8WjS+jU7fhztU=; b=DYBfBJDbgNV70qAqtnxQBFZzyouEAFMTUTZ1YSHsaXwFG51WGtnkib6ffY1ciGACLJ 8ktk5tuwlFaWeTsU+VpBnIRv4KM1PJzQJs7P2Gk/Ya29wXgO0Bj+TzWoVdGGb2R5jAJO Gbb04CPUOnKW9CO7jkgGIKWuJQ3zta9rlAAV8=
MIME-Version 1.0
In-Reply-To <27511132.925.1321884055247.JavaMail.geo-discussion-forums@yqnf38>
References <27511132.925.1321884055247.JavaMail.geo-discussion-forums@yqnf38>
Date Mon, 21 Nov 2011 15:26:48 +0100
Subject Re: Non-POSIX parity (mark/space) with Python-Serial on Linux.
From Nizamov Shawkat <nizamov.shawkat@gmail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2900.1321885611.27778.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1321885611 news.xs4all.nl 6880 [2001:888:2000:d::a6]:44414
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:16009

Show key headers only | View raw


2011/11/21  <mlenz@nocturnal.org>:
> I'm working on a project where I need to communicate with some devices via modem which have the possibility of using MARK and SPACE parity.  These are not defined by POSIX and therefore are not directly supported under Linux.
>
> I've found the following discussion on the topic:
>
> http://www.lothosoft.ch/thomas/libmip/markspaceparity.php
>
> and I have been trying to use this information (since the TERMIOS module is available) to proceed with the communication.
>
> I was able to use minicom to determine that the first device I started testing with uses 7M1 but cannot figure out how to implement the solution described by the author above.
>


"The modes 7M1 (7 data bits, MARK parity, 1 stop bit) and 7S1 (7 data
bits, SPACE parity, 1 stop bit) can easily be emulated using 8N1 (0
data bits, NO parity, 1 stop bit) and setting the 8th data bit to 1
resp. 0. This is relatively simple to implement and cannot be
distinguished by the receiver."

It means that 7M1 === 8N1. Set 8N1 mode on your side and 7M1 on the
other side. I really do not understand what is the reason to have
dedicated 7M1 or 7S1 mode - it is no different from regular 8 bit mode
from the hardware point of view. From the software point of view it is
just the matter of the definition of the highest bit. In other words,
7M1/7S1 are two complementary subsets of a single 8N1 set.

HTH

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Non-POSIX parity (mark/space) with Python-Serial on Linux. mlenz@nocturnal.org - 2011-11-21 06:00 -0800
  Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 06:16 -0800
  Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Nizamov Shawkat <nizamov.shawkat@gmail.com> - 2011-11-21 15:26 +0100
    Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 08:28 -0800
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Chris Angelico <rosuav@gmail.com> - 2011-11-22 03:41 +1100
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. David Riley <fraveydank@gmail.com> - 2011-11-21 11:47 -0500
        Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 08:52 -0800
        Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 08:52 -0800
          Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. David Riley <fraveydank@gmail.com> - 2011-11-21 12:22 -0500
            Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 09:59 -0800
            Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 09:59 -0800
              Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. David Riley <fraveydank@gmail.com> - 2011-11-21 13:12 -0500
          Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. MRAB <python@mrabarnett.plus.com> - 2011-11-21 18:20 +0000
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. gene heskett <gheskett@wdtv.com> - 2011-11-21 12:25 -0500
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. David Riley <fraveydank@gmail.com> - 2011-11-21 12:50 -0500
    Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 08:28 -0800
  Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. gene heskett <gheskett@wdtv.com> - 2011-11-21 13:33 -0500
    Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 11:29 -0800
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Grant Edwards <invalid@invalid.invalid> - 2011-11-21 19:42 +0000
    Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Matthew Lenz <matthew@nocturnal.org> - 2011-11-21 11:29 -0800
      Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. David Riley <fraveydank@gmail.com> - 2011-11-21 15:42 -0500
        Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Grant Edwards <invalid@invalid.invalid> - 2011-11-21 23:08 +0000
          Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Grant Edwards <invalid@invalid.invalid> - 2011-11-21 23:09 +0000
            Re: Non-POSIX parity (mark/space) with Python-Serial on Linux. Chris Angelico <rosuav@gmail.com> - 2011-11-22 11:32 +1100

csiph-web