File: rawserial.docbook

package info (click to toggle)
lcdproc 0.5.9-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,088 kB
  • sloc: ansic: 59,645; sh: 1,740; perl: 681; makefile: 417
file content (134 lines) | stat: -rw-r--r-- 3,890 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<sect1 id="howto">
<sect1info>
  <author>
    <firstname>Connor</firstname>
    <surname>Wolf</surname>
  </author>
</sect1info>
<!-- Only as a comment, as inline presentation is awful in Docbook 4.5
Imaginary Industries
imaginaryindustries.com
Email: lcdproc@imaginaryindustries.com
-->
<title>The *Really* Simple Serial interface (rawserial)</title>

<para>
This section talks about using LCDproc with custom hardware.
</para>

<para>
This driver is intended for using LCDproc with custom hardware. In the
original implementation, this was for a PFsense router with a homemade
arduino-style circuit that controlled analog panel meters to display network
traffic. It is intended for this sort of application, where the LCD control
characters emitted normally, as well as the partial screen drawing, make
parsing the serial stream a considerably complex affair, particularly on
small (generally 8 bit) microprocessors.
</para>


<sect2 id="features">
<title>Features</title>

<para>
The driver emulates a 40x4 display, and simply dumps the entire framebuffer
out the serial port at a rate configured in the config file (default of 1
Hz), post-pended with a single "\n" character. At 1 Hz, it therefore
generates 161 serial characters per second.
</para>

<para>
The maximum update-rate is limited by the internal update-rate of LCDproc,
which is currently 8 Hz, so speeds greater then 8 Hz will be simply limited
to 8 Hz. The update-rate is also granular at 1 second/8 time-intervals (125
ms), so interesting fractional update-rates will behave oddly. The
event-loop is rigidly deterministic, so fractional rates will *average* out
to the desired rate, but that will be achieved by dithering between nearby
available intervals.
</para>

<para>
The baud rate is configurable, with a default of 9600 baud. Baud rate will
have to be chosen with the required data-per-second in mind, since at 1 Hz,
there are 161 characters (40x4+1) per second, which requires that's a
theoretical minimum baud of 161*10 = 1610 baud. Higher frame-rates will
require higher baud rates.
</para>

</sect2>


<sect2 id="requirements">
<title>Requirements</title>

<para>
None. The only requirement is a serial port of some sort.
</para>

</sect2>


<sect2 id="config">
<title>Configuration in LCDd.conf</title>

<sect3 id="config-section">
<title>[rawserial]</title>

<variablelist>
<varlistentry>
  <term>
    <property>Device</property> =
    <parameter><replaceable>DEVICE</replaceable></parameter>
  </term>
  <listitem><para>
  Serial port to use. Default: <filename>/dev/cuaU0</filename>
  </para></listitem>
</varlistentry>

<varlistentry>
  <term>
    <property>Speed</property> =
    <parameter><replaceable>NUMBER</replaceable></parameter>
  </term>
  <listitem><para>
    Desired baud-rate. Possible values:
    <literal>1200</literal>,
    <literal>2400</literal>,
    <literal>9600</literal> (default),
    <literal>19200</literal>, and
    <literal>115200</literal>.
  </para></listitem>
</varlistentry>

<varlistentry>
  <term>
    <property>Size</property> = &parameters.size;
  </term>
  <listitem><para>
    Specifies the size of the LCD. If this driver is loaded as a secondary
    driver it always adopts to the size of the primary driver. If loaded as
    the only (or primary) driver, the size can be set.
    Default: <literal>40x4</literal>.
  </para></listitem>
</varlistentry>

<varlistentry>
  <term>
    <property>UpdateRate</property> =
    <parameter><replaceable>NUMBER</replaceable></parameter>
  </term>
  <listitem><para>
    Desired update-rate in Hertz (e.g. updates per second). Fractional
    values and values less than one are valid (e.g. 0.5). Legal values are
    <literal>0.0005</literal> (equals 2000 seconds) - <literal>10</literal>,
    with <literal>1.0 </literal> being the default.
  </para></listitem>
</varlistentry>

</variablelist>

</sect3>

</sect2>

</sect1>