en:netzer:gpioserver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:netzer:gpioserver [2011/12/19 12:23] – external edit 127.0.0.1en:netzer:gpioserver [2025/06/11 20:42] (current) – external edit 127.0.0.1
Line 3: Line 3:
 ===== Settings ===== ===== Settings =====
  
-Via the GPIO server all [[de:netzer:IO|IOs]] of Netzer can be addressed.+Via the GPIO server all [[IO|IOs]] of Netzer can be addressed.
  
-If the GPIO is activated, Netzer opens a TCP port (factory setting 65000) after restart. Activation and the port can be carried out by general settings via the website (see figure). The settings do not become directly effective, but only after restart!+If the GPIO is activated, Netzer opens a TCP port (factory setting 65000) after restart.  
 +Activation and the port can be carried out by general settings via the website (see figure).  
 +The settings become directly effective!
  
-{{:de:netzer:commongpioserver.gif?nolink&|General settings}}+{{commongpioserver.png?nolink&|General settings}}
  
 For simple tests of the server and the protocol every terminal program may be used that is capable of building up connections via Raw TCP sockets, such as e.g. the Windows HyperTerminal.  For simple tests of the server and the protocol every terminal program may be used that is capable of building up connections via Raw TCP sockets, such as e.g. the Windows HyperTerminal. 
 +
 Upon successful connection establishment, authentification takes place if activated. Otherwise, the protocol phase is directly entered into. Upon successful connection establishment, authentification takes place if activated. Otherwise, the protocol phase is directly entered into.
- 
- 
-===== Authentification (from version 1.4 pro) ===== 
- 
-For the GPIO server, authentification can be activated on the GPIO settings website.  
- 
-{{:de:netzer:gpioservercommon.gif?nolink&|Authentification}} 
- 
-For authentification, the user accounts of the [[de:netzer:accesscontrol|access control]] are used. The rights of the individual user accounts are replicated as well. The guest login for example can only access to GPIO values in reading. 
- 
-After connection establishment, the input prompt for the user name is displayed:  
- 
-<code>login:</code> 
- 
-After that, the password: 
- 
-<code>password:</code> 
- 
-In the event of an incorrect entry the connection is interrupted by the GPIO server. If everything is okay, the protocol phase is entered into. 
  
  
Line 36: Line 20:
 In the GPIO server, a simple protocol is implemented. In the GPIO server, a simple protocol is implemented.
  
-Thanks to this protocol, digital inputs and outputs as well as ADC and PWM/pulse outputs can be read. Only digital outputs as well as PWM/pulse outputs can be written. Furthermore, these outputs must not be occupied by functions of the serial server.+Thanks to this protocol, digital inputs and outputs as well as ADC and PWM/pulse outputs can be read. Only digital outputs as well as PWM/pulse outputs can be written. Furthermore, these outputs must not be occupied by functions of the [[serialserver|serial server]].
  
 Reading or writing is done by commands.  Reading or writing is done by commands. 
 +
 Invididual commands are separated from each other by Whitespaces (space characters, tab, word wrap etc. - all characters with the ASCII code <= 32). Invididual commands are separated from each other by Whitespaces (space characters, tab, word wrap etc. - all characters with the ASCII code <= 32).
  
Line 47: Line 32:
  
 Reading of pins works as follows: Reading of pins works as follows:
 +
 <code> <code>
-a=? Server reply: a=1 +a=?\n  
-e=? Server reply: e=03ff +Server reply: a=1 
-m=? Server reply: m=0 + 
-x=? Server reply: x=0011+e=?\n  
 +Server reply: e=03ff 
 + 
 +m=?\n  
 +Server reply: m=0 
 + 
 +x=?\n 
 +Server reply: x=0011
 </code> </code>
  
-Depending on whether the pin is configured digital or as ADC/PWM, the GPIO servier supplies binary or numerical values. The radix of numerical values can be changed between hexadecimal and decimal using the GPIO setting on the [[de:netzer:io#General configuration (Version 1.4 pro)|GPIO configuration page]].+Depending on whether the pin is configured digital or as ADC/PWM, the GPIO servier supplies binary or numerical values. 
  
 The wildcard ID **x** always supplies the digital state of all pins, regardless of whether a pin supplies binary or numerical values. At bit level, the states of the individual pins as per the following table are possible: The wildcard ID **x** always supplies the digital state of all pins, regardless of whether a pin supplies binary or numerical values. At bit level, the states of the individual pins as per the following table are possible:
 +
 ^ Bit 15 ^ Bit 14 ^ Bit 13 ^ Bit 12 ^ Bit 11 ^ Bit 10 ^ Bit 9 ^ Bit 8 ^ Bit 7 ^ Bit 6 ^ Bit 5 ^ Bit 4 ^ Bit 3 ^ Bit 2 ^ Bit 1 ^ Bit 0 ^ ^ Bit 15 ^ Bit 14 ^ Bit 13 ^ Bit 12 ^ Bit 11 ^ Bit 10 ^ Bit 9 ^ Bit 8 ^ Bit 7 ^ Bit 6 ^ Bit 5 ^ Bit 4 ^ Bit 3 ^ Bit 2 ^ Bit 1 ^ Bit 0 ^
 |  0  |  0  |  0  |  m  |  l  |  k  |  j  |  i  |  h  |  g  |  f  |  e  |  d  |  c  |  b  |  a  | |  0  |  0  |  0  |  m  |  l  |  k  |  j  |  i  |  h  |  g  |  f  |  e  |  d  |  c  |  b  |  a  |
- 
  
 Writing on pins is done analogously: Writing on pins is done analogously:
 +
 <code> <code>
 a=1 Server reply: a=1 a=1 Server reply: a=1
Line 69: Line 63:
 </code> </code>
  
-The wildcard ID **x** describes only the pins configured as digital outputs and not occupied by the serial server.+The wildcard ID **x** describes only the pins configured as digital outputs and not occupied by the [[serialserver|serial server]].
  
  
-===== Events (Version 1.4 pro) =====+==== Events ====
  
 For every digital input, an event trigger may be activated on the GPIO configuration page. For every digital input, an event trigger may be activated on the GPIO configuration page.
  
-{{:de:netzer:gpioevents.gif?nolink&|}}+{{gpioevents.gif?nolink&|}}
  
-Thus, the GPIO sever independently sends protocol messages in the event of an accordingly configured amendment.+Thus, the GPIO server independently sends protocol messages in the event of an accordingly configured amendment.
  
  
 +==== Edge counter ====
 +
 +For the IO channels a, b, and c [[io#edge-counter|edge counters]] are implemented.
 +They can be accessed via the special protocol ID **z**.
 +
 +Reading the counter works like:
 +
 +<code>
 +za=? Server response: za=0001
 +zb=? Server response: zb=0000
 +zc=? Server response: zc=0123
 +</code>
 +
 +Counter values are transmitted as 16 bit hexadecimal numbers.
 +The value itself is stored in the lower 15 bits.
 +The MSB of the counter is the carry flag, which indicates a counter overrun or underrun.
 +If carry flag is set it remains set until reset manually.
 +
 +Also writing of counter values is possible:
 +
 +<code>
 +za=0 Server response: za=0000
 +</code>
 +
 +Change of counter values is not transmitted automatically.
 +The user has to poll the server periodically to detect changes.