http://www.ethersex.de/api.php?action=feedcontributions&user=Mgue&feedformat=atomEthersex_Wiki - User contributions [en]2024-03-29T12:49:07ZUser contributionsMediaWiki 1.30.0http://www.ethersex.de/index.php?title=DMX_Storage&diff=1330DMX Storage2014-09-22T00:35:46Z<p>Mgue: Documentation :)</p>
<hr />
<div>{{i18n|DMX Storage}}<br />
{{Module<br />
|NAME=DMX Storage<br />
|MENUCONFIG={{Applications}}->DMX Storage<br />
|STATUS={{stable}}<br />
|PINNING=no<br />
|ECMD={{has_ecmd}}<br />
|DEPENDS=[[ECMD]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/services/dmx-storage https://github.com/ethersex/ethersex/tree/master/services/dmx-storage]<br />
}}<br />
<br />
Dmx Storage provides a database-like storage layer for DMX information. It forms the core of the [[Ethersex Lighting Architecture]].<br />
<br />
== Modules (input) ==<br />
<br />
The following modules change/alter the DMX data<br />
<br />
*[[Artnet]]<br />
*[[DMX]] (not yet implemented)<br />
*[[DMX FXSlot]]<br />
*[[DMX_Storage#HTML_Interface | DMX WebGUI]]<br />
<br />
== Modules (output) ==<br />
<br />
The following modules display/use the dmx data<br />
<br />
*[[Artnet]]<br />
*[[DMX]]<br />
*[[Starburst]]<br />
*[[StellaLight]]<br />
<br />
<br />
<br />
== [[ECMD]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Return values'' <br />
| ''Short description''<br />
|-<br />
| dmx channels [universe]<br />
| unsigned char<br />
| Get channels per universe<br />
|-<br />
| dmx get [universe] [channel]<br />
| unsigned char<br />
| Return channel value<br />
|-<br />
| dmx set [universe] [on/off]<br />
| None<br />
| Switches the universe [on] (LIVE) or [off] (BLACKOUT]<br />
|-<br />
| dmx set [universe] dimmer [value]<br />
| None<br />
| Sets the global dimmer value for that universe (0-255)<br />
|-<br />
| dmx set [universe] [channel] [value1] [value2]...[valuen]<br />
| None<br />
| Sets the values of [universe] starting from [channel]<br />
|-<br />
| dmx universe [universe]<br />
| LIVE or BLACKOUT \n Global dimmer value (unsigned char) \n channel 0-n (unsigned char)<br />
| get all channels of [universe] with<br />
|-<br />
| dmx universes <br />
| unsigned char<br />
| Get total universes<br />
|-<br />
|}<br />
<br />
== Web GUI ==<br />
<br />
DMX Storage Channels can also be altered via the HTTP-Server. The interface currently works in most of the Webkit-based browsers (e.g. Google Chrome) and Mozilla Firefox (Version 4+).<br />
The interface can be enabled in the [VFS] menu.<br />
<br />
Tested browsers:<br />
{| border='1'<br />
|-<br />
| Browser <br />
| Version<br />
| Works<br />
|-<br />
| Firefox <br />
| 23<br />
| yes (see note)<br />
|-<br />
| Chromium <br />
| 28.0.1500.95<br />
| yes<br />
|-<br />
| Konqueror <br />
| 4.10.5 <br />
| yes<br />
|-<br />
| Android Browser <br />
| Android 4.3 <br />
| yes<br />
|-<br />
|}<br />
When using Firefox with a version < 23, make sure to enable "Support <input type=range> for Firefox".<br />
[[File:Ethersex-dmxUI.png|right|500px|thumb|The HTML interface in Chromium 37.0 on Linux]]<br />
<br />
[[Category:e6la]]</div>Mguehttp://www.ethersex.de/index.php?title=DMX_Storage&diff=1329DMX Storage2014-09-22T00:21:38Z<p>Mgue: /* Web GUI */</p>
<hr />
<div>{{i18n|DMX Storage}}<br />
{{Module<br />
|NAME=DMX Storage<br />
|MENUCONFIG={{Applications}}->DMX Storage<br />
|STATUS={{stable}}<br />
|PINNING=no<br />
|ECMD={{has_ecmd}}<br />
|DEPENDS=[[ECMD]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/services/dmx-storage https://github.com/ethersex/ethersex/tree/master/services/dmx-storage]<br />
}}<br />
<br />
Dmx Storage provides a database-like storage layer for DMX information. It forms the core of the [[Ethersex Lighting Architecture]].<br />
<br />
== Modules (input) ==<br />
<br />
The following modules change/alter the DMX data<br />
<br />
*[[Artnet]]<br />
*[[DMX]] (not yet implemented)<br />
*[[DMX FXSlot]]<br />
*[[DMX_Storage#HTML_Interface | DMX WebGUI]]<br />
<br />
== Modules (output) ==<br />
<br />
The following modules display/use the dmx data<br />
<br />
*[[Artnet]]<br />
*[[DMX]]<br />
*[[Starburst]]<br />
*[[StellaLight]]<br />
<br />
<br />
<br />
== [[ECMD]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dmx channels <br />
| Get channels per universe<br />
|-<br />
| dmx get <br />
| Return channel value<br />
|-<br />
| dmx set <br />
| Set channel values<br />
|-<br />
| dmx universe <br />
| Get a whole universe<br />
|-<br />
| dmx universes <br />
| Get universes<br />
|-<br />
|}<br />
== Web GUI ==<br />
<br />
DMX Storage Channels can also be altered via the HTTP-Server. The interface currently works in most of the Webkit-based browsers (e.g. Google Chrome) and Mozilla Firefox (Version 4+).<br />
The interface can be enabled in the [VFS] menu.<br />
<br />
Tested browsers:<br />
{| border='1'<br />
|-<br />
| Browser <br />
| Version<br />
| Works<br />
|-<br />
| Firefox <br />
| 23<br />
| yes (see note)<br />
|-<br />
| Chromium <br />
| 28.0.1500.95<br />
| yes<br />
|-<br />
| Konqueror <br />
| 4.10.5 <br />
| yes<br />
|-<br />
| Android Browser <br />
| Android 4.3 <br />
| yes<br />
|-<br />
|}<br />
When using Firefox with a version < 23, make sure to enable "Support <input type=range> for Firefox".<br />
[[File:Ethersex-dmxUI.png|right|500px|thumb|The HTML interface in Chromium 37.0 on Linux]]<br />
<br />
[[Category:e6la]]</div>Mguehttp://www.ethersex.de/index.php?title=File:Ethersex-dmxUI.png&diff=1328File:Ethersex-dmxUI.png2014-09-22T00:19:20Z<p>Mgue: Mgue uploaded a new version of &quot;File:Ethersex-dmxUI.png&quot;: New elements (Dimmer, Master Switch) with Chrome 37</p>
<hr />
<div>The DMX Storage html interface in Chromium 17.0.963.56</div>Mguehttp://www.ethersex.de/index.php?title=DMX_Storage&diff=1174DMX Storage2013-08-12T23:44:35Z<p>Mgue: updated versions</p>
<hr />
<div>{{i18n|DMX Storage}}<br />
{{Module<br />
|NAME=DMX Storage<br />
|MENUCONFIG={{Applications}}->DMX Storage<br />
|STATUS={{stable}}<br />
|PINNING=no<br />
|ECMD={{has_ecmd}}<br />
|DEPENDS=[[ECMD]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/services/dmx-storage https://github.com/ethersex/ethersex/tree/master/services/dmx-storage]<br />
}}<br />
<br />
Dmx Storage provides a database-like storage layer for DMX information. It forms the core of the [[Ethersex Lighting Architecture]].<br />
<br />
== Modules (input) ==<br />
<br />
The following modules change/alter the DMX data<br />
<br />
*[[Artnet]]<br />
*[[DMX]] (not yet implemented)<br />
*[[DMX FXSlot]]<br />
*[[DMX_Storage#HTML_Interface | DMX WebGUI]]<br />
<br />
== Modules (output) ==<br />
<br />
The following modules display/use the dmx data<br />
<br />
*[[Artnet]]<br />
*[[DMX]]<br />
*[[Starburst]]<br />
*[[StellaLight]]<br />
<br />
<br />
<br />
== [[ECMD]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dmx channels <br />
| Get channels per universe<br />
|-<br />
| dmx get <br />
| Return channel value<br />
|-<br />
| dmx set <br />
| Set channel values<br />
|-<br />
| dmx universe <br />
| Get a whole universe<br />
|-<br />
| dmx universes <br />
| Get universes<br />
|-<br />
|}<br />
== Web GUI ==<br />
<br />
DMX Storage Channels can also be altered via the HTTP-Server. The interface currently works in most of the Webkit-based browsers (e.g. Google Chrome) and Mozilla Firefox (Version 4+).<br />
The interface can be enabled in the [VFS] menu.<br />
<br />
Tested browsers:<br />
{| border='1'<br />
|-<br />
| Browser <br />
| Version<br />
| Works<br />
|-<br />
| Firefox <br />
| 23<br />
| yes (see note)<br />
|-<br />
| Chromium <br />
| 28.0.1500.95<br />
| yes<br />
|-<br />
| Konqueror <br />
| 4.10.5 <br />
| yes<br />
|-<br />
| Android Browser <br />
| Android 4.3 <br />
| yes<br />
|-<br />
|}<br />
When using Firefox with a version < 23, make sure to enable "Support <input type=range> for Firefox".<br />
[[File:Ethersex-dmxUI.png|right|500px|thumb|The HTML interface in Chromium 17]]<br />
<br />
[[Category:e6la]]</div>Mguehttp://www.ethersex.de/index.php?title=Features&diff=1172Features2013-07-25T15:36:52Z<p>Mgue: cron link</p>
<hr />
<div>{{i18n|Features}}<br />
<br />
<br />
== Supported Network Hardware ==<br />
<br />
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging<br />
* [[USB]]<br />
* [[RFM12]]<br />
* [[ZBUS]]<br />
<br />
== Network Protocols ==<br />
<br />
* IPv4, IPv4<br />
* TCP/IP, UDP/IP and ICMP<br />
* DNS<br />
* mDNS (Avahi)<br />
* [[BOOTP]]<br />
* [[DHCP]]<br />
* TFTP (can be used in combination with the [[Ethernet Loader]])<br />
* SYSLOG<br />
* [[SNMP]]<br />
* SMTP<br />
* [[NTP]] (Client and Server)<br />
* DynDNS<br />
* MySQL (Client)<br />
* IRC (Client)<br />
* [[XMPP | XMPP / Jabber Client]]<br />
* MPD (Music Player Daemon)<br />
* [[SOAP]]/XMLRPC<br />
* [[UPnP]]<br />
* [[Artnet]]<br />
<br />
== Hardware Drivers ==<br />
<br />
* [[Onewire]]<br />
* [[I2C]] Master / Slave<br />
* [[ADC input]]<br />
* [[PWM Generator]]<br />
* [[RFM12 FS20]]<br />
* [[RFM12 ASK]]<br />
* [[Bluetooth|Bluetooth SPP]]<br />
* [[USB]]<br />
* [[PS/2 Keyboard]]<br />
* [[Button Input]]<br />
* [[HC595]]<br />
* [[HC165]]<br />
* [[IRMP | IR Receivers]]<br />
* [[SRAM]]<br />
<br />
== Software Modules ==<br />
<br />
* [[Ethersex Lighting Architecture]]<br />
** [[Starburst]]<br />
** [[StellaLight]]<br />
** [[DMX Storage]]<br />
** [[DMX FXSlot]]<br />
* [[Cron | Cron Daemon]]<br />
* [[System Clock | Clock ]]<br />
* [[VNC Server]]<br />
* [[lome6]]<br />
* [[Frequency Counter]]</div>Mguehttp://www.ethersex.de/index.php?title=Features&diff=1171Features2013-07-25T15:36:18Z<p>Mgue: cron link</p>
<hr />
<div>{{i18n|Features}}<br />
<br />
<br />
== Supported Network Hardware ==<br />
<br />
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging<br />
* [[USB]]<br />
* [[RFM12]]<br />
* [[ZBUS]]<br />
<br />
== Network Protocols ==<br />
<br />
* IPv4, IPv4<br />
* TCP/IP, UDP/IP and ICMP<br />
* DNS<br />
* mDNS (Avahi)<br />
* [[BOOTP]]<br />
* [[DHCP]]<br />
* TFTP (can be used in combination with the [[Ethernet Loader]])<br />
* SYSLOG<br />
* [[SNMP]]<br />
* SMTP<br />
* [[NTP]] (Client and Server)<br />
* DynDNS<br />
* MySQL (Client)<br />
* IRC (Client)<br />
* [[XMPP | XMPP / Jabber Client]]<br />
* MPD (Music Player Daemon)<br />
* [[SOAP]]/XMLRPC<br />
* [[UPnP]]<br />
* [[Artnet]]<br />
<br />
== Hardware Drivers ==<br />
<br />
* [[Onewire]]<br />
* [[I2C]] Master / Slave<br />
* [[ADC input]]<br />
* [[PWM Generator]]<br />
* [[RFM12 FS20]]<br />
* [[RFM12 ASK]]<br />
* [[Bluetooth|Bluetooth SPP]]<br />
* [[USB]]<br />
* [[PS/2 Keyboard]]<br />
* [[Button Input]]<br />
* [[HC595]]<br />
* [[HC165]]<br />
* [[IRMP | IR Receivers]]<br />
* [[SRAM]]<br />
<br />
== Software Modules ==<br />
<br />
* [[Ethersex Lighting Architecture]]<br />
** [[Starburst]]<br />
** [[StellaLight]]<br />
** [[DMX Storage]]<br />
** [[DMX FXSlot]]<br />
* [[Cron Daemon | Cron ]]<br />
* [[System Clock | Clock ]]<br />
* [[VNC Server]]<br />
* [[lome6]]<br />
* [[Frequency Counter]]</div>Mguehttp://www.ethersex.de/index.php?title=Own_module&diff=1170Own module2013-07-24T17:02:22Z<p>Mgue: /* include files in make-process */</p>
<hr />
<div>{{i18n|own_module}}<br />
<br />
Here you can find the most relevant information in order to develop your own module. Note also the project-wide [[Contributing#Coding_Style | coding style]] and other information as described in [[define pins in ethersex]].<br />
<br />
== License ==<br />
In order to publish your module with Ethersex you have to put your code under a GPLv3-compatible license. At best include the following license header in each of your source code files (*.h, *.c):<br />
<br />
/*<br />
*<br />
* Copyright (c) 2012 by YOUR_NAME <FIRST@SIR.net><br />
*<br />
* This program is free software; you can redistribute it and/or<br />
* modify it under the terms of the GNU General Public License<br />
* as published by the Free Software Foundation; either version 3<br />
* of the License, or (at your option) any later version.<br />
*<br />
* This program is distributed in the hope that it will be useful,<br />
* but WITHOUT ANY WARRANTY; without even the implied warranty of<br />
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br />
* GNU General Public License for more details.<br />
*<br />
* You should have received a copy of the GNU General Public License<br />
* along with this program; if not, write to the Free Software<br />
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.<br />
*<br />
* For more information on the GPL, please go to:<br />
* http://www.gnu.org/copyleft/gpl.html<br />
*/<br />
<br />
Don't forget to replace YOUR_NAME with your Name.<br />
<br />
== proper directory == <br />
You can place your module in one of the directories „hardware“, „services“ or „protocols“. If your module fulfills several of these categories, the module may be divided into smaller sub-modules. Detailed descriptions can be found in each directory in the file "content.txt". If you're not sure where to put your module, ask on the mailing list.<br />
<br />
the three categories roughly outlined:<br />
* Hardware: modules to control external hardware.<br />
* Services: modules implementing applications/daemons/services.<br />
* Protocols: modules implementing protocols. <br />
<br />
== include files in make-process ==<br />
Let's assume you've added a file in a subdirectory. In order to make the file known to the make-system you need to create a Makefile, which can look like the following example: <br />
<br />
<pre><br />
TOPDIR ?= ../..<br />
include $(TOPDIR)/.config<br />
<br />
$(DC3840_SUPPORT)_SRC += hardware/camera/dc3840.c<br />
<br />
##############################################################################<br />
# generic fluff<br />
include $(TOPDIR)/scripts/rules.mk<br />
</pre><br />
<br />
Instead of the variable, which ends on _SRC, you can choose one of the following alternatives:<br />
<br />
# the file should be linked always. <pre> SRC += path/yourfile.c </pre><br />
# the files inclusion depends on a config option in Menuconfig. <pre>${YOURBRILLIANTMODUL_SUPPORT}_SRC += path/yourfile.c </pre> <br />
# the files inclusion depends on another config option, if the ecmd parser is enabled. <pre>${YOURBRILLIANTMODUL_SUPPORT}_ECMD_SRC += path/yourfile.c </pre><br />
<br />
Depending on the depth of the folder you have created, the path to your folder must of course adapt the number of '' ../'' to your folder.<br />
<br />
Furthermore, you have to include the directory of your module in the appropriate Makefile (/hardware/Makefile /protocols/Makefile or /services/Makefile).<br />
<br />
Example:<br />
/hardware/Makefile:<br />
SUBSUBDIRS += hardware/camera<br />
<br />
You can also add this entry in the corresponding custom.mk file (e.g. /hardware/custom.mk).<br />
<br />
This has the advantage that any changes in *custom.mk are not tracked by git.<br />
<br />
With this solution you can add own modules without committing them and still be able keep the repository up-to-date.<br />
<br />
== Menuconfig ==<br />
To add your module for graphical configuration (make menuconfig), you need a file in your module folder called config.in, for example, with the following contents:<br />
dep_bool_menu 'brilliant module' YOURBRILLIANTMODUL_SUPPORT $TCP_SUPPORT<br />
This entry creates a submenu and you can activate your module only if TCP_SUPPORT is enabled. To activate your module without dependencies and without an additional menu to choose from you should use be following method:<br />
bool 'brilliant module' YOURBRILLIANTMODUL_SUPPORT<br />
<br />
Analogous to the Makefile you have to include your config.in in $(TOPDIR)/config.in:<br />
source hardware/camera/config.in<br />
<br />
== starting functions after boot and periodically ==<br />
# You have developed a new module, that contains an initialization function which should be called after boot.<br />
# Your module contains a function that is constantly called if possible (or as often as possible, at least as much computing time is left over by the other application which run as a service.<br />
<br />
Therefore are the ''Ethersex Meta'' areas, maybe you've already discovered them at the end of some C-files. It basically has the following structure:<br />
<pre><br />
/ *<br />
- Ethersex META -<br />
mainloop(stella_process)<br />
init(stella_init)<br />
* /<br />
</pre><br />
<br />
These lines, inserted at end of a file, ensure that the function ''stella_init'' is called once at the start of your modified Ethersex-Firmware and the function ''stella_process'' is called as often as possible. You can include multiple ''init'', ''mainloop'' and ... directives in the meta area.<br />
<br />
Other directives are:<br />
* '''initearly''' - works like ''init''. The functions are called just before'' init''. This is useful for dependencies, in general, you should use, however, ''init''.<br />
* '''net_init''' - to initialize network applications. The functions are called after the'' init'' functions.<br />
* '''startup''' - these functions are started before calling the mainloop. The Sendmail service for example sends the start message.<br />
* '''timer''' - Periodically (every 20ms) as in mainloop. Example: timer(50, function()) calls function() every 50*20ms, thus 1x per second.<br />
* '''header''' - not documented<br />
<br />
the functions must be called in case of init without parentheses init(<fkt>) and the timer directive without brackets timer(<int> <fkt>()) . <br />
<br />
== debug output ==<br />
Programming for embedded systems can be quite unnerving sometimes. Normally you do not have the necessary hardware (JTAG) for step-by-step debugging. The Ethersex core offers you some debug output functions to at least observe the program flow via syslog or the serial interface.<br />
<br />
The following debug functions are available after you include core/debug.h in your files:<br />
* void debug_printf(s, args...) // syntax like printf from the standard C library<br />
* char* debug_binary(uint8_t) // returns an 8 Byte long string of 0/1, which represents the integer<br />
<br />
The following debug functions are available after you include protocols/syslog/syslog.h in your files:<br />
* void syslog_sendf(s, args...) // syntax like printf from the standard C library <br />
<br />
[[Category:Ethersex]]<br />
[[Category:StepByStep]]<br />
[[Category:Development]]</div>Mguehttp://www.ethersex.de/index.php?title=Flashing&diff=1100Flashing2013-07-09T15:31:05Z<p>Mgue: more changes, this page should be generic - not netio-only</p>
<hr />
<div>{{i18n|Flashing}}<br />
<br />
= Flashing ethersex =<br />
<br />
This guide assumes that you have a NETIO, made and produced by [http://www.pollin.de Pollin], however every<br />
step should also work with any other board supported by ethersex.<br />
<br />
== What's needed? ==<br />
* AVR Net-IO<br />
* an ISP Programmer, again we assume it the ATMEL Evaluation-Board made by [http://www.pollin.de Pollin]<br />
* an 1-to-1 Cable for the [[ISP]]-Port (10-pin Connector).<br />
<br />
=== Other ISP Programmers ===<br />
<br />
If you have a ISP-Programmer with 6-pin port you can create an adapter. You can see the pin configuration in figure 4-1 at page 5 [http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf AVR042: AVR Hardware Design Considerations].<br />
<br />
Warning: Pin 4 of the 10-pin connector is not used on the Net-IO. GND has to be connected to one of the other Pins (6, 8 or 10)<br />
<br />
== Flashing with Linux ==<br />
* Connect the 10-pin Cable to the ISP-Connector.<br />
* Plug in the power adapter of the AVR Net-IO.<br />
* If everything is connected right, the yellow LED of the Evaluation-Board is shining.<br />
<br />
=== Setting the FUSE-Bits ===<br />
* Calculate the correct FUSE bits for your controller/setup - you can use http://www.engbedded.com/fusecalc/ for that<br />
* '''Important: ''' in the condition as supplied the 644 is programmed to 8 MHz internal RC-Oscillator '''and''' the clock is divided by 8 -> 1 MHz clock speed. If an external Quarz is used, the Bit CKDIV8 has to be set to 0. Also make sure that you leave ''Serial program downloading (SPI)'' enabled!<br />
* Connect the ISP and the power.<br />
* Set the FUSE-Bits with avrdude<br />
* Reset the controller<br />
<br />
=== Flashing the Image ===<br />
<br />
After compiling the ethersex.hex you can flash it with avrdude. The following commands depend on your ISP-Programmer. This example is for a serial connection (e.g. the ATMEL Evaluation-Board):<br />
<br />
avrdude -v -p m32 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex <br />
<br />
For a USB-ISP-Programmer this command should be used:<br />
<br />
avrdude -v -p m32 -c stk500v2 -P /dev/ttyACM0 -U flash:w:ethersex.hex<br />
<br />
For a parallel ISP-Cable:<br />
<br />
avrdude -p m32 -e -c stk200 -U flash:w:ethersex.hex<br />
<br />
Parameters for MyAVR mySmartusb light (the -e is important):<br />
avrdude -p m32 -e -c stk500v2 -P /dev/ttyUSB0 -U flash:w:ethersex.hex<br />
<br />
After flashing remove the ISP-Cable and interrupt the power connection for a short time to reboot the board.<br />
<br />
* -p m32: ATMega32; -p m644: ATMega644<br />
* -v: display debug messages <br />
* -c ponyser: the way avrdude speaks with the Evaluation Board; -c stkk500v2 for the Atmel board<br />
* -P /dev/tty.serial the serial port your programmer is connected to; -P COM1 for windows machines<br />
* -U the command you want to execute. In our case we want to flash: -U flash:w:ethersex.hex<br />
<br />
== Replace ATMega32 with an ATMega644, ATMega644p or ATMega1284p ==<br />
<br />
ATMega644, ATMega644p and ATMega1284p have got a bigger flash then the ATMega32. This gives the possibility to add more modules to your Image.<br />
<br />
=== Swapping the Microcontroller ===<br />
* Disconnect power and ISP-Connector.<br />
* Remove the old processor from your board.<br />
* Insert the new processor while the slot is at the same position as in the socket.<br />
<br />
=== Differences between ATMega32, ATMega644, ATMega644p and ATMega1284p===<br />
<br />
{| border=1 cellspacing=0 padding=4 class=wikitable "<br />
! !! ATMega32 !! ATMega644 !! ATMega644p !! ATMega1284p<br />
|-<br />
| Housing || DIL-40 || DIL-40 || DIL-40 || DIL-40<br />
|-<br />
| MHz || max. 16 || max. 20 || max. 20 || max. 20<br />
|-<br />
| Flash || 32 KB || 64 KB || 64 KB || 128 KB<br />
|-<br />
| EEProm || 1 KB || 2 KB || 2 KB || 4 KB<br />
|-<br />
| RAM || 2 KB || 4 KB || 4 KB || 16 KB<br />
|-<br />
| I/O || 32 || 32 || 32 || 32<br />
|-<br />
| PWM || 4 || 6 || 6 || 6<br />
|-<br />
| ext. INT || 3 || 32 || 32 || 32<br />
|-<br />
| Ser-Port || 1 || 1 || 2 || 2<br />
|}<br />
<br />
====Datasheets====<br />
* [http://www.atmel.com/Images/doc2503.pdf AtMega32]<br />
* [http://www.atmel.com/Images/doc2593.pdf ATMega644]<br />
* [http://www.atmel.com/images/doc8011.pdf ATMega644p]<br />
* [http://www.atmel.com/dyn/resources/prod_documents/8059S.pdf ATMega1284p]<br />
<br />
== Flashing with Windows ==<br />
There a two main possibilities: <br />
#Flash with avrdude<br />
#Flash with AVR Studio<br />
<br />
===Flashing with avrdude===<br />
The flashing with avrdude is just like in Linux.<br />
<br />
You can get the Windows-Binary as a part of [http://sourceforge.net/projects/winavr/ WinAVR]<br />
<br />
In the command line you have to adjust the name of the serial Ports. (COMx instead of /dev/ttyxx) <br />
avrdude -v -p m32 -c ponyser -P com3 -U flash:w:ethersex.hex <br />
<br />
If the programmer is connected via USB you need:<br />
* for real USB-Programmers: libusb0.dll (Part of WinAVR)<br />
* USB-to-Serial Converter a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]<br />
<br />
===Flashing with AVR Studio===<br />
[[AVR Studio]] from Atmel offers a GUI to Controll the ISPs.<br />
<br />
AVR Studio also brings USB-Drivers for the Programmers with it, which can be installed together with it.<br />
<br />
For USB-to-Serial converters you need a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]</div>Mguehttp://www.ethersex.de/index.php?title=Flashing&diff=1099Flashing2013-07-09T15:24:25Z<p>Mgue: rearranged page, removed confusing/dangerous fuse settings, remove liveCD option (currently not available!)</p>
<hr />
<div>{{i18n|Flashing}}<br />
<br />
= Flash AVR Net-IO with "ATMEL Evaluations-Board" made by Pollin=<br />
<br />
As a beginner it's difficult to understand everything in terms of flashing.<br />
And it's also difficult to find all information.<br />
<br />
== What's needed? ==<br />
* AVR Net-IO<br />
* ATMEL Evaluation-Board<br />
* a 1 on 1 Cable for the [[ISP]]-Port (10-pin Connector).<br />
<br />
=== Other ISP Programmers ===<br />
<br />
If you have a ISP-Programmer with 6-pin port you can create an adaptor. You can see the pin configuration in figure 4-1 at page 5 [http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf AVR042: AVR Hardware Design Considerations].<br />
<br />
Warning: Pin 4 of the 10-pin connector is not used on the Net-IO. GND has to be connected to one of the other Pins (6, 8 or 10)<br />
<br />
== Flashing with Linux ==<br />
*Connect the 10-pin Cable to the ISP-Connector.<br />
*Plug in the power adaptor of the AVR Net-IO.<br />
*If everything is connected right, the yellow LED of the Evaluation-Board is shining.<br />
<br />
=== Setting the FUSE-Bits ===<br />
* Calculate the correct FUSE bits for your controller/setup - you can use http://www.engbedded.com/fusecalc/ for that<br />
* '''Important: ''' in the condition as supplied the 644 is programmed to 8 MHz internal RC-Oscillator '''and''' the clock is divided by 8 -> 1 MHz clock speed. If an external Quarz is used, the Bit CKDIV8 has to be set to 0. Also make sure that you leave ''Serial program downloading (SPI)'' enabled!<br />
* Connect the ISP and the power.<br />
* Set the FUSE-Bits with avrdude<br />
* Reset the controller<br />
<br />
=== Flashing the Image ===<br />
<br />
After compiling the ethersex.hex you can flash it with avrdude. The following commands depend on your ISP-Programmer. This example is for a serial connection:<br />
<br />
avrdude -v -p m32 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex <br />
<br />
For a USB-ISP-Programmer this command should be used:<br />
<br />
avrdude -v -p m32 -c stk500v2 -P /dev/ttyACM0 -U flash:w:ethersex.hex<br />
<br />
For a parallel ISP-Cable:<br />
<br />
avrdude -p m32 -e -c stk200 -U flash:w:ethersex.hex<br />
<br />
Parameters for MyAVR mySmartusb light (the -e is important):<br />
avrdude -p m32 -e -c stk500v2 -P /dev/ttyUSB0 -U flash:w:ethersex.hex<br />
<br />
After flashing remove the ISP-Cable and interrupt the power connection for a short time to reboot the board.<br />
<br />
* -p m32: ATMega32; -p m644: ATMega644<br />
* -v: display debug messages <br />
* -c ponyser: the way avrdude speaks with the Evaluation Board; -c stkk500v2 for the Atmel board<br />
* -P /dev/tty.serial the serial port your programmer is connected to; -P COM1 for windows machines<br />
* -U the command you want to execute. In our case we want to flash: -U flash:w:ethersex.hex<br />
<br />
== Replace ATMega32 with an ATMega644, ATMega644p or ATMega1284p ==<br />
<br />
ATMega644, ATMega644p and ATMega1284p have got a bigger flash then the ATMega32. This gives the possibility to add more modules to your Image.<br />
<br />
=== Swapping the Microcontroller ===<br />
* Disconnect power and ISP-Connector.<br />
* Remove the old processor from your board.<br />
* Insert the new processor while the slot is at the same position as in the socket.<br />
<br />
=== Differences between ATMega32, ATMega644, ATMega644p and ATMega1284p===<br />
<br />
{| border=1 cellspacing=0 padding=4 class=wikitable "<br />
! !! ATMega32 !! ATMega644 !! ATMega644p !! ATMega1284p<br />
|-<br />
| Housing || DIL-40 || DIL-40 || DIL-40 || DIL-40<br />
|-<br />
| MHz || max. 16 || max. 20 || max. 20 || max. 20<br />
|-<br />
| Flash || 32 KB || 64 KB || 64 KB || 128 KB<br />
|-<br />
| EEProm || 1 KB || 2 KB || 2 KB || 4 KB<br />
|-<br />
| RAM || 2 KB || 4 KB || 4 KB || 16 KB<br />
|-<br />
| I/O || 32 || 32 || 32 || 32<br />
|-<br />
| PWM || 4 || 6 || 6 || 6<br />
|-<br />
| ext. INT || 3 || 32 || 32 || 32<br />
|-<br />
| Ser-Port || 1 || 1 || 2 || 2<br />
|}<br />
<br />
====Datasheets====<br />
* [http://www.atmel.com/Images/doc2503.pdf AtMega32]<br />
* [http://www.atmel.com/Images/doc2593.pdf ATMega644]<br />
* [http://www.atmel.com/images/doc8011.pdf ATMega644p]<br />
* [http://www.atmel.com/dyn/resources/prod_documents/8059S.pdf ATMega1284p]<br />
<br />
== Flashing with Windows ==<br />
There a two main possibilities: <br />
#Flash with avrdude<br />
#Flash with AVR Studio<br />
<br />
===Flashing with avrdude===<br />
The flashing with avrdude is just like in Linux.<br />
<br />
You can get the Windows-Binary as a part of [http://sourceforge.net/projects/winavr/ WinAVR]<br />
<br />
In the command line you have to adjust the name of the serial Ports. (COMx instead of /dev/ttyxx) <br />
avrdude -v -p m32 -c ponyser -P com3 -U flash:w:ethersex.hex <br />
<br />
If the programmer is connected via USB you need:<br />
* for real USB-Programmers: libusb0.dll (Part of WinAVR)<br />
* USB-to-Serial Converter a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]<br />
<br />
===Flashing with AVR Studio===<br />
[[AVR Studio]] from Atmel offers a GUI to Controll the ISPs.<br />
<br />
AVR Studio also brings USB-Drivers for the Programmers with it, which can be installed together with it.<br />
<br />
For USB-to-Serial converters you need a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]</div>Mguehttp://www.ethersex.de/index.php?title=Flashing&diff=1098Flashing2013-07-09T15:14:50Z<p>Mgue: typo</p>
<hr />
<div>{{i18n|Flashing}}<br />
<br />
= Flash AVR Net-IO with "ATMEL Evaluations-Board" made by Pollin=<br />
<br />
As a beginner it's difficult to understand everything in terms of flashing.<br />
And it's also difficult to find all information.<br />
<br />
== What's needed? ==<br />
* AVR Net-IO<br />
* ATMEL Evaluation-Board<br />
* a 1 on 1 Cable for the [[ISP]]-Port (10-pin Connector).<br />
<br />
=== Other ISP Programmers ===<br />
<br />
If you have a ISP-Programmer with 6-pin port you can create an adaptor. You can see the pin configuration in figure 4-1 at page 5 [http://www.atmel.com/dyn/resources/prod_documents/doc2521.pdf AVR042: AVR Hardware Design Considerations].<br />
<br />
Warning: Pin 4 of the 10-pin connector is not used on the Net-IO. GND has to be connected to one of the other Pins (6, 8 or 10)<br />
<br />
== Flashing with Linux ==<br />
*Connect the 10-pin Cable to the ISP-Connector.<br />
*Plug in the power adaptor of the AVR Net-IO.<br />
*If everything is connected right, the yellow LED of the Evaluation-Board is shining.<br />
<br />
After compiling the ethersex.hex you can flash it with avrdude. The following commands depend on your ISP-Programmer. This example is for a serial connection:<br />
<br />
avrdude -v -p m32 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex <br />
<br />
For a USB-ISP-Programmer this command should be used:<br />
<br />
avrdude -v -p m32 -c stk500v2 -P /dev/ttyACM0 -U flash:w:ethersex.hex<br />
<br />
For a parallel ISP-Cable:<br />
<br />
avrdude -p m32 -e -c stk200 -U flash:w:ethersex.hex<br />
<br />
After flashing remove the ISP-Cable and interrupt the power connection for a short time to reboot the board.<br />
<br />
* -p m32: ATMega32; -p m644: ATMega644<br />
* -v: display debug messages <br />
* -c ponyser: the way avrdude speaks with the Evaluation Board; -c stkk500v2 for the Atmel board<br />
* -P /dev/tty.serial the serial port your programmer is connected to; -P COM1 for windows machines<br />
* -U the command you want to execute. In our case we want to flash: -U flash:w:ethersex.hex<br />
<br />
In some cases you have to set the FUSE Bits, which is possible with this command:<br />
<br />
* -U lfuse:w:0xCF:m -U hfuse:w:0xDC:m<br />
<br />
To get the correct FUSE-Settings you should visit http://www.engbedded.com/fusecalc/<br />
<br />
Parameters for MyAVR mySmartusb light (the -e is important):<br />
avrdude -p m32 -e -c stk500v2 -P /dev/ttyUSB0 -U flash:w:ethersex.hex<br />
<br />
== Replace ATMega32 with an ATMega644, ATMega644p or ATMega1284p ==<br />
<br />
ATMega644, ATMega644p and ATMega1284p have got a bigger flash then the ATMega32. This gives the possibility to add more modules to your Image.<br />
<br />
=== Swapping the Microcontroller ===<br />
* Disconnect power and ISP-Connector.<br />
* Remove the old processor from your board.<br />
* Insert the new processor while the slot is at the same position as in the socket.<br />
<br />
=== Setting the FUSE-Bits ===<br />
* Reconnect the ISP and the power.<br />
* Set the FUSE-Bits.<br />
* '''Important: ''' in the condition as supplied the 644 is programmed to 8 MHz internal RC-Oscillator '''and''' the clock is divided by 8 -> 1 MHz clock speed. If an external Quarz is used, the Bit CKDIV8 has to be set to 0.<br />
<br />
<br />
* (taken from dinus) The ATMega has a clock speed of 1 MHz, no JTAG.<br />
avrdude -p m644 -c ponyser -P /dev/ttyS0 -U lfuse:w:0xE7:m -U hfuse:w:0xDC:m -U efuse:w:0xFF:m<br />
<br />
Fuse-Bits from "DiDi". JTAG is turned ON.<br />
<br />
* -U lfuse:w:0xf7:m -U hfuse:w:0x99:m -U efuse:w:0xfc:m<br />
<br />
Fuse-Bits from "loddel". JTAG is turned OFF.<br />
<br />
* -U lfuse:w:0xf7:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m<br />
* -U lfuse:w:0xe7:m -U hfuse:w:0xd9:m -U efuse:w:0xff:m<br />
<br />
Fuse-Bits from "Gregor". "The 644 runs at 16 MHz Quartz and is not divided by 8." JTAG is turned ON.<br />
<br />
* -U lfuse:w:0xef:m -U hfuse:w:0x99:m -U efuse:w:0xff:m<br />
<br />
=== flash Ethersex ===<br />
* change Config of Ethersex (make menuconfig) to ATMega644 and build (make)<br />
* flash with <br />
avrdude -p m644 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex -v<br />
<br />
=== Differences between ATMega32, ATMega644, ATMega644p and ATMega1284p===<br />
<br />
{| border=1 cellspacing=0 padding=4 class=wikitable "<br />
! !! ATMega32 !! ATMega644 !! ATMega644p !! ATMega1284p<br />
|-<br />
| Housing || DIL-40 || DIL-40 || DIL-40 || DIL-40<br />
|-<br />
| MHz || max. 16 || max. 20 || max. 20 || max. 20<br />
|-<br />
| Flash || 32 KB || 64 KB || 64 KB || 128 KB<br />
|-<br />
| EEProm || 1 KB || 2 KB || 2 KB || 4 KB<br />
|-<br />
| RAM || 2 KB || 4 KB || 4 KB || 16 KB<br />
|-<br />
| I/O || 32 || 32 || 32 || 32<br />
|-<br />
| PWM || 4 || 6 || 6 || 6<br />
|-<br />
| ext. INT || 3 || 32 || 32 || 32<br />
|-<br />
| Ser-Port || 1 || 1 || 2 || 2<br />
|}<br />
<br />
====Datasheets====<br />
* [http://www.atmel.com/Images/doc2503.pdf AtMega32]<br />
* [http://www.atmel.com/Images/doc2593.pdf ATMega644]<br />
* [http://www.atmel.com/images/doc8011.pdf ATMega644p]<br />
* [http://www.atmel.com/dyn/resources/prod_documents/8059S.pdf ATMega1284p]<br />
<br />
== Flashing with Windows ==<br />
There a two main possibilities: <br />
#Flash with avrdude<br />
#Flash with AVR Studio<br />
<br />
If you don't want to install one of those programs, there is a [[Live CD]] to use.<br />
<br />
===Flashing with avrdude===<br />
The flashing with avrdude is just like in Linux.<br />
<br />
You can get the Windows-Binary as a part of [http://sourceforge.net/projects/winavr/ WinAVR]<br />
<br />
In the command line you have to adjust the name of the serial Ports. (COMx instead of /dev/ttyxx) <br />
avrdude -v -p m32 -c ponyser -P com3 -U flash:w:ethersex.hex <br />
<br />
If the programmer is connected via USB you need:<br />
* for real USB-Programmers: libusb0.dll (Part of WinAVR)<br />
* USB-to-Serial Converter a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]<br />
<br />
===Flashing with AVR Studio===<br />
[[AVR Studio]] from Atmel offers a GUI to Controll the ISPs.<br />
<br />
AVR Studio also brings USB-Drivers for the Programmers with it, which can be installed together with it.<br />
<br />
For USB-to-Serial converters you need a matching Driver: [http://www.ftdichip.com/Drivers/VCP.htm]<br />
<br />
== Live-CD ==<br />
You don't have to worry about your System if you use a Live CD to flash your build.<br />
<br />
* Download and burn the CD: [http://www.ethersex.de/index.php?title=Live_CD]<br />
* Get the libncurses5 Package: apt-get install libncurses5-dev<br />
* Update and install the software for ethersex just like described here: [http://ethersex.de/index.php/Quick_Start_Guide/Preparation]<br />
* If menuconfig fails try this command: apt-get install dialog<br />
* Flash like described in the "Flashing with Linux" section is described.</div>Mguehttp://www.ethersex.de/index.php?title=Onewire&diff=1097Onewire2013-07-09T15:10:06Z<p>Mgue: added client code</p>
<hr />
<div>{{i18n|Onewire}}<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
= Pinning =<br />
<br />
Define your Onewire Pins with <br />
<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PX#, PX@)<br />
</source><br />
where<br />
* PX# is a pin on PORTX<br />
* PX@ is a pin on PORTX<br />
<br />
every pin between and including PX# and PX@ will be a seperate Onewire bus.<br />
You can define up to eight buses on one PORT (all buses must be on the same PORT!)<br />
<br />
If you just need a single bus, define the range like this: <br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PX#, PX#)<br />
</source><br />
== Example ==<br />
'''PORTD: PIN2, PIN3, PIN4'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD4)<br />
</source><br />
= Polling Mode =<br />
= Client Code =<br />
The following scripts can be used to read onewire temperatures on a host computer using ECMD.<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.php PHP]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.pl Perl]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.py Python]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.sh sh/bash]</div>Mguehttp://www.ethersex.de/index.php?title=Onewire_(Deutsch)&diff=1096Onewire (Deutsch)2013-07-09T15:08:10Z<p>Mgue: moved to ethersex-tools</p>
<hr />
<div>{{i18n|Onewire}}<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]] [[HTTPD]] (optional) [[SNMP]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
Ethersex kann 1-wire Temperatursensoren mit [[ECMD]] auflisten und abfragen. Es wird eine reine<br />
Softwareimplementierung des Protokolls benutzt, was keine weiteren Hardware erfordert, als die<br />
Temperatursensoren selbst.<br />
<br />
= Pinning =<br />
<br />
In der Standardkonfiguration liegt der Datapin des Buses auf PD6 (kann z.B. in der pinning/hardware/netio.m4<br />
oder pinning/hardware/etherrape.m4 geändert werden). Die Definition der Pins erfolgt mit:<br />
<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PXn, PXm)<br />
</source><br />
<br />
wobei PXn und PNm Pins auf PORTX sind.<br />
<br />
Jeder Pin zwischen und einschließlich PXn und PXm bildet einen eingenständigen Onewire Bus.<br />
Du kannst bis zu acht Busse auf einem PORT definieren (alle Busse müssen auf dem selben PORT liegen!)<br />
<br />
== Beispiele ==<br />
<br />
Wenn Du nur einen einzigen Bus benötigst, definiere den Bereich wie folgt:<br />
<br />
'''PORTD: PIN2'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD2)<br />
</source><br />
<br />
Für drei Busse würde das ganze etwa so aussehen:<br />
<br />
'''PORTD: PIN2, PIN3, PIN4'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD4)<br />
</source><br />
<br />
= Polling Modus =<br />
<br />
│ │ [*] Onewire Polling │ │ <br />
│ │ (375) Time between discoveries in 1s steps │ │ <br />
│ │ (12) Time between polling in 1s steps │ │ <br />
│ │ [*] ECMD 1w list with values │ │ <br />
│ │ (10) Maximum sensor count │ │ <br />
<br />
Im Polling-Modus werden die Sensoren im Hintergrund abgefragt, so dass die Werte<br />
bei Bedarf direkt zur Verfügung stehen und nicht erst gewandelt bzw.<br />
eingelesen werden müssen. Der Intervall zwischen den Discoveries und zwischen<br />
den Abfragen der Werte kann getrennt eingestellt werden. Die Option<br />
'''ECMD 1w list with values''' bietet die Möglichkeit, die aktuellen Werte<br />
bei Aufruf von '''1w list''' mit ausgeben zu lassen. So können darauf folgende<br />
'''1w get''' Kommandos entfallen.<br />
<br />
Da zur Pufferung der Werte, ROM-Codes, etc. RAM-Speicher benötigt wird, muss<br />
per '''Maximum sensor count''' angegeben werden, für wie viele Sensoren Speicher<br />
reserviert wird.<br />
<br />
= Benennung von Sensoren =<br />
<br />
│ │ [*] Onewire naming support │ │ <br />
│ │ (10) Maximum sensor count │ │ <br />
<br />
Um den Sensoren sinnvolle Namen zu geben besteht die Möglichkeit im EEPROM<br />
eine entsprechende Zuweisungstabelle anzulegen (ROM-Code -> Name). Die Namen werden<br />
bei bei Aufruf von '''1w list''' mit ausgegeben. Dazu gibt es<br />
folgende ECMD Kommandos:<br />
<br />
1w name list<br />
<br />
Auflistung der aktuellen Zuweisungen (Spalten: ID, ROM-Code, Name). Die ID bezeichnet<br />
die Position in der Zuweisungstabelle und kann u.a. dazu benutzt werden, Sensoren<br />
bei SNMP-Abfragen eindeutig zu referenzieren.<br />
<br />
1w name set <ID> <ROM-Code> <Name><br />
<br />
Erstellt einen entsprechenden Tabelleneintrag.<br />
<br />
1w name clear <ID><br />
<br />
Löscht die Felder eines Tabelleneintrags.<br />
<br />
1w name save<br />
<br />
Speichert die aktuelle Tabelle im EEPROM<br />
<br />
= Unterstützte Hardware =<br />
<br />
Folgende 1-wire Hardware wird momentan durch Ethersex unterstützt:<br />
* DS1820 (Temperatursensor)<br />
* DS18B20 (Temperatursensor)<br />
* DS1822 (Temperatursensor)<br />
* DS2502 (EEPROM)<br />
* [[Onewire/DS2450 (Deutsch) | DS2450 (4 Kanal ADC)]]<br />
<br />
= Onewire Befehle =<br />
<br />
unter Linux als erstes netcat starten (hierbei natürlich die IP ggf modifizieren): <br />
<br />
netcat 192.168.0.15 2701<br />
<br />
danach am prompt:<br />
<br />
1w list<br />
<br />
Gibt eine Liste mit Hexcodes aller angeschlossenen und erkannten Onewire(tm) Sensoren aus.<br />
Bei aktiviertem Naming-Support wird (per TAB getrennt) zusätzlich der Name ausgegeben. Außerdem<br />
kann mit '''ECMD 1w list with values (ONEWIRE_ECMD_LIST_VALUE_SUPPORT)''' der aktuelle Temperaturwert<br />
mit ausgegeben werden. Dies erspart zusätzliche '''1w get''' Aufrufe, setzt allerding Polling-Support<br />
vorraus.<br />
<br />
1w convert <hexcode><br />
<br />
Veranlasst eine Temperaturmessung des addressierten Sensors, oder, wenn das Argument <hexcode><br />
weggelassen wird, aller angeschlossener Sensoren. Im Polling-Modus wird dieses Kommando ignoriert.<br />
<br />
1w get <hexcode><br />
<br />
Gibt die gemessene Temperatur eines Sensors aus.<br />
<br />
= Einbindung in die [[HTTPD]]-Weboberfläche =<br />
<br />
Unter httpd/embed/ow.ht.m4, bzw httpd/embed/Xow.ht.m4 liegt eine Weboberflaeche, die alle Sensoren erkennt<br />
und ihre aktuelle Temperatur regelmässig per Ajax abfragt und anzeigt. Im Falle von Xow.ht.m4 wird sogar<br />
Graph der Temperatur mittels SVG gemalt. Um die Dateien einzubinden, muss man einfach bei aktiviertem<br />
Onewiresupport den Webserver und das Datei Inlining aktivieren.<br />
<br />
Die Dateien können dann unter ow.ht bzw. unter Xow.ht angezeigt werden. Das Beispiel zeigt die SVG-Version<br />
mit Naming-Support:<br />
<br />
[[File:onewire-svg.png]]<br />
<br />
= Anschluss AVR-NET-IO =<br />
Für das Pollin AVR-NET-IO Board können die Sensoren DS18S20+ , <br />
<br />
normal Betrieb<br />
<br />
[[File:netio-1wire_normal.png]]<br />
<br />
parasitären Modus<br />
<br />
[[File:netio-1wire.png]]<br />
<br />
Anmerkung: Wenn man beim Net-IO nicht alle Analogeingänge benötigt, lässt sich der 1-Wire-Bus auch an der<br />
Schraubklemme ADC1 ganz gut aufschalten. Vorteil ist, dass man gleich alle passenden Spannungen (GND, +5V)<br />
an den beiden nebenliegenden Schraubklemmen hat. Das Pinning muss dann entspechend in der kann in der Datei<br />
pinning/hardware/netio.m4 von PD6 auf PA4 geändert werden. Vorteil dieser Konfiguration ist, dass man den<br />
DB-25-Verbinder zum Anschluss der Relaisplatine K8IO von Pollin frei hat und den EXT Steckverbinder zum<br />
Anschluss eines LCD über ein 4bit-Interface nutzen kann, ohne die Erweiterungsplatine von Pollin zu benötigen.<br />
<br />
Pinbelegung:<br />
<br />
[[File:ds18s20-par-pinout.jpg]]<br />
<br />
= Anschluss Etherrape =<br />
<br />
Die Schaltung je nach parasitärem oder normalem Betriebsmodus kann aus der NetIO Skizze übernommen werden.<br />
Data liegt auf PORTD an Pin 7:<br />
<br />
PORTD<br />
+---+<br />
|x x|<br />
|x X| <- Pin 7<br />
|x x<br />
|x x|<br />
|x x|<br />
+---+<br />
<br />
Direkt neben PORTD befinden sich 2 Pins mit GND und 5V als Beschriftung. <br />
GND kann als GND und 5V als Vcc genutzt werden.<br />
<br />
= Einbindung in [[Control6]] =<br />
<br />
Die Sensoren können mit '''ONEWIRE_GET(sensor-id)''' oder '''ONEWIRE_GET_BY_NAME(sensor-name)''' einfach<br />
abgefragt werden. Die Funktion führt automatisch ein ''convert'' aus, es sind also keine zwei Schritte<br />
erforderlich wie bei dem Zugriff über [[ECMD]]. Die Rückgabe erfolgt (analog der Funktion '''KTY_GET''')<br />
in Centigrad, also Temperatur * 10. <br />
<br />
Hier vielleicht ein kleines Beispiel, das die Daten per [[SYSLOG]] ausgibt sobald sich die Temperatur<br />
um mehr als ein Grad zur letzten Messung verändert hat.<br />
<br />
<pre><br />
#include <stdlib.h><br />
<br />
int16_t Temperatur;<br />
int16_t Temperatur_alt;<br />
<br />
CONTROL_START<br />
<br />
THREAD(read_temp)<br />
Temperatur = ONEWIRE_GET(10d85594010800eb);<br />
ON abs(Temperatur-Temperatur_alt)>10 DO<br />
uint8_t sign = Temperatur<0;<br />
div_t res = div(abs(Temperatur),10);<br />
SYSLOG("temperature changed %S%d.%d",sign?PSTR("-"):PSTR(""),res.quot,res.rem)<br />
Temperatur_alt = Temperatur;<br />
END<br />
WAIT(15);<br />
THREAD_END(read_temp)<br />
<br />
ON STARTUP DO<br />
Temperatur = Temperatur_alt = 0;<br />
THREAD_START(read_temp);<br />
END<br />
<br />
CONTROL_END<br />
</pre><br />
<br />
= Abfrage per [[SNMP]] =<br />
<br />
Falls Polling-Support aktiviert wurde können die Sensorwerte per SNMP abgefragt werden.<br />
Mit Naming-Support stehen auch die Namen per SNMP zur Verfügung und die Index-Nummern sind<br />
fix auf die Position in der Namenstabelle festgelegt. Dies ist sehr hilfreich, um bestimmte<br />
Sensoren über den SNMP-Index anzusprechen.<br />
<br />
Es gibt folgende OIDs:<br />
<br />
* .1.3.6.1.4.1.39967.3.1.<idx> : ROM-Code des Sensors<br />
* .1.3.6.1.4.1.39967.3.2.<idx> : Sensor-Name (nur mit Naming-Support)<br />
* .1.3.6.1.4.1.39967.3.3.<idx> : Temperaturwert in Centigrad<br />
* .1.3.6.1.4.1.39967.3.4.<idx> : 0 = Sensor nicht vorhanden, 1 = Sensor vorhanden<br />
<br />
Hier ein Beispiel:<br />
<br />
<pre><br />
# snmpwalk -Osn -c public -v 1 192.168.255.90 1.3.6.1.4.1.39967.3<br />
.1.3.6.1.4.1.39967.3.1.0 = STRING: "1080cff6010800f9"<br />
.1.3.6.1.4.1.39967.3.1.1 = STRING: "10c8cff60108002d"<br />
.1.3.6.1.4.1.39967.3.1.2 = STRING: "1029f6dc0108002f"<br />
.1.3.6.1.4.1.39967.3.1.3 = STRING: "10f2d0f60108001c"<br />
.1.3.6.1.4.1.39967.3.1.4 = STRING: "105a17f70108001d"<br />
.1.3.6.1.4.1.39967.3.1.5 = STRING: "10b8d8f601080098"<br />
.1.3.6.1.4.1.39967.3.1.6 = STRING: "104dedf601080057"<br />
.1.3.6.1.4.1.39967.3.1.7 = STRING: "10011af701080027"<br />
.1.3.6.1.4.1.39967.3.1.8 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.39967.3.1.9 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.39967.3.2.0 = STRING: "kessel"<br />
.1.3.6.1.4.1.39967.3.2.1 = STRING: "warmwasser"<br />
.1.3.6.1.4.1.39967.3.2.2 = STRING: "aussen"<br />
.1.3.6.1.4.1.39967.3.2.3 = STRING: "speicher"<br />
.1.3.6.1.4.1.39967.3.2.4 = STRING: "heizung vl"<br />
.1.3.6.1.4.1.39967.3.2.5 = STRING: "heizung rl"<br />
.1.3.6.1.4.1.39967.3.2.6 = STRING: "boiler vl"<br />
.1.3.6.1.4.1.39967.3.2.7 = STRING: "boiler rl"<br />
.1.3.6.1.4.1.39967.3.2.8 = ""<br />
.1.3.6.1.4.1.39967.3.2.9 = ""<br />
.1.3.6.1.4.1.39967.3.3.0 = INTEGER: 334<br />
.1.3.6.1.4.1.39967.3.3.1 = INTEGER: 467<br />
.1.3.6.1.4.1.39967.3.3.2 = INTEGER: 127<br />
.1.3.6.1.4.1.39967.3.3.3 = INTEGER: 185<br />
.1.3.6.1.4.1.39967.3.3.4 = INTEGER: 318<br />
.1.3.6.1.4.1.39967.3.3.5 = INTEGER: 269<br />
.1.3.6.1.4.1.39967.3.3.6 = INTEGER: 366<br />
.1.3.6.1.4.1.39967.3.3.7 = INTEGER: 291<br />
.1.3.6.1.4.1.39967.3.3.8 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.3.9 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.4.0 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.1 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.2 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.3 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.4 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.5 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.6 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.7 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.8 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.4.9 = INTEGER: 0<br />
</pre><br />
<br />
= Codebeispiele =<br />
<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.php PHP]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.pl Perl]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.py Python]<br />
* [https://github.com/ethersex/ethersex-tools/blob/master/hardware/onewire/onewire_request.sh sh/bash]<br />
<br />
[[Category:Ethersex]]<br />
[[Category:StepByStep]]<br />
[[Category:Onewire]]<br />
<br />
= Bezugsquellen =<br />
<br />
Laut Michael Schultz (k1w1) hat er immer DS1820 auf Lager und kann sie sehr günstig weiterverkaufen. Auch Mindermengen. Mail: ethersex [AT] keyb [DOT] de und natürlich bei den üblichen Verdächtigen: Reichelt, Segor, Conrad.</div>Mguehttp://www.ethersex.de/index.php?title=Template:Occupies_timer&diff=1016Template:Occupies timer2013-04-02T20:34:26Z<p>Mgue: link test</p>
<hr />
<div>[[:Category:Module that uses Timer {{{1}}}| Timer {{{1}}}]]<br />
[[Category:Module that uses Timer {{{1}}}| ]]</div>Mguehttp://www.ethersex.de/index.php?title=StellaLight&diff=1015StellaLight2013-04-02T20:21:27Z<p>Mgue: timer</p>
<hr />
<div>{{i18n|StellaLight}}<br />
{{Module<br />
|NAME=StellaLight<br />
|MENUCONFIG={{Applications}}->StellaLight: Multichannel pwm<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|DEPENDS=[[DMX Storage]] (optional), udpStella (optional)<br />
|REQUIRES=<br />
|TIMER={{occupies_timer|2}}<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/services/stella https://github.com/ethersex/ethersex/tree/master/services/stella]<br />
}}<br />
<br />
StellaLight produces PWM signals on up to 16 independent pins for driving LEDs or servo motors. <br />
<br />
== Internals ==<br />
<br />
Stella uses an 8-bit Timer of your choice for producing the PWM signals. Since the overflow interrupts need to be very consistent, StellaLight will not work flawlessy when other modules are active that disable the interrupts for a short amount of time.<br />
<br />
This is a list of module where you can expect some problems with: [[Onewire]], [[RFM12]] (please add more if you find some).<br />
<br />
Moreover StellaLight does not support [http://en.wikipedia.org/wiki/Gamma_correction Gamma Correction] since that would require at least 10-12 bit PWM.<br />
<br />
== Configuration ==<br />
<br />
In Menuconfig you can select the prescaler. '''The higher the frequency, the more often the StellaLight PWM functions will be executed, leading to an higher overall load of the device. So if you run into problems, try decreasing the frequency, ergo increase the prescaler.''' <br />
<br />
{| border="1"<br />
! Option <br />
! Prescaler<br />
|-<br />
| Very slow <br />
| 1024<br />
|-<br />
| Slow <br />
| 256<br />
|-<br />
| Normal <br />
| 128<br />
|-<br />
| Fast <br />
| 64<br />
|-<br />
|}<br />
<br />
You can calculate the resulting frequency by using this formula:<br />
<br />
F_CPU: The clockspeed of your AVR (like 8Mhz, 16Mhz etc.)<br />
<br />
''F_STELLA=F_CPU/Prescaler/512''<br />
<br />
So given a setting of "Normal" on a 16Mhz device will result in '''244Hz''' which is pretty good for most setups. So more than enough for the human eye (10 times more)<br />
<br />
If you have enabled [[DMX Storage]] in Menuconfig, you also can set the universe and start channel of StellaLight, so you can control StellaLight via [[Artnet]] or [[DMX FXSlot]].<br />
<br />
== Pinning ==<br />
<br />
{| border="1"<br />
|-<br />
| STELLA_PORT1_RANGE(PX'''I''',PX'''J''') <br />
| sets the range ('''I''' to '''J''') of StellaLight controlled pins on PORTX<br />
|-<br />
| STELLA_PORT2_RANGE(PX2'''I''',PX2'''J''') <br />
| sets the range ('''I''' to '''J''') of StellaLight controlled pins on PORTX2<br />
|-<br />
| STELLA_USE_TIMER('''I''') <br />
| programs Timer'''I''' for StellaLight<br />
|-<br />
|}<br />
<br />
Two examples:<br />
<br />
'''1. 3 LEDs (e.g. RGB) on PORTA, Pins: 0,1,2'''<br />
<source lang="c"><br />
ifdef(`conf_STELLA', `dnl<br />
STELLA_PORT1_RANGE(PA0,PA2)<br />
STELLA_USE_TIMER(2)<br />
')dnl<br />
</source><br />
<br />
'''2. 15 LEDs (e.g. 5x RGB) on PORTA, Pins: 0,1,2,3,4,5,6,7 on PORTD, Pins: 0,1,2,3,4,5,6'''<br />
<source lang="c" ><br />
ifdef(`conf_STELLA', `dnl<br />
STELLA_PORT1_RANGE(PA0,PA7)<br />
STELLA_PORT2_RANGE(PD0,PD6)<br />
STELLA_USE_TIMER(2)<br />
')dnl<br />
</source><br />
<br />
== udp control ==<br />
We recommend to use the [[DMX Storage]]. But for easy set ups it is possible to use a simple udp protocol to control stella channels.<br />
Activate protocols->udpStella and configure the port.<br />
A datagram for stella has three bytes:<br />
<br />
{| border="1"<br />
! Byte #<br />
! Semantic<br />
! Valid values<br />
|-<br />
| 1<br />
| Command Byte<br />
|<br />
STELLA_SET_IMMEDIATELY=0,<br />
STELLA_SET_FADE=1,<br />
STELLA_SET_FLASHY=2,<br />
STELLA_SET_IMMEDIATELY_RELATIVE=3,<br />
STELLA_SET_FADESTEP=4,<br />
STELLA_GETALL = 255<br />
|-<br />
| 2<br />
| Channel<br />
| 0-15 <br />
|-<br />
| 3<br />
| Value<br />
| 0-255<br />
|-<br />
|}<br />
<br />
You will get back an UDP datagram if you send the STELLA_GETALL command. It consists of an identifier ["STELLA"]+[Amount of channels]+[channel#1]+..+[channel#n]<br />
<br />
== Alternative ==<br />
<br />
Have a look at [[Starburst]] for an improved and more resource-conserving solution.<br />
<br />
[[Category:e6la]]</div>Mguehttp://www.ethersex.de/index.php?title=Template:Module&diff=1014Template:Module2013-04-02T20:20:45Z<p>Mgue: docu</p>
<hr />
<div><onlyinclude>{| style="float:right;margin:1em 0 1em 1em; border:1px #AAA solid;background: #f9f9f9;width:330px; font-size:95%;margin-top:0px;"<br />
!colspan="2" style="background-color:#CEDAF2; text-align:center"| {{#if: {{{NAME|}}}|<big>{{{NAME}}}</big>|<big>{{PAGENAME}}</big>}}<br />
|-<br />
{{#if: {{{STATUS|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Status<br />
{{!}} {{{STATUS}}}<br />
}}<br />
|-<br />
{{#if: {{{MENUCONFIG|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}menuconfig<br />
{{!}} {{{MENUCONFIG}}}<br />
}}<br />
|-<br />
{{#if: {{{PINNING|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Pinning<br />
{{!}} {{{PINNING}}}<br />
}}<br />
|-<br />
{{#if: {{{ECMD|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Ecmd<br />
{{!}} {{{ECMD}}}<br />
}}<br />
|-<br />
{{#if: {{{CONTROL6|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Control6<br />
{{!}} {{{CONTROL6}}}<br />
}}<br />
|-<br />
{{#if: {{{TIMER|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Uses Timer<br />
{{!}} {{{TIMER}}}<br />
}}<br />
|-<br />
{{#if: {{{DEPENDS|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Depends on<br />
{{!}} {{{DEPENDS}}}<br />
}}<br />
|-<br />
{{#if: {{{REQUIRES|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Requires<br />
{{!}} {{{REQUIRES}}}<br />
}}<br />
|-<br />
{{#if: {{{CODE|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Code<br />
{{!}} {{{CODE}}}<br />
}}<br />
|-<br />
|}</onlyinclude><br />
<br />
<br />
<br />
== Templates for menuconfig ==<br />
<br />
If you use one of the following templates, the module will automatically added to the proper category<br />
<br />
{{Codeline|<nowiki>{{I/O}}</nowiki>}}<br />
<br />
{{Codeline|<nowiki>{{Protocols}}</nowiki>}}<br />
<br />
{{Codeline|<nowiki>{{Applications}}</nowiki>}}<br />
<br />
<br />
== Templates for STATUS ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{stable}}</nowiki>}}<br />
{{stable}}<br />
{{Codeline|<nowiki>{{Experimental}}</nowiki>}}<br />
{{Experimental}}<br />
{{Codeline|<nowiki>{{In_Development}}</nowiki>}}<br />
{{In Development}}<br />
{{Codeline|<nowiki>{{Unstable}}</nowiki>}}<br />
{{Unstable}}<br />
{{Codeline|<nowiki>{{Deprecated}}</nowiki>}}<br />
{{Deprecated}}<br />
|}<br />
<br />
== Templates for ECMD ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{has_ecmd}}</nowiki>}}<br />
|}<br />
or leave blank<br />
<br />
== Templates for CONTROL6 ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{has_control6}}</nowiki>}}<br />
|}<br />
or leave blank<br />
<br />
== Templates for TIMER ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{occupies_timer|VALUE}}</nowiki>}}<br />
|}<br />
or leave blank<br />
<br />
== Example ==<br />
<br />
<pre><nowiki><br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}</nowiki></pre><br />
<br />
== Result ==<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|TIMER={{occupies_timer|1}}<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}</div>Mguehttp://www.ethersex.de/index.php?title=Template:Module&diff=1013Template:Module2013-04-02T20:17:37Z<p>Mgue: TIMER test</p>
<hr />
<div><onlyinclude>{| style="float:right;margin:1em 0 1em 1em; border:1px #AAA solid;background: #f9f9f9;width:330px; font-size:95%;margin-top:0px;"<br />
!colspan="2" style="background-color:#CEDAF2; text-align:center"| {{#if: {{{NAME|}}}|<big>{{{NAME}}}</big>|<big>{{PAGENAME}}</big>}}<br />
|-<br />
{{#if: {{{STATUS|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Status<br />
{{!}} {{{STATUS}}}<br />
}}<br />
|-<br />
{{#if: {{{MENUCONFIG|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}menuconfig<br />
{{!}} {{{MENUCONFIG}}}<br />
}}<br />
|-<br />
{{#if: {{{PINNING|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Pinning<br />
{{!}} {{{PINNING}}}<br />
}}<br />
|-<br />
{{#if: {{{ECMD|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Ecmd<br />
{{!}} {{{ECMD}}}<br />
}}<br />
|-<br />
{{#if: {{{CONTROL6|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Control6<br />
{{!}} {{{CONTROL6}}}<br />
}}<br />
|-<br />
{{#if: {{{TIMER|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Uses Timer<br />
{{!}} {{{TIMER}}}<br />
}}<br />
|-<br />
{{#if: {{{DEPENDS|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Depends on<br />
{{!}} {{{DEPENDS}}}<br />
}}<br />
|-<br />
{{#if: {{{REQUIRES|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Requires<br />
{{!}} {{{REQUIRES}}}<br />
}}<br />
|-<br />
{{#if: {{{CODE|}}}|<br />
{{!}} style="vertical-align:top;" {{!}}Code<br />
{{!}} {{{CODE}}}<br />
}}<br />
|-<br />
|}</onlyinclude><br />
<br />
<br />
<br />
== Templates for menuconfig ==<br />
<br />
If you use one of the following templates, the module will automatically added to the proper category<br />
<br />
{{Codeline|<nowiki>{{I/O}}</nowiki>}}<br />
<br />
{{Codeline|<nowiki>{{Protocols}}</nowiki>}}<br />
<br />
{{Codeline|<nowiki>{{Applications}}</nowiki>}}<br />
<br />
<br />
== Templates for STATUS ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{stable}}</nowiki>}}<br />
{{stable}}<br />
{{Codeline|<nowiki>{{Experimental}}</nowiki>}}<br />
{{Experimental}}<br />
{{Codeline|<nowiki>{{In_Development}}</nowiki>}}<br />
{{In Development}}<br />
{{Codeline|<nowiki>{{Unstable}}</nowiki>}}<br />
{{Unstable}}<br />
{{Codeline|<nowiki>{{Deprecated}}</nowiki>}}<br />
{{Deprecated}}<br />
|}<br />
<br />
== Templates for ECMD ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{has_ecmd}}</nowiki>}}<br />
|}<br />
or leave blank<br />
<br />
== Templates for CONTROL6 ==<br />
{| style="width:50%"<br />
|-<br />
|<br />
{{Codeline|<nowiki>{{has_control6}}</nowiki>}}<br />
|}<br />
or leave blank<br />
== Example ==<br />
<br />
<pre><nowiki><br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}</nowiki></pre><br />
<br />
== Result ==<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|TIMER={{occupies_timer|1}}<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}</div>Mguehttp://www.ethersex.de/index.php?title=Template:Occupies_timer&diff=1012Template:Occupies timer2013-04-02T20:14:57Z<p>Mgue: first version</p>
<hr />
<div>Timer {{{1}}}<br />
<br />
[[Category:Module that uses Timer {{{1}}}| ]]</div>Mguehttp://www.ethersex.de/index.php?title=Features&diff=830Features2012-09-23T15:35:40Z<p>Mgue: Added some features</p>
<hr />
<div>{{i18n|Features}}<br />
<br />
<br />
== Supported Network Hardware ==<br />
<br />
* Ethernet [[ENC28J60 | Microchip's ENC28J60]] with IEEE 802.1q VLAN tagging<br />
* [[USB]]<br />
* [[RFM12]]<br />
* [[ZBUS]]<br />
<br />
== Network Protocols ==<br />
<br />
* IPv4, IPv4<br />
* TCP/IP, UDP/IP and ICMP<br />
* DNS<br />
* mDNS (Avahi)<br />
* [[BOOTP]]<br />
* [[DHCP]]<br />
* TFTP (can be used in combination with the [[Ethernet Loader]])<br />
* SYSLOG<br />
* [[SNMP]]<br />
* SMTP<br />
* [[NTP]] (Client and Server)<br />
* DynDNS<br />
* MySQL (Client)<br />
* IRC (Client)<br />
* [[XMPP | XMPP / Jabber Client]]<br />
* MPD (Music Player Daemon)<br />
* [[SOAP]]/XMLRPC<br />
* [[UPnP]]<br />
* [[Artnet]]<br />
<br />
== Hardware Drivers ==<br />
<br />
* [[Onewire]]<br />
* [[I2C]] Master / Slave<br />
* [[ADC input]]<br />
* [[PWM Generator]]<br />
* [[RFM12 FS20]]<br />
* [[RFM12 ASK]]<br />
* [[USB]]<br />
* [[PS/2 Keyboard]]<br />
* [[Button Input]]<br />
* [[HC595]]<br />
* [[HC165]]<br />
* [[IRMP | IR Receivers]]<br />
* [[SRAM]]<br />
<br />
== Software Modules ==<br />
<br />
* [[Ethersex Lighting Architecture]]<br />
** [[Starburst]]<br />
** [[StellaLight]]<br />
** [[DMX Storage]]<br />
** [[DMX FXSlot]]<br />
* [[Cron Daemon]]<br />
* [[System Clock | Clock ]]<br />
* [[VNC Server]]<br />
* [[lome6]]<br />
* [[Frequency Counter]]</div>Mguehttp://www.ethersex.de/index.php?title=IRMP&diff=829IRMP2012-09-23T15:29:44Z<p>Mgue: /* Control of Stella/Pins by IR commands */</p>
<hr />
<div>{{i18n|IRMP}}<br />
{{Module<br />
|NAME=IRMP<br />
|MENUCONFIG={{I/O}}->IR Receivers->IRMP<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/ir/irmp https://github.com/ethersex/ethersex/tree/master/hardware/ir/irmp]<br />
}}<br />
<br />
IRMP is a port of the [http://www.mikrocontroller.net/articles/IRMP infrared multi-protocol decoder] for [[Ethersex]].<br />
<br />
<br />
== Connection ==<br />
<br />
The reception of IR signals is performed by a receiver TSOP1736 type (or similar). This may be connected to any pin. The interrogation of the pins and the decoding of the IR protocol is done in an ISR, which occupies one 8-bit timer of the ATmegas.<br />
<br />
When sending the signal with the carrier frequency of the respective IR Protocol is [[PWM]] modulated. This is another 8-bit timer of the ATmegas (OC0/OC2) is demonstrated. On the [[Etherrape]] board takes a [[NE555]] this function, ie the option ''Use external modulator for the transmitter'' is activated. It saves a timer on the [[AVR]] is set at a carrier frequency.<br />
<br />
Example of a ATMega32 from: ''pinning/hardware/pollin_evalboard_addon.m4''<br />
<br />
ifdef(`conf_IRMP', `dnl<br />
pin(IRMP_RX, PD2)<br />
#define IRMP_USE_TIMER2<br />
#define IRMP_RX_LOW_ACTIVE<br />
#undef IRMP_RX_LED_LOW_ACTIVE<br />
pin(IRMP_TX, PD7) dnl OC2/OC2A<br />
#undef IRMP_TX_LED_LOW_ACTIVE<br />
')<br />
<br />
Meaning:<br />
<br />
* IRMP_RX - pin the IR receiver is connected to<br />
* IRMP_USE_TIMER2 - use Timer2 for receiver, Timer0 for sender (undef = reversed)<br />
* IRMP_RX_LOW_ACTIVE - the IR receiver is low-active (undef = high-active)<br />
* IRMP_RX_LED_LOW_ACTIVE - the control LED of the receiver is switched to USS (undef = switched to GND)<br />
* IRMP_TX - pin the IR sender is connected to (=output of Timer0 or Timer2, see IRMP_USE_TIMER2)<br>'''Caution: 0A to 2A if MCU with A / B channel'''<br />
* IRMP_TX_LED_LOW_ACTIVE - the control LED of the sender is switched to USS (undef = switched to GND)<br />
<br />
== Configuration ==<br />
<br />
Each supported IR protocol occupies memory of code. Therefore, one should select only the required protocols. A detailed overview of the protocols are the [http://www.mikrocontroller.net/articles/IRMP#Die_IR-Protokolle_im_Detail article in the mikrocontroller forum].<br />
<br />
│ │ Load a Default Configuration ---><br />
│ │ General Setup ---><br />
│ │ [*] Status LEDs ---><br />
│ │ [*] Status LED (Received)<br />
│ │ [-] RFM12 RX<br />
│ │ [ ] ZBUS RX<br />
│ │ [*] IRMP RX<br />
...<br />
│ │ Network ---><br />
│ │ I/O ---> <br />
...<br />
│ │ [*] IR Receivers ---><br />
...<br />
│ │ [ ] RC5 IR ---><br />
│ │ [*] IRMP IR ---><br />
...<br />
│ │ [*] Receive IR-codes<br />
│ │ [*] Send IR-codes<br />
│ │ [ ] Use external modulator for sender<br />
│ │ [*] IRMP ecmd<br />
│ │ --- Protocols<br />
│ │ [ ] SIRCS<br />
│ │ [*] NEC<br />
│ │ [ ] NEC16<br />
│ │ [ ] NEC42<br />
│ │ [ ] JVC<br />
│ │ [ ] SAMSUNG<br />
│ │ [ ] MATSUSHITA<br />
│ │ [ ] KASEIKYO<br />
│ │ [*] DENON<br />
│ │ [ ] RECS80<br />
│ │ [ ] RECS80EXT<br />
│ │ [*] RC5(X)<br />
│ │ [ ] RC6<br />
│ │ [ ] NUBERT<br />
│ │ [*] BANG&OLUFSEN<br />
│ │ [*] GRUNDIG<br />
│ │ [ ] NOKIA<br />
│ │ [*] SIEMENS<br />
│ │ [ ] FDC<br />
│ │ [ ] RCCAR<br />
│ │ [ ] NIKON<br />
│ │ [ ] RUWIDO<br />
│ │ [ ] IR60<br />
│ │ [ ] KATHREIN<br />
│ │ [ ] NETBOX<br />
│ │ [ ] LEGO<br />
│ │ [ ] THOMSON<br />
│ │ --- Debugging Flags<br />
│ │ [ ] IRMP Debug<br />
<br />
<br />
IRMP also decodes the RC5 protocol, so that the separately [[Ethersex]] contained [[RC5]] decoder is not needed any longer.<br />
<br />
== [[ECMD]] ==<br />
<br />
IRMP implements a [[ECMD]] interface for reading received and decoded IR commands and send IR commands. See [[ECMD_Reference|ECMD reference]].<br />
<br />
== [[Control6|Control6]] ==<br />
<br />
=== Output received characters via [[SYSLOG|Syslog]] ===<br />
<br />
<source lang="text"><br />
<br />
CONTROL_START<br />
<br />
THREAD(read_irmp)<br />
ON IRMP_READ > 0 DO<br />
SYSLOG("IRMP %02hhd:%04hX:%04hX:%02hhX\n",<br />
IRMP_PROTOCOL, IRMP_ADDRESS, IRMP_COMMAND, IRMP_FLAGS);<br />
END<br />
THREAD_END(read_irmp)<br />
<br />
ON STARTUP DO<br />
THREAD_START(read_irmp);<br />
END<br />
<br />
CONTROL_END<br />
<br />
</source><br />
<br />
IRMP_READ checks for received IR code and stores it in the variables IRMP_PROTOCOL, IRMP_ADDRESS, and IRMP_COMMAND IRMP_FLAGS. Return values greater than zero indicate the validity of the variables. If IRMP_FLAGS = 1 it is a repetition.<br />
<br />
=== Control of [[StellaLight|Stella]]/Pins by IR commands ===<br />
<br />
<source lang="text"><br />
<br />
C6_HEADER(`/* This will be in control6.h */')<br />
#include "services/stella/stella.h"<br />
CONTROL_START<br />
<br />
THREAD(control_stella)<br />
ON IRMP_READ > 0 DO<br />
if(IRMP_PROTOCOL==8 && IRMP_ADDRESS==0x0002)<br />
{<br />
switch(IRMP_COMMAND)<br />
{<br />
case 0x0268:<br />
stella_setValue(STELLA_SET_IMMEDIATELY, 0, 255);<br />
break;<br />
<br />
case 0x0068:<br />
stella_setValue(STELLA_SET_IMMEDIATELY, 0, 0);<br />
break;<br />
}<br />
}<br />
END<br />
THREAD_END(control_stella)<br />
<br />
ON STARTUP DO<br />
THREAD_START(control_stella);<br />
END<br />
<br />
CONTROL_END<br />
<br />
</source><br />
<br />
The script switches the Stella channel 0 to 255 or 0, the remote control is a Denon (Protocol 8). With ''include'' access to the Stella sources granted.<br><br />
Instead of ''"stella_setValue (STELLA_SET_IMMEDIATELY, 0, 255);"'' ''"PIN_SET (LED)"'' and ''"PIN_CLEAR (LED)"'' can be used ([[Named_PIN|named pin]]).<br />
|Named PIN]]).<br />
<br />
=== Send IR commands ===<br />
<br />
<source lang="text"><br />
dnl 01 = SIRCS<br />
dnl 02 = NEC<br />
dnl 03 = SAMSUNG<br />
dnl 04 = MATSUSHITA<br />
dnl 05 = KASEIKYO<br />
dnl 06 = RECS80<br />
dnl 07 = RC5(x)<br />
dnl 08 = DENON<br />
dnl 09 = RC6<br />
dnl 10 = SAMSUNG32<br />
dnl 11 = APPLE<br />
dnl 12 = RECS80EXT<br />
dnl 13 = NUBERT<br />
dnl 14 = BANG&OLUFSEN<br />
dnl 15 = GRUNDIG<br />
dnl 16 = NOKIA<br />
dnl 17 = SIEMENS<br />
dnl 18 = FDC<br />
dnl 19 = RCCAR<br />
dnl 20 = JVC<br />
dnl 21 = RC6A<br />
dnl 22 = NIKON<br />
dnl 23 = RUWIDO * no tx support yet<br />
dnl 24 = IR60 * no tx support yet<br />
dnl 25 = KATHREIN * no tx support yet<br />
dnl 26 = NETBOX * no tx support yet<br />
dnl 27 = NEC16<br />
dnl 28 = NEC42<br />
dnl 29 = LEGO<br />
dnl 30 = THOMSON * no tx support yet<br />
<br />
IRMP_PROTOCOL = 2;<br />
IRMP_ADDRESS = 1234;<br />
IRMP_COMMAND = 5678;<br />
IRMP_FLAGS = 1;<br />
<br />
IRMP_WRITE;<br />
</source><br />
<br />
Command 5678 to device 1234 will be send with one repetition using the NEC protocol.</div>Mguehttp://www.ethersex.de/index.php?title=Onewire_(Deutsch)&diff=828Onewire (Deutsch)2012-09-23T15:21:06Z<p>Mgue: changed DS2450 link</p>
<hr />
<div>{{i18n|Onewire}}<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]] [[HTTPD]] (optional) [[SNMP]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
Ethersex kann 1-wire Temperatursensoren mit [[ECMD]] auflisten und abfragen. Es wird eine reine<br />
Softwareimplementierung des Protokolls benutzt, was keine weiteren Hardware erfordert, als die<br />
Temperatursensoren selbst.<br />
<br />
= Pinning =<br />
<br />
In der Standardkonfiguration liegt der Datapin des Buses auf PD6 (kann z.B. in der pinning/hardware/netio.m4<br />
oder pinning/hardware/etherrape.m4 geändert werden). Die Definition der Pins erfolgt mit:<br />
<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PXn, PXm)<br />
</source><br />
<br />
wobei PXn und PNm Pins auf PORTX sind.<br />
<br />
Jeder Pin zwischen und einschließlich PXn und PXm bildet einen eingenständigen Onewire Bus.<br />
Du kannst bis zu acht Busse auf einem PORT definieren (alle Busse müssen auf dem selben PORT liegen!)<br />
<br />
== Beispiele ==<br />
<br />
Wenn Du nur einen einzigen Bus benötigst, definiere den Bereich wie folgt:<br />
<br />
'''PORTD: PIN2'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD2)<br />
</source><br />
<br />
Für drei Busse würde das ganze etwa so aussehen:<br />
<br />
'''PORTD: PIN2, PIN3, PIN4'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD4)<br />
</source><br />
<br />
= Polling Modus =<br />
<br />
│ │ [*] Onewire Polling │ │ <br />
│ │ (375) Time between discoveries in 0.8s steps │ │ <br />
│ │ (12) Time between polling in 0.8s steps │ │ <br />
│ │ [*] ECMD 1w list with values │ │ <br />
│ │ (10) Maximum sensor count │ │ <br />
<br />
Im Polling-Modus werden die Sensoren im Hintergrund abgefragt, so dass die Werte<br />
bei Bedarf direkt zur Verfügung stehen und nicht erst gewandelt bzw.<br />
eingelesen werden müssen. Der Intervall zwischen den Discoveries und zwischen<br />
den Abfragen der Werte kann getrennt eingestellt werden. Die Option<br />
'''ECMD 1w list with values''' bietet die Möglichkeit, die aktuellen Werte<br />
bei Aufruf von '''1w list''' mit ausgeben zu lassen. So können darauf folgende<br />
'''1w get''' Kommandos entfallen.<br />
<br />
Da zur Pufferung der Werte, ROM-Codes, etc. RAM-Speicher benötigt wird, muss<br />
per '''Maximum sensor count''' angegeben werden, für wie viele Sensoren Speicher<br />
reserviert wird.<br />
<br />
= Benennung von Sensoren =<br />
<br />
│ │ [*] Onewire naming support │ │ <br />
│ │ (10) Maximum sensor count │ │ <br />
<br />
Um den Sensoren sinnvolle Namen zu geben besteht die Möglichkeit im EEPROM<br />
eine entsprechende Zuweisungstabelle anzulegen (ROM-Code -> Name). Die Namen werden<br />
bei bei Aufruf von '''1w list''' mit ausgegeben. Dazu gibt es<br />
folgende ECMD Kommandos:<br />
<br />
1w name list<br />
<br />
Auflistung der aktuellen Zuweisungen (Spalten: ID, ROM-Code, Name). Die ID bezeichnet<br />
die Position in der Zuweisungstabelle und kann u.a. dazu benutzt werden, Sensoren<br />
bei SNMP-Abfragen eindeutig zu referenzieren.<br />
<br />
1w name set <ID> <ROM-Code> <Name><br />
<br />
Erstellt einen entsprechenden Tabelleneintrag.<br />
<br />
1w name clear <ID><br />
<br />
Löscht die Felder eines Tabelleneintrags.<br />
<br />
1w name save<br />
<br />
Speichert die aktuelle Tabelle im EEPROM<br />
<br />
= Unterstützte Hardware =<br />
<br />
Folgende 1-wire Hardware wird momentan durch Ethersex unterstützt:<br />
* DS1820 (Temperatursensor)<br />
* DS18B20 (Temperatursensor)<br />
* DS1822 (Temperatursensor)<br />
* DS2502 (EEPROM)<br />
* [[Onewire/DS2450 (Deutsch) | DS2450 (4 Kanal ADC)]]<br />
<br />
= Onewire Befehle =<br />
<br />
unter Linux als erstes netcat starten (hierbei natürlich die IP ggf modifizieren): <br />
<br />
netcat 192.168.0.15 2701<br />
<br />
danach am prompt:<br />
<br />
1w list<br />
<br />
Gibt eine Liste mit Hexcodes aller angeschlossenen und erkannten Onewire(tm) Sensoren aus.<br />
Bei aktiviertem Naming-Support wird (per TAB getrennt) zusätzlich der Name ausgegeben. Außerdem<br />
kann mit '''ECMD 1w list with values (ONEWIRE_ECMD_LIST_VALUE_SUPPORT)''' der aktuelle Temperaturwert<br />
mit ausgegeben werden. Dies erspart zusätzliche '''1w get''' Aufrufe, setzt allerding Polling-Support<br />
vorraus.<br />
<br />
1w convert <hexcode><br />
<br />
Veranlasst eine Temperaturmessung des addressierten Sensors, oder, wenn das Argument <hexcode><br />
weggelassen wird, aller angeschlossener Sensoren. Im Polling-Modus wird dieses Kommando ignoriert.<br />
<br />
1w get <hexcode><br />
<br />
Gibt die gemessene Temperatur eines Sensors aus.<br />
<br />
= Einbindung in die [[HTTPD]]-Weboberfläche =<br />
<br />
Unter httpd/embed/ow.ht.m4, bzw httpd/embed/Xow.ht.m4 liegt eine Weboberflaeche, die alle Sensoren erkennt<br />
und ihre aktuelle Temperatur regelmässig per Ajax abfragt und anzeigt. Im Falle von Xow.ht.m4 wird sogar<br />
Graph der Temperatur mittels SVG gemalt. Um die Dateien einzubinden, muss man einfach bei aktiviertem<br />
Onewiresupport den Webserver und das Datei Inlining aktivieren.<br />
<br />
Die Dateien können dann unter ow.ht bzw. unter Xow.ht angezeigt werden. Das Beispiel zeigt die SVG-Version<br />
mit Naming-Support:<br />
<br />
[[File:onewire-svg.png]]<br />
<br />
= Anschluss AVR-NET-IO =<br />
Für das Pollin AVR-NET-IO Board können die Sensoren DS18S20+ , <br />
<br />
normal Betrieb<br />
<br />
[[File:netio-1wire_normal.png]]<br />
<br />
parasitären Modus<br />
<br />
[[File:netio-1wire.png]]<br />
<br />
Anmerkung: Wenn man beim Net-IO nicht alle Analogeingänge benötigt, lässt sich der 1-Wire-Bus auch an der<br />
Schraubklemme ADC1 ganz gut aufschalten. Vorteil ist, dass man gleich alle passenden Spannungen (GND, +5V)<br />
an den beiden nebenliegenden Schraubklemmen hat. Das Pinning muss dann entspechend in der kann in der Datei<br />
pinning/hardware/netio.m4 von PD6 auf PA4 geändert werden. Vorteil dieser Konfiguration ist, dass man den<br />
DB-25-Verbinder zum Anschluss der Relaisplatine K8IO von Pollin frei hat und den EXT Steckverbinder zum<br />
Anschluss eines LCD über ein 4bit-Interface nutzen kann, ohne die Erweiterungsplatine von Pollin zu benötigen.<br />
<br />
Pinbelegung:<br />
<br />
[[File:ds18s20-par-pinout.jpg]]<br />
<br />
= Anschluss Etherrape =<br />
<br />
Die Schaltung je nach parasitärem oder normalem Betriebsmodus kann aus der NetIO Skizze übernommen werden.<br />
Data liegt auf PORTD an Pin 7:<br />
<br />
PORTD<br />
+---+<br />
|x x|<br />
|x X| <- Pin 7<br />
|x x<br />
|x x|<br />
|x x|<br />
+---+<br />
<br />
Direkt neben PORTD befinden sich 2 Pins mit GND und 5V als Beschriftung. <br />
GND kann als GND und 5V als Vcc genutzt werden.<br />
<br />
= Einbindung in [[Control6]] =<br />
<br />
Die Sensoren können mit '''ONEWIRE_GET''' einfach abgefragt werden. Die Funktion führt automatisch ein<br />
''convert'' aus, es sind also keine zwei Schritte erforderlich wie bei dem Zugriff über [[ECMD]].<br />
Die Rückgabe erfolgt (analog der Funktion '''KTY_GET''') in Centigrad, also Temperatur * 10.<br />
Hier vielleicht ein kleines Beispiel, das die Daten per [[SYSLOG]] ausgibt sobald sich die Temperatur<br />
um mehr als ein Grad zur letzten Messung verändert hat.<br />
<br />
<pre><br />
int16_t Temperatur;<br />
int16_t Temperatur_alt;<br />
<br />
CONTROL_START<br />
<br />
THREAD(read_temp)<br />
Temperatur = ONEWIRE_GET(10d85594010800eb);<br />
ON abs(Temperatur-Temperatur_alt)>10 DO<br />
div_t res = div(Temperatur,10);<br />
SYSLOG("temperature changed %d.%d",res.quot,res.rem)<br />
Temperatur_alt = Temperatur;<br />
END<br />
WAIT(15);<br />
THREAD_END(read_temp)<br />
<br />
ON STARTUP DO<br />
Temperatur = Temperatur_alt = 0;<br />
THREAD_START(read_temp);<br />
END<br />
<br />
CONTROL_END<br />
</pre><br />
<br />
= Abfrage per [[SNMP]] =<br />
<br />
Falls Polling-Support aktiviert wurde können die Sensorwerte per SNMP abgefragt werden.<br />
Mit Naming-Support stehen auch die Namen per SNMP zur Verfügung und die Index-Nummern sind<br />
fix auf die Position in der Namenstabelle festgelegt. Dies ist sehr hilfreich, um bestimmte<br />
Sensoren über den SNMP-Index anzusprechen.<br />
<br />
Es gibt folgende OIDs:<br />
<br />
* .1.3.6.1.4.1.39967.3.1.<idx> : ROM-Code des Sensors<br />
* .1.3.6.1.4.1.39967.3.2.<idx> : Sensor-Name (nur mit Naming-Support)<br />
* .1.3.6.1.4.1.39967.3.3.<idx> : Temperaturwert in Centigrad<br />
* .1.3.6.1.4.1.39967.3.4.<idx> : 0 = Sensor nicht vorhanden, 1 = Sensor vorhanden<br />
<br />
Hier ein Beispiel:<br />
<br />
<pre><br />
# snmpwalk -Osn -c public -v 1 192.168.255.90 1.3.6.1.4.1.39967.3<br />
.1.3.6.1.4.1.39967.3.1.0 = STRING: "1080cff6010800f9"<br />
.1.3.6.1.4.1.39967.3.1.1 = STRING: "10c8cff60108002d"<br />
.1.3.6.1.4.1.39967.3.1.2 = STRING: "1029f6dc0108002f"<br />
.1.3.6.1.4.1.39967.3.1.3 = STRING: "10f2d0f60108001c"<br />
.1.3.6.1.4.1.39967.3.1.4 = STRING: "105a17f70108001d"<br />
.1.3.6.1.4.1.39967.3.1.5 = STRING: "10b8d8f601080098"<br />
.1.3.6.1.4.1.39967.3.1.6 = STRING: "104dedf601080057"<br />
.1.3.6.1.4.1.39967.3.1.7 = STRING: "10011af701080027"<br />
.1.3.6.1.4.1.39967.3.1.8 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.39967.3.1.9 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.39967.3.2.0 = STRING: "kessel"<br />
.1.3.6.1.4.1.39967.3.2.1 = STRING: "warmwasser"<br />
.1.3.6.1.4.1.39967.3.2.2 = STRING: "aussen"<br />
.1.3.6.1.4.1.39967.3.2.3 = STRING: "speicher"<br />
.1.3.6.1.4.1.39967.3.2.4 = STRING: "heizung vl"<br />
.1.3.6.1.4.1.39967.3.2.5 = STRING: "heizung rl"<br />
.1.3.6.1.4.1.39967.3.2.6 = STRING: "boiler vl"<br />
.1.3.6.1.4.1.39967.3.2.7 = STRING: "boiler rl"<br />
.1.3.6.1.4.1.39967.3.2.8 = ""<br />
.1.3.6.1.4.1.39967.3.2.9 = ""<br />
.1.3.6.1.4.1.39967.3.3.0 = INTEGER: 334<br />
.1.3.6.1.4.1.39967.3.3.1 = INTEGER: 467<br />
.1.3.6.1.4.1.39967.3.3.2 = INTEGER: 127<br />
.1.3.6.1.4.1.39967.3.3.3 = INTEGER: 185<br />
.1.3.6.1.4.1.39967.3.3.4 = INTEGER: 318<br />
.1.3.6.1.4.1.39967.3.3.5 = INTEGER: 269<br />
.1.3.6.1.4.1.39967.3.3.6 = INTEGER: 366<br />
.1.3.6.1.4.1.39967.3.3.7 = INTEGER: 291<br />
.1.3.6.1.4.1.39967.3.3.8 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.3.9 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.4.0 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.1 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.2 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.3 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.4 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.5 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.6 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.7 = INTEGER: 1<br />
.1.3.6.1.4.1.39967.3.4.8 = INTEGER: 0<br />
.1.3.6.1.4.1.39967.3.4.9 = INTEGER: 0<br />
</pre><br />
<br />
= Codebeispiele =<br />
<br />
* [[Onewire/Example/PHP (Deutsch) | PHP]]<br />
* [[Onewire/Example/Perl (Deutsch) | Perl]]<br />
* [[Onewire/Example/Python | Python]]<br />
* [[Onewire/Example/Shell | sh/bash]]<br />
<br />
[[Category:Ethersex]]<br />
[[Category:StepByStep]]<br />
[[Category:Onewire]]<br />
<br />
= Bezugsquellen =<br />
* Laut Michael Schultz (k1w1) hat er immer DS1820 auf Lager und kann sie sehr günstig weiterverkaufen. Auch Mindermengen. Mail: ethersex [AT] keyb [DOT] de<br />
* und natürlich bei den üblichen Verdächtigen: Reichelt, Segor, Conrad</div>Mguehttp://www.ethersex.de/index.php?title=Onewire/DS2450&diff=827Onewire/DS24502012-09-23T15:19:51Z<p>Mgue: change Title</p>
<hr />
<div>{{i18n|Onewire/DS2450}}<br />
{{Module<br />
|NAME=Onewire DS2450<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{In_Development}} <br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
* For the moment follow the German Link --> [http://www.ethersex.de/index.php/Onewire_DS2450_(Deutsch) http://www.ethersex.de/index.php/Onewire_DS2450_(Deutsch)]</div>Mguehttp://www.ethersex.de/index.php?title=Onewire/DS2450_(Deutsch)&diff=826Onewire/DS2450 (Deutsch)2012-09-23T15:19:31Z<p>Mgue: Change Title</p>
<hr />
<div>{{i18n|Onewire/DS2450}}<br />
{{Module<br />
|NAME=Onewire DS2450<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{In_Development}} <br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
*Beitrag am 23.09.2012 erneuert.<br />
== Dallas 1-wire DS2450 4 Kanal ADC ==<br />
<br />
Der DS2450 ist ein 4 Kanal ADC mit einer maximalen Auflösung von 16 Bit (vgl. [http://datasheets.maxim-ic.com/en/ds/DS2450.pdf Datenblatt]). Die analog-digital Umwandlung erfolgt durch einen internen four-to-one multiplexer. Kanäle, die nicht als Eingänge genutzt werden, können als Ausgänge (open drain) geschaltet werden (max. 4mA und 6V).<br />
<br />
=== ECMD Interface ===<br />
<br />
Über ECMD sind folgende Befehle für den DS2450 bekannt:<br />
*<code>1w ds2450 power</code><br />
*<code>1w ds2450 res</code><br />
*<code>1w ds2450 oc</code><br />
*<code>1w ds2450 oe</code><br />
*<code>1w ds2450 range</code><br />
*<code>1w ds2450 por</code><br />
*<code>1w ds2450 convert</code><br />
*<code>1w ds2450 get</code><br />
<br />
==== Grundsätzliches ====<br />
<br />
Grundsätzlich gilt für alle Befehle:<br />
* als erstes Argument kann optional die 64 Bit ROM Id des DS2450 angegeben werden, der angesprochen werden soll (match rom). Wird die ROM Id <b>nicht</b> angeben, so werden alle im Bus befindlichen 1-wire Devices (egal welchen Typs) angesprochen (skip rom). Dies macht <b>nur</b> Sinn, wenn sich <b>genau</b> ein Device im 1-wire Bus befindet (skip rom führt bei mehreren Devices unweigerlich dazu, dass mehrere Devices gleichzeitig antworten werden, was zu Bit-Salat beim bus master (d.h. Ethersex) führt, das Datenblatt spricht von "a wired-AND result").<br />
* wird ein Kanal angeben, so ist dieser mit einem Buchstaben (entsprechend Datenblatt) zu bezeichnen (case-insensitiv).<br />
* wird mit einem Befehl ein Wert gesetzt, so kann mit dem gleichen Befehl der Wert gelesen werden, in dem man kein Werte-Argument angibt.<br />
<br />
==== <code>1w ds2450 power</code> ====<br />
<br />
Hierüber wird die Art der Spannungsversorgung des DS2450 gesetzt (global). Dieser Parameter wird durch den Anschluss an der 1-wire Bus bestimmt, vgl. die [[Dallas_1-wire_Bus#Anschluss_AVR-NET-IO | Erklärung der Anschlussmöglichkeiten]].<br />
<br />
Wird der 1-wire Bus "normal" (drei-adrig) betrieben, so muss der Wert auf 1 gesetzt werden. Wird der Bus "parasitär" (zwei-adrig) betrieben, muss der Wert auf 0 gesetzt werden.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 power 1<br />
<br />
(der DS250 wird auf "normale" Spannungsversorgung konfiguriert)<br />
<br />
==== <code>1w ds2450 res</code> ====<br />
<br />
Hierüber wird die Auflösung der analog-digital Umwandlung gesetzt (pro Kanal). Die Auflösung kann zw. 1 und 16 Bit eingestellt werden. Die Eingabe erfolgt als 8 Bit Hexadezimalwert, wobei eine Auflösung von 16 Bit durch den Wert 0x00 oder alternativ 0x10 erreicht wird. Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0x08<br />
<br />
Beispiel:<br />
1w ds2450 res c 08<br />
<br />
(setzt die Auflösung für Kanal C auf 0x08, d.h. 8 Bit)<br />
<br />
==== <code>1w ds2450 oc</code> ====<br />
<br />
Hierüber kann der Ausgang ein- oder ausgeschaltet werden (pro Kanal). Voraussetzung ist, dass über [[DS2450#1w_ds2450_oe | 1w ds2450 oe]] der Kanal als Ausgang geschaltet wurde (ansonsten wird das OC-Bit ignoriert).<br />
Die Eingabe erfolgt als bool über 0 (Ausgangstransistor leitend) bzw. 1 (Ausgangstransistor nicht-leitend). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 oc a 1<br />
<br />
(der Ausgangstransistor des Kanal A wird leitend)<br />
<br />
==== <code>1w ds2450 oe</code> ====<br />
<br />
Hierüber kann der Kanal als Ein- oder Ausgang gesetzt werden (pro Kanal). Eine analog-digital Umwandlung ist <b>nur</b> möglich, wenn das OE-Bit auf 0 gesetzt ist. In diesem Fall wird das OC-Bit ignoriert. Ist das OE-Bit auf 1 gesetzt, kann der Ausgang über [[DS2450#1w_ds2450_oc | 1w ds2450 oc]] ein- bzw. ausgeschaltet werden.<br />
Die Eingabe erfolgt als bool über 0 (Eingang für ADC) bzw. 1 (Ausgang open drain). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 oe d 1<br />
<br />
(Kanal A wird als Ausgang gesetzt)<br />
<br />
==== <code>1w ds2450 range</code> ====<br />
<br />
Hierüber kann der Spannungs-Bereich angegeben werden, in dem die analog-digital Umwandlung stattfinden soll.<br />
Die Eingabe erfolgt als bool über 0 (Spannungsbereich 0 bis 2,55V) bzw. 1 (Spannungsbereich 0 bis 5,10V). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 range b 1<br />
<br />
(für Kanal B wird bei der analog-digital Umwandlung der Spannungsbereich 0 bis 5,10V genutzt)<br />
<br />
==== <code>1w ds2450 por</code> ====<br />
<br />
Hierüber kann das power on reset Bit gelesen bzw. gesetzt werden. Nach einem power-on reset cycle setzt der DS2450 das Bit auf 1. Das Bit beeinflusst die conditional search, welche in Ethersex (noch) nicht implementiert ist. Setzt der bus master das Bit auf 0, so nimmt der DS2450 nicht mehr an der conditional search teil<br />
Die Eingabe erfolgt als bool über 0 bzw. 1. Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 1 (nach power-on reset cycle)<br />
<br />
Beispiel:<br />
1w ds2450 por c 0<br />
<br />
(für Kanal C wird das power on reset Bit auf 0 gesetzt)<br />
<br />
FixMe:<br />
Es sieht so aus, als kann das Bit nur global gesetzt werden, d.h. wird es für einen Kanal verändert, haben danach alle anderen Kanäle den gleich POR-Bit Wert.<br />
Außerdem kann man das Bit nicht mehr auf 1 setzen, wenn es vorher schon auf 0 gesetzt wurde (das widerspricht aber dem Datenblatt!).<br />
<br />
==== <code>1w ds2450 convert</code> ====<br />
<br />
Hierüber wird die analog-digital Umwandlung ausgelöst (analog den 1-wire Temperatursensoren). Werden keine weiteren Argumente angegeben, so wird die Umwandlung für alle 4 Kanäle des DS2450 durchgeführt (FixMe: vermutlich werden die Kanäle, bei denen das OE-Bit auf 1 steht ausgelassen, dass ist aber nicht durch Dallas dokumentiert).<br />
Optional können zwei Argumente angegeben werden (werden Argumente angegeben, <b>müssen beide</b> Argumente angegeben werden!):<br />
* input select mask<br />
* read-out control<br />
<br />
===== input select mask =====<br />
<br />
Mit der input select mask kann angegeben werden, für welche Kanäle die analog-digital Umwandlung durchgeführt werden soll. Die input select mask ist ein 8 Bit Hexadezimalwert:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! bit7 !! bit6 !! bit5 !! bit4 !! bit3 !! bit2 !! bit1 !! bit0<br />
|-<br />
| ignore || ignore || ignore || ignore || Kanal D || Kanal C || Kanal B || Kanal A<br />
|}<br />
<br />
Eine input select mask von 0x0f bedeutet also, dass für alle 4 Kanäle die analog-digital Umwandlung durchgeführt werden soll. Eine mask von 0x00 ist (offensichtlich) sinnlos. Eine ungültige input select mask (d.h. input select mask == 0x00 oder > 0x0f) wird erkannt und führt zu einer ECMD-Fehlermeldung.<br />
<br />
Die analog-digital Umwandlung erfolgt in der Reihenfolge von Kanal A zu Kanal D, wobei die nicht gewünschte Kanäle (sprich jene, wo das input select mask Bit auf 0 steht) übersprungen werden.<br />
<br />
Der DS2450 braucht für jedes Bit Auflösung ca. 60 bis 80µs. Außerdem braucht das Umwandlung-Kommando generell 160µs (offset) Dies bedeutet, dass eine Umwandlung aller 4 Kanäle bei maximaler 16 Bit Auflösung also nicht länger als 4*16*80+160µs = 5280µs = 5,28ms dauern wird.<br />
<br />
===== read out control =====<br />
<br />
Mit dem read out control kann angegeben werden, ob und wie das Register für die Ergebnisse der analog-digital Umwandlung vorbelegt werden soll. Das macht nur dann Sinn, wenn die Umwandlungsergebnisse schon gelesen werden sollen, während der DS2450 im Hintergrund noch die analog-digital Umwandlung durchführt (was möglich ist). Das read out control ist ein 8 Bit Hexadezimalwert:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! bit7 !! bit6 !! bit5 !! bit4 !! bit3 !! bit2 !! bit1 !! bit0<br />
|-<br />
| Set D || Clear D || Set C || Clear C || Set B || Clear B || Set A || Clear A<br />
|}<br />
<br />
Set bzw. Clear verhalten sich wie folgt:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! Set !! Clear !! Ergebnis<br />
|-<br />
| 0 || 0 || keine Veränderung am Umwandlung-Register<br />
|-<br />
| 0 || 1 || alle Bits des Umwandlung-Register werden auf 0 gesetzt<br />
|-<br />
| 1 || 0 || alle Bits des Umwandlung-Register werden auf 1 gesetzt<br />
|-<br />
| 1 || 1 || invalid<br />
|}<br />
<br />
Ungültige Kombinationen im read out control (d.h. Set = 1 und Clear = 1) werden erkannt und führen zu einer ECMD-Fehlermeldung.<br />
<br />
<br />
Default-Werte:<br />
* input select mask: 0x04<br />
* read out control: 0x00<br />
<br />
Beispiel:<br />
1w ds2450 convert<br />
<br />
(für alle Kanäle wird die analog-digital Umwandlung durchgeführt)<br />
<br />
==== <code>1w ds2450 get</code> ====<br />
<br />
Hierüber wird das Ergebnis der analog-digital Umwandlung ausgelesen (analog den 1-wire Temperatursensoren). Werden keine weiteren Argumente angegeben, so werden die Umwandlungsergebnisse für alle 4 Kanäle des DS2450 ausgegeben. Optional kann ein Kanal angegeben werden, dann wird nur das Umwandlungsergebniss dieses Kanals ausgegeben. Wurde seit dem letzten power-on reset cycle keine Umwandlung durchgeführt, stehen alle Bits der Register auf 0.<br />
<br />
Die Ausgabe erfolgt als raw (unsigned integer 16 Bit - <code>uint16_t</code>). Die eingelesene Spannung errechnet sich wie folgt (VAL ist die Ausgabe von <code>1w ds2450 get</code>):<br />
* für range = 0 (0..2,55V)<br />
VAL<br />
------- * 2,55V<br />
2**16-1<br />
<br />
* für range = 1 (0..5,10V)<br />
VAL<br />
------- * 5,10V<br />
2**16-1<br />
<br />
<br />
Default-Werte: -<br />
<br />
Beispiel:<br />
1w ds2450 get<br />
<br />
(die Umwandlungsergebnisse für alle 4 Kanäle werden ausgegeben)<br />
<br />
=== Beispielschaltung ===<br />
<br />
Hier ein Beispielschaltung für den DS2450. Kanal A wird als Eingabe genutzt (range = 1). Kanal D wird als Ausgabe genutzt, über den Optokoppler kann die LED geschaltet werden.<br />
<br />
Der Widerstand R1 muss <b>unbedingt</b> entsprechend dem Optokoppler dimensioniert werden. Beim 4N35 sind 1k3 ausreichend, dann fließt ein Strom von ca. 2,8mA.<br />
<br />
[[File:DS2450 Beispiel 01.gif|600px|Beispielschaltung DS2450]]<br />
<br />
== Einbindung in Control6 (tcp_send) ==<br />
<br />
https://github.com/ethersex/ethersex/blob/master/hardware/onewire/ds2450.h<br><br />
http://www.tutorials.at/c/03-dateneingabe-ausgabe.html<br><br />
<br />
<br><br />
'''"ecmd?1w list"''' ergibt den rom code '''20686414000000b5''' für den ds2450<br><br />
<br><br />
<source lang="text"><br />
C6_HEADER(`/* This will be in control6.h */')<br />
#include "hardware/onewire/ds2450.h"<br />
uint16_t counter1 = 0;<br />
uint16_t var1 = 0;<br />
CONTROL_START<br />
CLOCK_USED()<br />
<br />
THREAD(start)<br />
var1 = 1;<br />
WAIT(5)<br />
var1 = 0;<br />
WAIT(5)<br />
THREAD_END(start)<br />
<br />
TCP_HANDLER_PERSIST(message_handler);<br />
if (var1 == 1){<br />
ow_rom_code_t rom_code;<br />
uint16_t result;<br />
rom_code.bytewise[0] = 0x20;<br />
rom_code.bytewise[1] = 0x68;<br />
rom_code.bytewise[2] = 0x64;<br />
rom_code.bytewise[3] = 0x14;<br />
rom_code.bytewise[4] = 0x00;<br />
rom_code.bytewise[5] = 0x00;<br />
rom_code.bytewise[6] = 0x00;<br />
rom_code.bytewise[7] = 0xb5;<br />
ow_ds2450_convert(&rom_code, 0x0f, 0x00);<br />
ow_ds2450_get(&rom_code, 2, 2, &result);<br />
TCP_SEND("%u", result);<br />
WAIT(15)<br />
}<br />
TCP_HANDLER_END();<br />
<br />
ON STARTUP DO<br />
THREAD_START(start)<br />
TCP_CONNECT(192.168.123.106, 4445, message_handler);<br />
END<br />
<br />
CONTROL_END<br />
</source></div>Mguehttp://www.ethersex.de/index.php?title=Onewire/DS2450_(Deutsch)&diff=824Onewire/DS2450 (Deutsch)2012-09-23T15:18:51Z<p>Mgue: moved Onewire DS2450 (Deutsch) to Onewire/DS2450 (Deutsch)</p>
<hr />
<div>{{i18n|Onewire_DS2450}}<br />
{{Module<br />
|NAME=Onewire_DS2450<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{In_Development}} <br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
*Beitrag am 23.09.2012 erneuert.<br />
== Dallas 1-wire DS2450 4 Kanal ADC ==<br />
<br />
Der DS2450 ist ein 4 Kanal ADC mit einer maximalen Auflösung von 16 Bit (vgl. [http://datasheets.maxim-ic.com/en/ds/DS2450.pdf Datenblatt]). Die analog-digital Umwandlung erfolgt durch einen internen four-to-one multiplexer. Kanäle, die nicht als Eingänge genutzt werden, können als Ausgänge (open drain) geschaltet werden (max. 4mA und 6V).<br />
<br />
=== ECMD Interface ===<br />
<br />
Über ECMD sind folgende Befehle für den DS2450 bekannt:<br />
*<code>1w ds2450 power</code><br />
*<code>1w ds2450 res</code><br />
*<code>1w ds2450 oc</code><br />
*<code>1w ds2450 oe</code><br />
*<code>1w ds2450 range</code><br />
*<code>1w ds2450 por</code><br />
*<code>1w ds2450 convert</code><br />
*<code>1w ds2450 get</code><br />
<br />
==== Grundsätzliches ====<br />
<br />
Grundsätzlich gilt für alle Befehle:<br />
* als erstes Argument kann optional die 64 Bit ROM Id des DS2450 angegeben werden, der angesprochen werden soll (match rom). Wird die ROM Id <b>nicht</b> angeben, so werden alle im Bus befindlichen 1-wire Devices (egal welchen Typs) angesprochen (skip rom). Dies macht <b>nur</b> Sinn, wenn sich <b>genau</b> ein Device im 1-wire Bus befindet (skip rom führt bei mehreren Devices unweigerlich dazu, dass mehrere Devices gleichzeitig antworten werden, was zu Bit-Salat beim bus master (d.h. Ethersex) führt, das Datenblatt spricht von "a wired-AND result").<br />
* wird ein Kanal angeben, so ist dieser mit einem Buchstaben (entsprechend Datenblatt) zu bezeichnen (case-insensitiv).<br />
* wird mit einem Befehl ein Wert gesetzt, so kann mit dem gleichen Befehl der Wert gelesen werden, in dem man kein Werte-Argument angibt.<br />
<br />
==== <code>1w ds2450 power</code> ====<br />
<br />
Hierüber wird die Art der Spannungsversorgung des DS2450 gesetzt (global). Dieser Parameter wird durch den Anschluss an der 1-wire Bus bestimmt, vgl. die [[Dallas_1-wire_Bus#Anschluss_AVR-NET-IO | Erklärung der Anschlussmöglichkeiten]].<br />
<br />
Wird der 1-wire Bus "normal" (drei-adrig) betrieben, so muss der Wert auf 1 gesetzt werden. Wird der Bus "parasitär" (zwei-adrig) betrieben, muss der Wert auf 0 gesetzt werden.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 power 1<br />
<br />
(der DS250 wird auf "normale" Spannungsversorgung konfiguriert)<br />
<br />
==== <code>1w ds2450 res</code> ====<br />
<br />
Hierüber wird die Auflösung der analog-digital Umwandlung gesetzt (pro Kanal). Die Auflösung kann zw. 1 und 16 Bit eingestellt werden. Die Eingabe erfolgt als 8 Bit Hexadezimalwert, wobei eine Auflösung von 16 Bit durch den Wert 0x00 oder alternativ 0x10 erreicht wird. Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0x08<br />
<br />
Beispiel:<br />
1w ds2450 res c 08<br />
<br />
(setzt die Auflösung für Kanal C auf 0x08, d.h. 8 Bit)<br />
<br />
==== <code>1w ds2450 oc</code> ====<br />
<br />
Hierüber kann der Ausgang ein- oder ausgeschaltet werden (pro Kanal). Voraussetzung ist, dass über [[DS2450#1w_ds2450_oe | 1w ds2450 oe]] der Kanal als Ausgang geschaltet wurde (ansonsten wird das OC-Bit ignoriert).<br />
Die Eingabe erfolgt als bool über 0 (Ausgangstransistor leitend) bzw. 1 (Ausgangstransistor nicht-leitend). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 oc a 1<br />
<br />
(der Ausgangstransistor des Kanal A wird leitend)<br />
<br />
==== <code>1w ds2450 oe</code> ====<br />
<br />
Hierüber kann der Kanal als Ein- oder Ausgang gesetzt werden (pro Kanal). Eine analog-digital Umwandlung ist <b>nur</b> möglich, wenn das OE-Bit auf 0 gesetzt ist. In diesem Fall wird das OC-Bit ignoriert. Ist das OE-Bit auf 1 gesetzt, kann der Ausgang über [[DS2450#1w_ds2450_oc | 1w ds2450 oc]] ein- bzw. ausgeschaltet werden.<br />
Die Eingabe erfolgt als bool über 0 (Eingang für ADC) bzw. 1 (Ausgang open drain). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 oe d 1<br />
<br />
(Kanal A wird als Ausgang gesetzt)<br />
<br />
==== <code>1w ds2450 range</code> ====<br />
<br />
Hierüber kann der Spannungs-Bereich angegeben werden, in dem die analog-digital Umwandlung stattfinden soll.<br />
Die Eingabe erfolgt als bool über 0 (Spannungsbereich 0 bis 2,55V) bzw. 1 (Spannungsbereich 0 bis 5,10V). Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 0<br />
<br />
Beispiel:<br />
1w ds2450 range b 1<br />
<br />
(für Kanal B wird bei der analog-digital Umwandlung der Spannungsbereich 0 bis 5,10V genutzt)<br />
<br />
==== <code>1w ds2450 por</code> ====<br />
<br />
Hierüber kann das power on reset Bit gelesen bzw. gesetzt werden. Nach einem power-on reset cycle setzt der DS2450 das Bit auf 1. Das Bit beeinflusst die conditional search, welche in Ethersex (noch) nicht implementiert ist. Setzt der bus master das Bit auf 0, so nimmt der DS2450 nicht mehr an der conditional search teil<br />
Die Eingabe erfolgt als bool über 0 bzw. 1. Außerdem ist die Kanal-Bezeichnung anzugeben.<br />
<br />
Default-Wert: 1 (nach power-on reset cycle)<br />
<br />
Beispiel:<br />
1w ds2450 por c 0<br />
<br />
(für Kanal C wird das power on reset Bit auf 0 gesetzt)<br />
<br />
FixMe:<br />
Es sieht so aus, als kann das Bit nur global gesetzt werden, d.h. wird es für einen Kanal verändert, haben danach alle anderen Kanäle den gleich POR-Bit Wert.<br />
Außerdem kann man das Bit nicht mehr auf 1 setzen, wenn es vorher schon auf 0 gesetzt wurde (das widerspricht aber dem Datenblatt!).<br />
<br />
==== <code>1w ds2450 convert</code> ====<br />
<br />
Hierüber wird die analog-digital Umwandlung ausgelöst (analog den 1-wire Temperatursensoren). Werden keine weiteren Argumente angegeben, so wird die Umwandlung für alle 4 Kanäle des DS2450 durchgeführt (FixMe: vermutlich werden die Kanäle, bei denen das OE-Bit auf 1 steht ausgelassen, dass ist aber nicht durch Dallas dokumentiert).<br />
Optional können zwei Argumente angegeben werden (werden Argumente angegeben, <b>müssen beide</b> Argumente angegeben werden!):<br />
* input select mask<br />
* read-out control<br />
<br />
===== input select mask =====<br />
<br />
Mit der input select mask kann angegeben werden, für welche Kanäle die analog-digital Umwandlung durchgeführt werden soll. Die input select mask ist ein 8 Bit Hexadezimalwert:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! bit7 !! bit6 !! bit5 !! bit4 !! bit3 !! bit2 !! bit1 !! bit0<br />
|-<br />
| ignore || ignore || ignore || ignore || Kanal D || Kanal C || Kanal B || Kanal A<br />
|}<br />
<br />
Eine input select mask von 0x0f bedeutet also, dass für alle 4 Kanäle die analog-digital Umwandlung durchgeführt werden soll. Eine mask von 0x00 ist (offensichtlich) sinnlos. Eine ungültige input select mask (d.h. input select mask == 0x00 oder > 0x0f) wird erkannt und führt zu einer ECMD-Fehlermeldung.<br />
<br />
Die analog-digital Umwandlung erfolgt in der Reihenfolge von Kanal A zu Kanal D, wobei die nicht gewünschte Kanäle (sprich jene, wo das input select mask Bit auf 0 steht) übersprungen werden.<br />
<br />
Der DS2450 braucht für jedes Bit Auflösung ca. 60 bis 80µs. Außerdem braucht das Umwandlung-Kommando generell 160µs (offset) Dies bedeutet, dass eine Umwandlung aller 4 Kanäle bei maximaler 16 Bit Auflösung also nicht länger als 4*16*80+160µs = 5280µs = 5,28ms dauern wird.<br />
<br />
===== read out control =====<br />
<br />
Mit dem read out control kann angegeben werden, ob und wie das Register für die Ergebnisse der analog-digital Umwandlung vorbelegt werden soll. Das macht nur dann Sinn, wenn die Umwandlungsergebnisse schon gelesen werden sollen, während der DS2450 im Hintergrund noch die analog-digital Umwandlung durchführt (was möglich ist). Das read out control ist ein 8 Bit Hexadezimalwert:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! bit7 !! bit6 !! bit5 !! bit4 !! bit3 !! bit2 !! bit1 !! bit0<br />
|-<br />
| Set D || Clear D || Set C || Clear C || Set B || Clear B || Set A || Clear A<br />
|}<br />
<br />
Set bzw. Clear verhalten sich wie folgt:<br />
{| border=1 cellspacing=0 padding=4 class=wikitable<br />
! Set !! Clear !! Ergebnis<br />
|-<br />
| 0 || 0 || keine Veränderung am Umwandlung-Register<br />
|-<br />
| 0 || 1 || alle Bits des Umwandlung-Register werden auf 0 gesetzt<br />
|-<br />
| 1 || 0 || alle Bits des Umwandlung-Register werden auf 1 gesetzt<br />
|-<br />
| 1 || 1 || invalid<br />
|}<br />
<br />
Ungültige Kombinationen im read out control (d.h. Set = 1 und Clear = 1) werden erkannt und führen zu einer ECMD-Fehlermeldung.<br />
<br />
<br />
Default-Werte:<br />
* input select mask: 0x04<br />
* read out control: 0x00<br />
<br />
Beispiel:<br />
1w ds2450 convert<br />
<br />
(für alle Kanäle wird die analog-digital Umwandlung durchgeführt)<br />
<br />
==== <code>1w ds2450 get</code> ====<br />
<br />
Hierüber wird das Ergebnis der analog-digital Umwandlung ausgelesen (analog den 1-wire Temperatursensoren). Werden keine weiteren Argumente angegeben, so werden die Umwandlungsergebnisse für alle 4 Kanäle des DS2450 ausgegeben. Optional kann ein Kanal angegeben werden, dann wird nur das Umwandlungsergebniss dieses Kanals ausgegeben. Wurde seit dem letzten power-on reset cycle keine Umwandlung durchgeführt, stehen alle Bits der Register auf 0.<br />
<br />
Die Ausgabe erfolgt als raw (unsigned integer 16 Bit - <code>uint16_t</code>). Die eingelesene Spannung errechnet sich wie folgt (VAL ist die Ausgabe von <code>1w ds2450 get</code>):<br />
* für range = 0 (0..2,55V)<br />
VAL<br />
------- * 2,55V<br />
2**16-1<br />
<br />
* für range = 1 (0..5,10V)<br />
VAL<br />
------- * 5,10V<br />
2**16-1<br />
<br />
<br />
Default-Werte: -<br />
<br />
Beispiel:<br />
1w ds2450 get<br />
<br />
(die Umwandlungsergebnisse für alle 4 Kanäle werden ausgegeben)<br />
<br />
=== Beispielschaltung ===<br />
<br />
Hier ein Beispielschaltung für den DS2450. Kanal A wird als Eingabe genutzt (range = 1). Kanal D wird als Ausgabe genutzt, über den Optokoppler kann die LED geschaltet werden.<br />
<br />
Der Widerstand R1 muss <b>unbedingt</b> entsprechend dem Optokoppler dimensioniert werden. Beim 4N35 sind 1k3 ausreichend, dann fließt ein Strom von ca. 2,8mA.<br />
<br />
[[File:DS2450 Beispiel 01.gif|600px|Beispielschaltung DS2450]]<br />
<br />
== Einbindung in Control6 (tcp_send) ==<br />
<br />
https://github.com/ethersex/ethersex/blob/master/hardware/onewire/ds2450.h<br><br />
http://www.tutorials.at/c/03-dateneingabe-ausgabe.html<br><br />
<br />
<br><br />
'''"ecmd?1w list"''' ergibt den rom code '''20686414000000b5''' für den ds2450<br><br />
<br><br />
<source lang="text"><br />
C6_HEADER(`/* This will be in control6.h */')<br />
#include "hardware/onewire/ds2450.h"<br />
uint16_t counter1 = 0;<br />
uint16_t var1 = 0;<br />
CONTROL_START<br />
CLOCK_USED()<br />
<br />
THREAD(start)<br />
var1 = 1;<br />
WAIT(5)<br />
var1 = 0;<br />
WAIT(5)<br />
THREAD_END(start)<br />
<br />
TCP_HANDLER_PERSIST(message_handler);<br />
if (var1 == 1){<br />
ow_rom_code_t rom_code;<br />
uint16_t result;<br />
rom_code.bytewise[0] = 0x20;<br />
rom_code.bytewise[1] = 0x68;<br />
rom_code.bytewise[2] = 0x64;<br />
rom_code.bytewise[3] = 0x14;<br />
rom_code.bytewise[4] = 0x00;<br />
rom_code.bytewise[5] = 0x00;<br />
rom_code.bytewise[6] = 0x00;<br />
rom_code.bytewise[7] = 0xb5;<br />
ow_ds2450_convert(&rom_code, 0x0f, 0x00);<br />
ow_ds2450_get(&rom_code, 2, 2, &result);<br />
TCP_SEND("%u", result);<br />
WAIT(15)<br />
}<br />
TCP_HANDLER_END();<br />
<br />
ON STARTUP DO<br />
THREAD_START(start)<br />
TCP_CONNECT(192.168.123.106, 4445, message_handler);<br />
END<br />
<br />
CONTROL_END<br />
</source></div>Mguehttp://www.ethersex.de/index.php?title=Onewire_DS2450_(Deutsch)&diff=825Onewire DS2450 (Deutsch)2012-09-23T15:18:51Z<p>Mgue: moved Onewire DS2450 (Deutsch) to Onewire/DS2450 (Deutsch)</p>
<hr />
<div>#REDIRECT [[Onewire/DS2450 (Deutsch)]]</div>Mguehttp://www.ethersex.de/index.php?title=Onewire/DS2450&diff=822Onewire/DS24502012-09-23T15:18:30Z<p>Mgue: moved Onewire DS2450 to Onewire/DS2450</p>
<hr />
<div>{{i18n|Onewire_DS2450}}<br />
{{Module<br />
|NAME=Onewire_DS2450<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{In_Development}} <br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]]<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
* For the moment follow the German Link --> [http://www.ethersex.de/index.php/Onewire_DS2450_(Deutsch) http://www.ethersex.de/index.php/Onewire_DS2450_(Deutsch)]</div>Mguehttp://www.ethersex.de/index.php?title=Onewire_DS2450&diff=823Onewire DS24502012-09-23T15:18:30Z<p>Mgue: moved Onewire DS2450 to Onewire/DS2450</p>
<hr />
<div>#REDIRECT [[Onewire/DS2450]]</div>Mguehttp://www.ethersex.de/index.php?title=Template:Documentation&diff=816Template:Documentation2012-09-23T13:43:38Z<p>Mgue: added more links</p>
<hr />
<div><noinclude>{{i18n|Template:Documentation}}</noinclude><br />
<br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#EEEEEE; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #FFFFFF; text-align: center; border-bottom:1px solid #aaaaaa;" | '''Documentation'''<br />
|-<br />
|<br />
[[Wiki Guidelines]]<br />
----<br />
* [[:Category:Hardware|Hardware Drivers]]<br />
* [[:Category:Protocol|Protocol Support]]<br />
* [[:Category:Application|Services and Applications]]<br />
* [[ECMD Reference]]<br />
----<br />
* [[Flashing|Flashing Ethersex]]<br />
----<br />
[[:Category:Development|'''For Developers''']]<br />
* [[Concept of meta]]<br />
* [[Own module]]<br />
* [[Config.mk]]<br />
* [[Development/ECMD|Writing ECMD Commands]]<br />
* [[Configuration of Boards and Pins]]<br />
|}</div>Mguehttp://www.ethersex.de/index.php?title=Template:Experimental&diff=815Template:Experimental2012-09-23T13:18:00Z<p>Mgue: changed color to orange</p>
<hr />
<div><div style="text-align:center;background-color: #FF7B00;color: #ffffff;font-weight: bold;">Experimental</div><br />
<br />
[[Category:Experimental Module| ]]</div>Mguehttp://www.ethersex.de/index.php?title=MediaWiki:Sidebar&diff=812MediaWiki:Sidebar2012-09-23T01:17:04Z<p>Mgue: sourcecode + bug</p>
<hr />
<div>* navigation<br />
** mainpage|mainpage-description<br />
** https://github.com/ethersex/ethersex|Sourcecode<br />
** http://bugs.ethersex.de/|Report a Bug<br />
** currentevents-url|currentevents<br />
** recentchanges-url|recentchanges<br />
** randompage-url|randompage<br />
** helppage|help<br />
* SEARCH<br />
* TOOLBOX<br />
* LANGUAGES</div>Mguehttp://www.ethersex.de/index.php?title=Ethersex_Lighting_Architecture&diff=811Ethersex Lighting Architecture2012-09-22T23:43:45Z<p>Mgue: input is not implemented yet</p>
<hr />
<div>{{i18n|Ethersex Lighting Architecture}}<br />
<br />
= Design =<br />
<br />
{| style="width:100%"<br />
| colspan="2" |<br />
{| cellpadding="4" cellspacing="0" style="margin-top:5px; background:#F7F7F7; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #93FF05; text-align: center; border-bottom:1px solid #aaaaaa;" | '''Display''' PWM/Servo Control Modules for Lighting Devices directly attached to ethersex<br />
|-<br />
| <br />
* [[StellaLight]]<br />
* [[Starburst]]<br />
* [[DMX_Storage#ECMD_commands | ECMD]]<br />
|}<br />
|-<br />
| colspan="2" style="background-color: #FF8C00; text-align: center; border-bottom:1px solid #aaaaaa; height:50px;" | '''[[DMX Storage | Storage]]''' provides an API for higher and lower layers (access and store)<br />
|-<br />
| style="width:50%" |<br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#F7F7F7; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #B9BCFF; text-align: center; border-bottom:1px solid #aaaaaa; " | '''Input/Modifiers''' receivers and modifiers for DMX data<br />
|-<br />
| <br />
* [[DMX]] (not yet implemented)<br />
* [[Artnet]]<br />
* [[DMX_Storage#ECMD_commands | ECMD]]<br />
* [[DMX_Storage#Web_GUI | HTTP]]<br />
* [[DMX FXSlot]]<br />
|}<br />
| style="width:50%" |<br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#F7F7F7; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #B9BCFF; text-align: center; border-bottom:1px solid #aaaaaa; " | '''Output''' DMX/Universe Routing (e.g. [[Artnet]] in => [[DMX]] RS485 out)<br />
|-<br />
| <br />
* [[DMX]]<br />
* [[Artnet]]<br />
* [[DMX_Storage#ECMD_commands | ECMD]]<br />
|}<br />
<br />
|}<br />
[[Category:e6la]]</div>Mguehttp://www.ethersex.de/index.php?title=ECMD_Reference&diff=807ECMD Reference2012-08-02T15:42:02Z<p>Mgue: Undo revision 806 by CarolMcneil (Talk)</p>
<hr />
<div><div class="errorbox"><br />
This page is automatically generated from the files in the Ethersex source code<br />
repository. Do not edit this page but send [[patches]] for those files!<br />
</div><br />
<br />
__NOTOC__<br />
== Analog/Digital Conversion ([[ADC]]) ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| adc get [CHANNEL]<br />
| Get the ADC value in hex of CHANNEL or if no channel set of all channels.<br />
|-<br />
| hr20 temp <br />
| Read HR20 temperature sensor.<br />
|-<br />
|}<br />
== DNS Resolver ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dns server [IPADDR]<br />
| Display/Set the IP address of the DNS server to use to IPADDR.<br />
|-<br />
| nslookup HOSTNAME<br />
| Do DNS lookup for HOSTNAME (call twice).<br />
|-<br />
|}<br />
== Digital/Analog Conversion ([[DAC]]) ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| ltc1257_delay `[VALUE]<br />
| Set (if VALUE given) or get (no VALUE) delay for LTC1257 output bit changes in µs'<br />
|-<br />
| ltc1257_set `[VALUE0] [VALUE1] ...<br />
| Set output to value (value: 0-4095)'<br />
|-<br />
| tlc5620 `[CHANNEL] [VALUE]<br />
| Set Output to value (Value: 0-0xff)'<br />
|-<br />
|}<br />
== Fnordlicht ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| fnordlicht "ADDRESS RED<br />
| GREEN,BLUE",fnordlicht command to set RGB color<br />
|-<br />
| fnordlicht_init <br />
| fnordlicht init<br />
|-<br />
|}<br />
== HD44780 [[LCD]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| hr20 hourbar START STOP<br />
| Update hourbar to show ticks between START and STOP (range 0..23)<br />
|-<br />
| hr20 toggle SEG<br />
| Toggle segment SEG (a number, not a symbolic name!)<br />
|-<br />
| lcd backlight STATE<br />
| switch back light STATE to ON or OFF <br />
|-<br />
| lcd char N D1 D2 D3 D4 D5 D6 D7 D8<br />
| Define use-definable char N with data D1..D8 (provide DATA in hex)<br />
|-<br />
| lcd clear [LINE]<br />
| Clear line LINE (0..3) or the whole display (if parameter is omitted)<br />
|-<br />
| lcd goto LINE COL<br />
| Move cursor to LINE and column COL (origin is 0/0)<br />
|-<br />
| lcd reinit CURSOR BLINK<br />
| Reinitialize the display, set whether to show the cursor (CURSOR, 0 or 1) and whether the cursor shall BLINK<br />
|-<br />
| lcd shift DIR<br />
| Shift the display to DIR (either ''left'' or ''right'')<br />
|-<br />
| lcd write TEXT<br />
| Write TEXT to the current cursor location<br />
|-<br />
|}<br />
== Infrared Send/Receive ([[IR-TRX]]) ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| ir receive <br />
| receive an IR command<br />
|-<br />
| ir send DEVICE COMMAND<br />
| send COMMAND to DEVICE<br />
|-<br />
|}<br />
== Infrared Send/Receive ([[IRMP]]) ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| irmp receive <br />
| receive an IR command<br />
|-<br />
| irmp send PROTOCOL DEVICE COMMAND REPEAT<br />
| send COMMAND with REPEAT flag to DEVICE using PROTOCOL<br />
|-<br />
|}<br />
== NTP Client ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| ntp query <br />
| Query the NTP server to get an NTP update.<br />
|-<br />
| ntp server [IPADDR]<br />
| Display/Set the IP address of the NTP server to use to IPADDR.<br />
|-<br />
| ntp status <br />
| Display NTP server status<br />
|-<br />
|}<br />
== Network configuration ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| enc dump <br />
| Dump the internal state of the enc to serial<br />
|-<br />
| gw [IP]<br />
| Display/Set the address of the default router.<br />
|-<br />
| ip [IP]<br />
| Display/Set the IP address.<br />
|-<br />
| mac [xx:xx:xx:xx:xx:xx]<br />
| Display/Set the MAC address.<br />
|-<br />
| netmask [IP]<br />
| Display/Set the network mask.<br />
|-<br />
|}<br />
== Port I/O ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| io get ddr PORTNUM<br />
| Display the current value of the DDR PORTNUM.<br />
|-<br />
| io get mask PORTNUM<br />
| Display the mask of the port PORTNUM.<br />
|-<br />
| io get pin PORTNUM<br />
| Display the current value of the PIN-register of the port PORTNUM.<br />
|-<br />
| io get port NUM<br />
| Display the current value of the PORT NUM.<br />
|-<br />
| io set ddr PORTNUM HEXVALUE [MASK]<br />
| Set the DDR of port PORTNUM to VALUE (possibly using the provided MASK).<br />
|-<br />
| io set port NUM HEXVALUE [MASK]<br />
| Set the PORT NUM to VALUE (possibly using the provided MASK).<br />
|-<br />
|}<br />
== Reading and Writing EEPROM Space on Device ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| eer eer <ADDR> <LENGTH><br />
| Read n bytes from address after the config in eeprom.<br />
|-<br />
| eew eew <ADDR> <HEXBYTES><br />
| Write Hexbytes at address after the config in epprom.<br />
|-<br />
| fuse <br />
| Display current fuse settings<br />
|-<br />
| hostname <br />
| Display hostname.<br />
|-<br />
|}<br />
== Resetting the controller ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| bootloader <br />
| Call the bootloader.<br />
|-<br />
| reset <br />
| Reset the Ethersex.<br />
|-<br />
| wdreset <br />
| Go into endless loop to trigger a watchdog timeout.<br />
|-<br />
|}<br />
== [[ADS]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| adc get <br />
| Get the ADC value in hex.<br />
|-<br />
| adc mean [COUNT]<br />
| Get the mean of power of 2 COUNT ADC values in hex.<br />
|-<br />
|}<br />
<br />
== [[Am_Puls_der_Zeit|Clock]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| date <br />
| Print the current date.<br />
|-<br />
| lastdcf <br />
| Print when last valid DCF signal was received.<br />
|-<br />
| time [UNIXTIME]<br />
| Display/Set the current time in seconds since January 1st 1970.<br />
|-<br />
| uptime <br />
| Display ethersex uptime in unix format.<br />
|-<br />
| whm <br />
| Display ethersex uptime.<br />
|-<br />
|}<br />
== [[Application_Sample]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| sample <br />
| Manually call application sample commands<br />
|-<br />
| sample_init <br />
| Manually call application sample init method<br />
|-<br />
| sample_periodic <br />
| Manually call application sample periodic method<br />
|-<br />
|}<br />
== [[Blinkenlights_MCUF|MCUF]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| mcuf modul N<br />
| Select module N<br />
|-<br />
| mcuf modul list <br />
| List all modules<br />
|-<br />
| mcuf showclock <br />
| Show digital clock<br />
|-<br />
| mcuf showstring MESSAGE<br />
| Show scrolling MESSAGE on the display<br />
|-<br />
|}<br />
== [[CRC]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| crc calc <br />
| "read the ethersex program code and calc a crc16 of it"<br />
|-<br />
| crc read <br />
| "read out the crc16 value at the end of the program space"<br />
|-<br />
|}<br />
== [[CRON-Dienst]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| cron_add MIN HOUR DAY MONTH DOW ECMD<br />
| Add ECMD to cron to be executed at given time<br />
|-<br />
| cron_list <br />
| Show all cron entries<br />
|-<br />
| cron_make_persistent <br />
| Mark a Job as persistent<br />
|-<br />
| cron_rm POSITION<br />
| Remove one cron entry<br />
|-<br />
| cron_save <br />
| Saves all persistent jobs<br />
|-<br />
|}<br />
== [[DALI]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dali cmd [TARGET] [COMMAND] [!][?]<br />
| "send the given command (decimal) to targets (all, g00 to g15, s00 to s63), auto repeat with !, read reply with ?"<br />
|-<br />
| dali dim [TARGET] [LEVEL]<br />
| "dim targets (all, g00 to g15, s00 to s63) to given level (0-254)"<br />
|-<br />
| dali raw [BYTE1] [BYTE2]<br />
| "send a raw frame (two bytes, given in hex) over the DALI bus"<br />
|-<br />
| dali scmd [SPECIAL COMMAND] [DATA] [!][?]<br />
| "send special command (256-287) with data, auto repeat with !, read reply with ?"<br />
|-<br />
|}<br />
== [[DMX_FXSlot]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dmx fxslot devices <br />
| set the device settings<br />
|-<br />
| dmx fxslot effect <br />
| set the effect settings<br />
|-<br />
| dmx fxslot reset <br />
| reset all fxslots and clear saved ones in EEPROM<br />
|-<br />
| dmx fxslot restore <br />
| restore the settings from EEPROM<br />
|-<br />
| dmx fxslot save <br />
| save the current fxslots to EEPROM<br />
|-<br />
|}<br />
== [[DMX_Storage]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dmx channels <br />
| Get channels per universe<br />
|-<br />
| dmx get <br />
| Return channel value<br />
|-<br />
| dmx set <br />
| Set channel values<br />
|-<br />
| dmx universe <br />
| Get a whole universe<br />
|-<br />
| dmx universes <br />
| Get universes<br />
|-<br />
|}<br />
== [[Dallas_1-wire_Bus]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| 1w convert [DEVICE]<br />
| Trigger temperature conversion of either DEVICE or all connected devices<br />
|-<br />
| 1w ds2450 convert [DEVICE]<br />
| `start conversion (with optional input mask and read out control)'<br />
|-<br />
| 1w ds2450 get [DEVICE]<br />
| `get conversion result (one or all channels)'<br />
|-<br />
| 1w ds2450 oc [DEVICE]<br />
| `get/set output control (per channel)'<br />
|-<br />
| 1w ds2450 oe [DEVICE]<br />
| `get/set output enable (per channel)'<br />
|-<br />
| 1w ds2450 por [DEVICE]<br />
| `get/set power on reset (per channel)'<br />
|-<br />
| 1w ds2450 power [DEVICE]<br />
| `get/set power supply of device (global)'<br />
|-<br />
| 1w ds2450 range [DEVICE]<br />
| `get/set input voltage range (per channel)'<br />
|-<br />
| 1w ds2450 res [DEVICE]<br />
| `get/set bit resolution of AD convert (per channel)'<br />
|-<br />
| 1w get DEVICE<br />
| Return temperature value of onewire DEVICE (provide 64-bit ID as 16-hex-digits)<br />
|-<br />
| 1w list <br />
| Return a list of the connected onewire devices<br />
|-<br />
|}<br />
== [[DataFlash]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| df status <br />
| Display internal status.<br />
|-<br />
| fs format <br />
| Format the filesystem.<br />
|-<br />
| fs inspect inode INODE<br />
| Inspect INODE (and associated page).<br />
|-<br />
| fs inspect node NODE<br />
| Inspect NODE and dump to serial.<br />
|-<br />
| fs list <br />
| List the directory.<br />
|-<br />
| fs mkfile NAME<br />
| Create a new file NAME.<br />
|-<br />
| fs remove NAME<br />
| Delete the file NAME.<br />
|-<br />
| fs truncate NAME LEN<br />
| Truncate the file NAME to LEN bytes.<br />
|-<br />
|}<br />
== [[Dc3840_camera|DC3840 mobil camera support]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dc3840 capture <br />
| Take a picture. Access 'dc3840' via VFS afterwards. See [[DC3840 Camera]] for details.<br />
|-<br />
| dc3840 light <br />
| Light level of camera<br />
|-<br />
| dc3840 send A B C D E<br />
| Send provided command bytes to the camera.<br />
|-<br />
| dc3840 sync <br />
| Re-sync to the camera<br />
|-<br />
| dc3840 zoom <br />
| Enable zoom of camera<br />
|-<br />
|}<br />
== [[ECMDScript]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| call FILENAME<br />
| Start script named FILENAME<br />
|-<br />
| cat FILENAME<br />
| cat file content (with debug only)<br />
|-<br />
| dec VAR<br />
| Decrement variable VAR (a number) <br />
|-<br />
| echo <any><br />
| Print out all arguments of echo<br />
|-<br />
| exit <br />
| Exit currently running script<br />
|-<br />
| get VAR<br />
| Get value of variable VAR<br />
|-<br />
| goto N<br />
| Goto line N in currently running script<br />
|-<br />
| if ( CMD/VAR == CONST ) then CMD2<br />
| If condition matches execute CMD2<br />
|-<br />
| inc VAR<br />
| Increment variable VAR (a number) <br />
|-<br />
| rem <any><br />
| Remark for anything<br />
|-<br />
| set VAR VALUE<br />
| Set variable VAR to VALUE<br />
|-<br />
| wait I<br />
| Wait I milliseconds<br />
|-<br />
|}<br />
== [[FS20]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| fht send HOUSECODE ADDR CMD [CMD2]<br />
| Send FHT command. See [[FS20]] for details.<br />
|-<br />
| fs20 receive <br />
| Receive FS20/FHT sequence and display it.<br />
|-<br />
| fs20 send HOUSECODE ADDR CMD [CMD2]<br />
| Send FS20 command. See [[FS20]] for details.<br />
|-<br />
| fs20 ws300 <br />
| Receive FS20 sequence from WS300 weather station and decode it.<br />
|-<br />
|}<br />
== [[Frequency Counter]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| fc %duty [CHANNEL]<br />
| "returns last on duty cycle in percent for given channel"<br />
|-<br />
| fc duty [CHANNEL]<br />
| "returns last on duty cycle (0-255) for given channel"<br />
|-<br />
| fc freq [CHANNEL]<br />
| "returns last frequency in Hz for given channel"<br />
|-<br />
| fc off [CHANNEL]<br />
| "switch off frequency counting on given channel"<br />
|-<br />
| fc on [CHANNEL]<br />
| "switch on frequency counting on given channel"<br />
|-<br />
| fc ticks [CHANNEL]<br />
| "returns last frequency in CPU ticks for given channel"<br />
|-<br />
|}<br />
== [[GLCD_Menu]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| glcdmenu key VALUE<br />
| Send a keypress to the menu<br />
|-<br />
| glcdmenu update <br />
| Update the menu<br />
|-<br />
|}<br />
== [[GPS]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| nmea get <br />
| Get latitude and longitude data<br />
|-<br />
| nmea satellites <br />
| Get satellites<br />
|-<br />
|}<br />
== [[H-Bridge]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| hbridge [action] [enable_l] [enable_r]<br />
| Set H-Bridge command<br />
|-<br />
| hbridge pwm int<br />
| Set H-Bridge enable line valueeg. speed<br />
|-<br />
|}<br />
== [[I2C]] (TWI) ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| bmp085 apress <br />
| Get absolute pressure in Pa<br />
|-<br />
| bmp085 height PRESSNN<br />
| Get height in cm, pressure at N0 needed<br />
|-<br />
| bmp085 pressnn HEIGHT<br />
| Get pressure at N0, height in cm needed<br />
|-<br />
| bmp085 temp <br />
| Get temperature in 0.1°C<br />
|-<br />
| ds1631 convert ADDR VALUE<br />
| Initiate temperature conversions (0: stop, 1: convert)<br />
|-<br />
| ds1631 temp ADDR<br />
| Read last converted temperature<br />
|-<br />
| i2c detect <br />
| list detected I2C Chips<br />
|-<br />
| i2c rbb ADDR<br />
| read byte from I2C chip<br />
|-<br />
| i2c rbd CHIPADDR REGADDR<br />
| read byte from register address at I2C chip<br />
|-<br />
| i2c rwd CHIPADDR REGADDR<br />
| read word from register address at I2C chip<br />
|-<br />
| i2c wbb ADDR HEXVALUE<br />
| write byte to I2C chip<br />
|-<br />
| i2c wbd CHIPADDR REGADDR HEXVALUE<br />
| write byte to register address on I2C chip<br />
|-<br />
| i2c wwd CHIPADDR REGADDR HEXVALUE<br />
| write word to register address on I2C chip<br />
|-<br />
| lm75 ADDR<br />
| Get temperature<br />
|-<br />
| max7311 getDDRw ADDR<br />
| Get Direction-Register DDR<br />
|-<br />
| max7311 getINw ADDR<br />
| Get Input-Register IN<br />
|-<br />
| max7311 getOUTw ADDR<br />
| Get Output-Register OUT<br />
|-<br />
| max7311 pulse ADDR BIT TIME<br />
| Toggle Output-BIT for TIME (in ms)<br />
|-<br />
| max7311 set ADDR BIT VALUE<br />
| Set Output-BIT to VALUE (bool)<br />
|-<br />
| max7311 setDDRw ADDR VALUE<br />
| Set Direction-Register DDR (VALUE as hex)<br />
|-<br />
| max7311 setOUTw ADDR VALUE<br />
| Set Output-Register OUT (VALUE as hex)<br />
|-<br />
| pca9531 ADDR PERIODPWM1 DUTYPWM1 PERIODPWM2 DUTYPWM2 LED0..3 LED4..7<br />
| set PWM1 and PWM2 and LED states<br />
|-<br />
| pca9685m ADDR<br />
| OUTDRV, IVRT, PRESCALE <br />
|-<br />
| pca9685s ADDR<br />
| LED, ON, OFF <br />
|-<br />
| pcf8574x read ADDR CHIP<br />
| Get bits<br />
|-<br />
| pcf8574x set ADDR CHIP HEXVALUE<br />
| Set bits<br />
|-<br />
| tsl2550 lux <br />
| Show light level by reading adc registers and computing level<br />
|-<br />
| tsl2550 mode VALUE<br />
| Set the TSL2550s operating mode (0: standard range, 1: extended range)<br />
|-<br />
| tsl2550 power VALUE<br />
| Set the TSL2550s power state (0: down, 1:up)<br />
|-<br />
|}<br />
== [[Jabber]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| jabber_host [HOSTNAME]<br />
| JABBER hostname<br />
|-<br />
| jabber_pass [PASSWORD]<br />
| JABBER password<br />
|-<br />
| jabber_resrc [RESOURCE]<br />
| JABBER resource<br />
|-<br />
| jabber_user [USERNAME]<br />
| JABBER username<br />
|-<br />
|}<br />
== [[KTY]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| kty autocalibrate CHANNEL<br />
| Calibrate to 1000 Ohm precision Resistor.<br />
|-<br />
| kty cal get <br />
| Return the calibration difference to 2k2 Resistor.<br />
|-<br />
| kty get [CHANNEL]<br />
| Get the temperature in xxx.x °C of CHANNEL or if no channel set of all channels.<br />
|-<br />
|}<br />
== [[MotorCurtain]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| curtain VALUE<br />
| Set value of curtain. 0=closed..7=open. If you use fewer sensors, use the corrent value instead of 7. <br />
|-<br />
| curtainlast <br />
| Return last known position<br />
|-<br />
| curtainmax <br />
| Return maximum position<br />
|-<br />
| curtainoff <br />
| Switch motor off<br />
|-<br />
|}<br />
== [[Named_PIN]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| pin get NAME<br />
| Read and display the status of pin NAME.<br />
|-<br />
| pin list <br />
| List all known named-pins.<br />
|-<br />
| pin set NAME STATUS<br />
| Set the status of pin NAME to STATUS.<br />
|-<br />
| pin toggle NAME<br />
| Toggle the status of pin NAME.<br />
|-<br />
|}<br />
== [[PWM]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| dtmf CHARS<br />
| send CHARS as DTMF<br />
|-<br />
| freq set FREQUENCY DELAY<br />
| Set frequency for DELAY ms<br />
|-<br />
| pwm fade [channel +-diff startvalue]<br />
| Set fading at channel with startvalue and change each stepp to diff (must be signed 3 digit)<br />
|-<br />
| pwm set [channel value]<br />
| Set channel to value<br />
|-<br />
|}<br />
== [[RFM12]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| rfm12 reinit <br />
| Re-initialize RFM12 module.<br />
|-<br />
| rfm12 setbandwidth BW<br />
| Set RX bandwidth to BW.<br />
|-<br />
| rfm12 setbaud BAUD<br />
| Set baudrate to BAUD.<br />
|-<br />
| rfm12 setdrssi DRSSI<br />
| Set the drssi to DRSSI.<br />
|-<br />
| rfm12 setgain GAIN<br />
| Set preamplifier gain to GAIN.<br />
|-<br />
| rfm12 setmod MOD<br />
| Set modulation to MOD.<br />
|-<br />
| rfm12 status <br />
| Display internal status.<br />
|-<br />
|}<br />
== [[RFM12_ASK]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| rfm12 1527 <br />
| housecodeCommand delay cnt<br />
|-<br />
| rfm12 2272 <br />
| housecodeCommand delay cnt<br />
|-<br />
| rfm12 ask sense <br />
| Trigger (Tevion) ASK sensing. Enable ext. filter pin before!<br />
|-<br />
| rfm12 external filter [1]<br />
| Enable ext. filter pin if argument is present (disable otherwise)<br />
|-<br />
| rfm12 intertechno <br />
| family group device command<br />
|-<br />
| rfm12 tevion <br />
| housecode command delay cnt<br />
|-<br />
|}<br />
== [[RFM12_FS20]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| fht send <br />
| housecode addr command data<br />
|-<br />
| fs20 send <br />
| housecode addr command data<br />
|-<br />
|}<br />
== [[SD-Karte]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| sd dir <br />
| List contents of current SD directory.<br />
|-<br />
| sd mkdir PATH<br />
| Create directory hierarchy PATH.<br />
|-<br />
|}<br />
== [[SHT]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| sht humid <br />
| Return humidity of SHT sensor<br />
|-<br />
| sht raw <br />
| Return raw hex temp (first line) and humidity value (second line) of SHT sensor<br />
|-<br />
| sht temp <br />
| Return temperature of SHT sensor<br />
|-<br />
|}<br />
== [[SMS77]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| sms77 MESSAGE<br />
| Send MESSAGE to compiled in sms77 service<br />
|-<br />
| sms77_pass [PASSWORD]<br />
| SMS77 password<br />
|-<br />
| sms77_recv [RECEIVER]<br />
| SMS receiver<br />
|-<br />
| sms77_type [TYPE]<br />
| SMS type<br />
|-<br />
| sms77_user [USERNAME]<br />
| SMS77 username<br />
|-<br />
|}<br />
== [[Servo_Ansteuerung|PWM Servo Control]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| pwm servo_dec SERVONR<br />
| Decrement position of servo SERVONR<br />
|-<br />
| pwm servo_inc SERVONR<br />
| Increment position of servo SERVONR<br />
|-<br />
| pwm servo_set SERVONR POSITION<br />
| Set servo with SERVONR to POSITION<br />
|-<br />
|}<br />
== [[Sound]]/WAV support ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| pwm stop <br />
| Stop wav<br />
|-<br />
| pwm wav <FILENAME><br />
| Play wave file. Use VFS if compiled in. More details at [[Sound]]<br />
|-<br />
|}<br />
== [[Stella_Light]] commands ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| channel CHANNEL VALUE FUNCTION<br />
| Get/Set stella channel to value. Second and third parameters are optional. Function: You may use 's' for instant set, 'f' for fade and 'y' for flashy fade. <br />
|-<br />
| channels <br />
| Return stella channel size<br />
|-<br />
| fadestep FADESTEP<br />
| Get/Set stella fade step<br />
|-<br />
| stella load <br />
| Load values from eeprom<br />
|-<br />
| stella store <br />
| Store values in eeprom<br />
|-<br />
|}<br />
== [[USB]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| keyboard MESSAGE<br />
| Send MESSAGE as HID keyboard<br />
|-<br />
| mouse BUTTON DELTAX DELTAY<br />
| Send data as HID mouse<br />
|-<br />
|}<br />
== [[ZACwire]] ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| zac 306 PORT BIT<br />
| Return temperature of TSic 306 at BIT of PORT<br />
|-<br />
| zac 506 PORT BIT<br />
| Return temperature of TSic 506 at BIT of PORT<br />
|-<br />
| zac raw PORT BIT<br />
| Return raw hex temperature value of zacwire at BIT of PORT<br />
|-<br />
|}<br />
== lome6 ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| lome6 get_t TYPE<br />
| get temperature command<br />
|-<br />
| lome6 power TYPE<br />
| press power command<br />
|-<br />
| lome6 reset <br />
| press reset command<br />
|-<br />
| lome6 set_t TYPE TEMPERATURE<br />
| set temperature command<br />
|-<br />
| lome6 state <br />
| get state command<br />
|-<br />
| lome6 uptime UPTIME<br />
| set/get uptime command<br />
|-<br />
|}<br />
== Miscelleanous ==<br />
{| border='1'<br />
| ''Command syntax''<br />
| ''Short description''<br />
|-<br />
| alias list <br />
| List all available aliases<br />
|-<br />
| artnet test <br />
| artnet test<br />
|-<br />
| cw send MESSAGE<br />
| Send MESSAGE in Morce Code<br />
|-<br />
| d ADDR<br />
| Dump the memory at ADDR (16 bytes).<br />
|-<br />
| eeprom reinit <br />
| Force reinitialization of the EEPROM config area<br />
|-<br />
| free <br />
| Display free space.<br />
|-<br />
| help <br />
| List which commands are available.<br />
|-<br />
| ht MESSAGE<br />
| Send MESSAGE to compiled in httplog service<br />
|-<br />
| ipstats <br />
| Display IP statistics.<br />
|-<br />
| mb recv <br />
| Receive data from modbus<br />
|-<br />
| moodlight CHANNEL ONOFF<br />
| Set CHANNEL moodlight on=1 or off=0. If no channel is given return on if channel CHANNEL is moodlighted<br />
|-<br />
| motd [MESSAGE]<br />
| Save MESSAGE as new message of the day, otherwise just show current message<br />
|-<br />
| msr1 get <br />
| Get data<br />
|-<br />
| mysql query QUERY<br />
| Send specified MySQL query to the configured server<br />
|-<br />
| ns <br />
| update net statistic for public anouncment of currently running ethersex<br />
|-<br />
| pam USER PASSWORD<br />
| Use pam for user and password<br />
|-<br />
| push NUMBER<br />
| Push button identified by NUMBER<br />
|-<br />
| pwm melody [NUMBER]<br />
| Play melody<br />
|-<br />
| sanyoz700 CMD<br />
| Send command to projector<br />
|-<br />
| sll get <br />
| Request the logged data<br />
|-<br />
| sram memtest <br />
| Perform a memory test<br />
|-<br />
| srf05 <br />
| Read SRF05 measurement<br />
|-<br />
| to1 get <br />
| Request data from sensor<br />
|-<br />
| tw MESSAGE<br />
| Send MESSAGE to compiled in twitter service<br />
|-<br />
| upnp send <br />
| Manually send UPnP broadcast packet<br />
|-<br />
| usart baud BAUD<br />
| Set the USART baudrate to BAUD.<br />
|-<br />
| version <br />
| Display the version number.<br />
|-<br />
| wol MAC<br />
| Send WAKE-ON-LAN command to MAC<br />
|-<br />
| yport stats <br />
| Report statistic counters<br />
|-<br />
| zbus stats <br />
| Report statistic counters<br />
|-<br />
|}<br />
<br />
[[Category:Ethersex]]<br />
[[Category:ECMD]]</div>Mguehttp://www.ethersex.de/index.php?title=Quick_Start_Guide/Flashing&diff=698Quick Start Guide/Flashing2012-06-04T19:54:04Z<p>Mgue: Menu</p>
<hr />
<div>{{i18n|Quick Start Guide/Flashing}}<br />
<br />
= Requirements = <br />
<br />
* AVR NET-IO<br />
* ISP-Programmer (we're using a Evaluation-Board made by Pollin)<br />
* 10-pin connector cable (from Evaluation-Board to the NET-IO)<br />
<br />
= Flashing with avrdude =<br />
<br />
Avrdude offers several options. We will look on the most important, to make basic flashing of ethersex possible.<br />
<br />
* The chip you use, should be m32 for the ATMega32 in most cases: -p m32<br />
* Debug messages: -v<br />
* The protocol spoken with the programmer, for the Evaluation-Board: -c ponyser<br />
* The serial port the programmer is connected to: -P /dev/ttyS0 <br />
* The command you want to execute: -U flash:w:ethersex.hex<br />
<br />
After you checked all options and adjusted them to your settings you should have a command like this:<br />
<br />
avrdude -v -p m32 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex<br />
<br />
= Writing the Bytes =<br />
<br />
* Disconnect the power from the NET-IO<br />
* Connect your ISP cable to the programmer and the Net-IO<br />
* Reconnect the power and connect your programmer to the PC<br />
* Execute the command you assembled earlier<br />
* Congratulations! If avrdude finished without any error you successfully flashed ethersex to your Net-IO!<br />
* Disconnect the power and the programmer from the Net-IO<br />
* Reconnect the power, your Net-IO should boot up with ethersex<br />
<br />
[[Quick_Start_Guide/Configuration | previous step]] |</div>Mguehttp://www.ethersex.de/index.php?title=Quick_Start_Guide/Flashing&diff=697Quick Start Guide/Flashing2012-06-04T19:52:45Z<p>Mgue: i18n</p>
<hr />
<div>{{i18n|Quick Start Guide/Flashing}}<br />
<br />
= Requirements = <br />
<br />
* AVR NET-IO<br />
* ISP-Programmer (we're using a Evaluation-Board made by Pollin)<br />
* 10-pin connector cable (from Evaluation-Board to the NET-IO)<br />
<br />
= Flashing with avrdude =<br />
<br />
Avrdude offers several options. We will look on the most important, to make basic flashing of ethersex possible.<br />
<br />
* The chip you use, should be m32 for the ATMega32 in most cases: -p m32<br />
* Debug messages: -v<br />
* The protocol spoken with the programmer, for the Evaluation-Board: -c ponyser<br />
* The serial port the programmer is connected to: -P /dev/ttyS0 <br />
* The command you want to execute: -U flash:w:ethersex.hex<br />
<br />
After you checked all options and adjusted them to your settings you should have a command like this:<br />
<br />
avrdude -v -p m32 -c ponyser -P /dev/ttyS0 -U flash:w:ethersex.hex<br />
<br />
= Writing the Bytes =<br />
<br />
* Disconnect the power from the NET-IO<br />
* Connect your ISP cable to the programmer and the Net-IO<br />
* Reconnect the power and connect your programmer to the PC<br />
* Execute the command you assembled earlier<br />
* Congratulations! If avrdude finished without any error you successfully flashed ethersex to your Net-IO!<br />
* Disconnect the power and the programmer from the Net-IO<br />
* Reconnect the power, your Net-IO should boot up with ethersex</div>Mguehttp://www.ethersex.de/index.php?title=Wiki_Guidelines&diff=688Wiki Guidelines2012-06-04T15:33:18Z<p>Mgue: typo fixes</p>
<hr />
<div>{{i18n|Wiki Guidelines}}<br />
<br />
== Languages ==<br />
This is in a sense an international wiki. Please include this on top of every page you create:<br />
<br />
{{Codeline|<nowiki>{{i18n|TITLE}}</nowiki>}}<br />
<br />
Replace TITLE with the title of the page you are editing. This will insert a language bar like the one you can see above.<br />
If you want to translate a page, simply click on the language and start editing. Make sure that you include the language template as well.<br />
<br />
*Categories are not internationalized<br />
<br />
== Modules ==<br />
<br />
If you want to document a module, please make use of the [[Template:Module | Module Template]].<br />
A well documented module should look similar to [[IRMP | this ]].<br />
<br />
For the title, please use the name of the module in menuconfig or how it is called in the code (e.g. the folder name). Please do not chose a title that doesn't match with either one of these.<br />
<br />
== More rules ==<br />
<br />
* Refrain from putting all information related to a module into one single page. Create subpages for examples and specific setups.</div>Mguehttp://www.ethersex.de/index.php?title=Community&diff=514Community2012-04-24T17:28:19Z<p>Mgue: description</p>
<hr />
<div>{{i18n|Community}}<br />
= Mailing lists =<br />
*[http://list.zerties.org/cgi-bin/mailman/listinfo/ethersex-devel ethersex-devel] '''Discussion, Feature Request, Problems.''' Post your questions in German or English<br />
*[https://list.zerties.org/cgi-bin/mailman/listinfo/ethersex-commit ethersex-commit] '''Do not send messages to this list''' This list is read-only. Subscribe to this list if you want to be notified about changes in the code.<br />
<br />
= IRC =<br />
You can find us on [irc://freenode.net/#ethersex #ethersex] (freenode.net)<br />
<br />
If you have any questions...just ask! If no one answers right away - don't take it personally. We might just be away from keyboard. Just stick around for some time.</div>Mguehttp://www.ethersex.de/index.php?title=Ethersex_(Deutsch)&diff=512Ethersex (Deutsch)2012-04-22T23:45:31Z<p>Mgue: changed structure</p>
<hr />
<div>{{i18n|Main Page}}<br />
{{NewWiki (Deutsch)}}<br />
== Willkommen bei ethersex.de - der universalen AVR Firmware ==<br />
<br />
{|style="width:100%;"<br />
|style="width:33%;"|{{Facts (Deutsch)}}<br />
|style="width:33%;vertical-align:baseline;height:100%"|{{Getting Started (Deutsch)}}<br />
|style="width:33%;vertical-align:baseline;height:100%"|{{Documentation (Deutsch)}}<br />
|-<br />
|}</div>Mguehttp://www.ethersex.de/index.php?title=Ethersex&diff=511Ethersex2012-04-22T23:44:39Z<p>Mgue: changed structure</p>
<hr />
<div>{{i18n|Main Page}}<br />
{{NewWiki}}<br />
== Welcome to ethersex.de - the universal AVR firmware ==<br />
<br />
<br />
{|style="width:100%;"<br />
|style="width:33%;"|{{Facts}}<br />
|style="width:33%;vertical-align:baseline;height:100%"|{{Getting Started}}<br />
|style="width:33%;vertical-align:baseline;height:100%"|{{Documentation}}<br />
|-<br />
|}</div>Mguehttp://www.ethersex.de/index.php?title=Onewire_(Deutsch)&diff=504Onewire (Deutsch)2012-04-15T23:28:41Z<p>Mgue: moved Code to seperate pages</p>
<hr />
<div>{{i18n|Onewire}}<br />
<br />
{{Module<br />
|NAME=Onewire<br />
|MENUCONFIG={{I/O}}->Onewire support<br />
|STATUS={{stable}}<br />
|PINNING=yes<br />
|ECMD={{has_ecmd}}<br />
|CONTROL6={{has_control6}}<br />
|DEPENDS=[[ECMD]] [[HTTPD]] (optional) [[SNMP]] (optional)<br />
|REQUIRES= -<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/hardware/onewire https://github.com/ethersex/ethersex/tree/master/hardware/onewire]<br />
}}<br />
<br />
Ethersex kann 1-wire Temperatursensoren mit [[ECMD]] auflisten und abfragen. Es wird eine reine<br />
Softwareimplementierung des Protokolls benutzt, was keine weiteren Hardware erfordert, als die<br />
Temperatursensoren selbst.<br />
<br />
= Pinning =<br />
<br />
In der Standardkonfiguration liegt der Datapin des Buses auf PD6 (kann z.B. in der pinning/hardware/netio.m4<br />
oder pinning/hardware/etherrape.m4 geändert werden). Die Definition der Pins erfolgt mit:<br />
<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PXn, PXm)<br />
</source><br />
<br />
wobei PXn und PNm Pins auf PORTX sind.<br />
<br />
Jeder Pin zwischen und einschließlich PXn und PXm bildet einen eingenständigen Onewire Bus.<br />
Du kannst bis zu acht Busse auf einem PORT definieren (alle Busse müssen auf dem selben PORT liegen!)<br />
<br />
== Beispiele ==<br />
<br />
Wenn Du nur einen einzigen Bus benötigst, definiere den Bereich wie folgt:<br />
<br />
'''PORTD: PIN2'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD2)<br />
</source><br />
<br />
Für drei Busse würde das ganze etwa so aussehen:<br />
<br />
'''PORTD: PIN2, PIN3, PIN4'''<br />
<source lang=c><br />
ONEWIRE_PORT_RANGE(PD2, PD4)<br />
</source><br />
<br />
= Polling Modus =<br />
<br />
= Benennung von Sensoren =<br />
<br />
= Unterstützte Hardware =<br />
<br />
Folgende 1-wire Hardware wird momentan durch Ethersex unterstützt:<br />
* DS1820 (Temperatursensor)<br />
* DS18B20 (Temperatursensor)<br />
* DS1822 (Temperatursensor)<br />
* DS2502 (EEPROM)<br />
* DS2450 (4 Kanal ADC)<br />
<br />
= Onewire Befehle =<br />
<br />
unter Linux als erstes netcat starten (hierbei natürlich die IP ggf modifizieren): <br />
<br />
netcat 192.168.0.15 2701<br />
<br />
danach am prompt:<br />
<br />
1w list<br />
<br />
Gibt eine Liste mit Hexcodes aller angeschlossenen und erkannten Onewire(tm) Sensoren aus.<br />
Bei aktiviertem Naming-Support wird (per TAB getrennt) zusätzlich der Name ausgegeben. Außerdem<br />
kann mit '''ECMD 1w list with values (ONEWIRE_ECMD_LIST_VALUE_SUPPORT)''' der aktuelle Temperaturwert<br />
mit ausgegeben werden. Dies erspart zusätzliche '''1w get''' Aufrufe, setzt allerding Polling-Support<br />
vorraus.<br />
<br />
1w convert <hexcode><br />
<br />
Veranlasst eine Temperaturmessung des addressierten Sensors, oder, wenn das Argument <hexcode><br />
weggelassen wird, aller angeschlossener Sensoren. Im Polling-Modus wird dieses Kommando ignoriert.<br />
<br />
1w get <hexcode><br />
<br />
Gibt die gemessene Temperatur eines Sensors aus.<br />
<br />
= Einbindung in die [[HTTPD]]-Weboberfläche =<br />
<br />
Unter httpd/embed/ow.ht.m4, bzw httpd/embed/Xow.ht.m4 liegt eine Weboberflaeche, die alle Sensoren erkennt<br />
und ihre aktuelle Temperatur regelmässig per Ajax abfragt und anzeigt. Im Falle von Xow.ht.m4 wird sogar<br />
Graph der Temperatur mittels SVG gemalt. Um die Dateien einzubinden, muss man einfach bei aktiviertem<br />
Onewiresupport den Webserver und das Datei Inlining aktivieren.<br />
<br />
Die Dateien können dann unter ow.ht bzw. unter Xow.ht angezeigt werden. Das Beispiel zeigt die SVG-Version<br />
mit Naming-Support:<br />
<br />
[[File:onewire-svg.png]]<br />
<br />
= Anschluss AVR-NET-IO =<br />
Für das Pollin AVR-NET-IO Board können die Sensoren DS18S20+ , <br />
<br />
normal Betrieb<br />
<br />
[[File:netio-1wire_normal.png]]<br />
<br />
parasitären Modus<br />
<br />
[[File:netio-1wire.png]]<br />
<br />
Anmerkung: Wenn man beim Net-IO nicht alle Analogeingänge benötigt, lässt sich der 1-Wire-Bus auch an der<br />
Schraubklemme ADC1 ganz gut aufschalten. Vorteil ist, dass man gleich alle passenden Spannungen (GND, +5V)<br />
an den beiden nebenliegenden Schraubklemmen hat. Das Pinning muss dann entspechend in der kann in der Datei<br />
pinning/hardware/netio.m4 von PD6 auf PA4 geändert werden. Vorteil dieser Konfiguration ist, dass man den<br />
DB-25-Verbinder zum Anschluss der Relaisplatine K8IO von Pollin frei hat und den EXT Steckverbinder zum<br />
Anschluss eines LCD über ein 4bit-Interface nutzen kann, ohne die Erweiterungsplatine von Pollin zu benötigen.<br />
<br />
Pinbelegung:<br />
<br />
[[File:ds18s20-par-pinout.jpg]]<br />
<br />
= Anschluss Etherrape =<br />
<br />
Die Schaltung je nach parasitärem oder normalem Betriebsmodus kann aus der NetIO Skizze übernommen werden.<br />
Data liegt auf PORTD an Pin 7:<br />
<br />
PORTD<br />
+---+<br />
|x x|<br />
|x X| <- Pin 7<br />
|x x<br />
|x x|<br />
|x x|<br />
+---+<br />
<br />
Direkt neben PORTD befinden sich 2 Pins mit GND und 5V als Beschriftung. <br />
GND kann als GND und 5V als Vcc genutzt werden.<br />
<br />
= Einbindung in [[Control6]] =<br />
<br />
Die Sensoren können mit '''ONEWIRE_GET''' einfach abgefragt werden. Die Funktion führt automatisch ein<br />
''convert'' aus, es sind also keine zwei Schritte erforderlich wie bei dem Zugriff über [[ECMD]].<br />
Die Rückgabe erfolgt (analog der Funktion '''KTY_GET''') in Centigrad, also Temperatur * 10.<br />
Hier vielleicht ein kleines Beispiel, das die Daten per [[SYSLOG]] ausgibt sobald sich die Temperatur<br />
um mehr als ein Grad zur letzten Messung verändert hat.<br />
<br />
<pre><br />
int16_t Temperatur;<br />
int16_t Temperatur_alt;<br />
<br />
CONTROL_START<br />
<br />
THREAD(read_temp)<br />
Temperatur = ONEWIRE_GET(10d85594010800eb);<br />
ON abs(Temperatur-Temperatur_alt)>10 DO<br />
div_t res = div(Temperatur,10);<br />
SYSLOG("temperature changed %d.%d",res.quot,res.rem)<br />
Temperatur_alt = Temperatur;<br />
END<br />
WAIT(15);<br />
THREAD_END(read_temp)<br />
<br />
ON STARTUP DO<br />
Temperatur = Temperatur_alt = 0;<br />
THREAD_START(read_temp);<br />
END<br />
<br />
CONTROL_END<br />
</pre><br />
<br />
= Abfrage per [[SNMP]] =<br />
<br />
Falls Polling-Support aktiviert wurde können die Sensorwerte per SNMP abgefragt werden.<br />
Mit Naming-Support stehen auch die Namen per SNMP zur Verfügung und die Index-Nummern sind<br />
fix auf die Position in der Namenstabelle festgelegt. Dies ist sehr hilfreich, um bestimmte<br />
Sensoren über den SNMP-Index anzusprechen.<br />
<br />
Es gibt folgende OIDs:<br />
<br />
* .1.3.6.1.4.1.2021.13.23.3.1.<idx> : ROM-Code des Sensors<br />
* .1.3.6.1.4.1.2021.13.23.3.2.<idx> : Sensor-Name (nur mit Naming-Support)<br />
* .1.3.6.1.4.1.2021.13.23.3.3.<idx> : Temperaturwert in Centigrad<br />
* .1.3.6.1.4.1.2021.13.23.3.4.<idx> : 0 = Sensor nicht vorhanden, 1 = Sensor vorhanden<br />
<br />
Hier ein Beispiel:<br />
<br />
<pre><br />
# snmpwalk -Osn -c public -v 1 192.168.255.90 1.3.6.1.4.1.2021.13.23.3<br />
.1.3.6.1.4.1.2021.13.23.3.1.0 = STRING: "1080cff6010800f9"<br />
.1.3.6.1.4.1.2021.13.23.3.1.1 = STRING: "10c8cff60108002d"<br />
.1.3.6.1.4.1.2021.13.23.3.1.2 = STRING: "1029f6dc0108002f"<br />
.1.3.6.1.4.1.2021.13.23.3.1.3 = STRING: "10f2d0f60108001c"<br />
.1.3.6.1.4.1.2021.13.23.3.1.4 = STRING: "105a17f70108001d"<br />
.1.3.6.1.4.1.2021.13.23.3.1.5 = STRING: "10b8d8f601080098"<br />
.1.3.6.1.4.1.2021.13.23.3.1.6 = STRING: "104dedf601080057"<br />
.1.3.6.1.4.1.2021.13.23.3.1.7 = STRING: "10011af701080027"<br />
.1.3.6.1.4.1.2021.13.23.3.1.8 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.2021.13.23.3.1.9 = STRING: "0000000000000000"<br />
.1.3.6.1.4.1.2021.13.23.3.2.0 = STRING: "kessel"<br />
.1.3.6.1.4.1.2021.13.23.3.2.1 = STRING: "warmwasser"<br />
.1.3.6.1.4.1.2021.13.23.3.2.2 = STRING: "aussen"<br />
.1.3.6.1.4.1.2021.13.23.3.2.3 = STRING: "speicher"<br />
.1.3.6.1.4.1.2021.13.23.3.2.4 = STRING: "heizung vl"<br />
.1.3.6.1.4.1.2021.13.23.3.2.5 = STRING: "heizung rl"<br />
.1.3.6.1.4.1.2021.13.23.3.2.6 = STRING: "boiler vl"<br />
.1.3.6.1.4.1.2021.13.23.3.2.7 = STRING: "boiler rl"<br />
.1.3.6.1.4.1.2021.13.23.3.2.8 = ""<br />
.1.3.6.1.4.1.2021.13.23.3.2.9 = ""<br />
.1.3.6.1.4.1.2021.13.23.3.3.0 = INTEGER: 334<br />
.1.3.6.1.4.1.2021.13.23.3.3.1 = INTEGER: 467<br />
.1.3.6.1.4.1.2021.13.23.3.3.2 = INTEGER: 127<br />
.1.3.6.1.4.1.2021.13.23.3.3.3 = INTEGER: 185<br />
.1.3.6.1.4.1.2021.13.23.3.3.4 = INTEGER: 318<br />
.1.3.6.1.4.1.2021.13.23.3.3.5 = INTEGER: 269<br />
.1.3.6.1.4.1.2021.13.23.3.3.6 = INTEGER: 366<br />
.1.3.6.1.4.1.2021.13.23.3.3.7 = INTEGER: 291<br />
.1.3.6.1.4.1.2021.13.23.3.3.8 = INTEGER: 0<br />
.1.3.6.1.4.1.2021.13.23.3.3.9 = INTEGER: 0<br />
.1.3.6.1.4.1.2021.13.23.3.4.0 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.1 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.2 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.3 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.4 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.5 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.6 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.7 = INTEGER: 1<br />
.1.3.6.1.4.1.2021.13.23.3.4.8 = INTEGER: 0<br />
.1.3.6.1.4.1.2021.13.23.3.4.9 = INTEGER: 0<br />
</pre><br />
<br />
= Codebeispiele =<br />
<br />
* [[Onewire/Example/PHP (Deutsch) | PHP]]<br />
* [[Onewire/Example/Perl (Deutsch) | Perl]]<br />
* [[Onewire/Example/Python | Python]]<br />
* [[Onewire/Example/Shell | sh/bash]]<br />
<br />
[[Category:Ethersex]]<br />
[[Category:StepByStep]]<br />
[[Category:Onewire]]<br />
<br />
= Bezugsquellen =<br />
* Laut Michael Schultz (k1w1) hat er immer DS1820 auf Lager und kann sie sehr günstig weiterverkaufen. Auch Mindermengen. Mail: ethersex [AT] keyb [DOT] de</div>Mguehttp://www.ethersex.de/index.php?title=Onewire/Example/Shell_(Deutsch)&diff=502Onewire/Example/Shell (Deutsch)2012-04-15T23:13:58Z<p>Mgue: taken from Onewire</p>
<hr />
<div>{{i18n|Onewire/Example/Shell}}<br />
<br />
Einfaches SH (Linux Shell) Script von stesie (irc) zum Auslesen von einem Wert<br />
(udp support muss enabled sein oder option -u nicht verwenden!)<br />
<br />
<source lang="bash"><br />
#! /bin/sh<br />
SENSORID=10529f7001080016<br />
#ESEXIP=2001:6f8:1209:23:42::17 #IPv6 Adresse<br />
ESEXIP=192.168.255.90<br />
<br />
#IPv6<br />
#echo 1w convert $SENSORID | nc6 -u $ESEXIP 2701 -q 1 2>/dev/null | grep -qe OK || exit 1 <br />
#echo 1w get $SENSORID | nc6 -u $ESEXIP 2701 -q 1 2>/dev/null | sed -e 's/Temperatur: //' <br />
<br />
#IPv4<br />
echo 1w convert $SENSORID | nc -u $ESEXIP 2701 -q 1 2>/dev/null | grep -qe OK || exit 1<br />
echo 1w get $SENSORID | nc -u $ESEXIP 2701 -q 1 2>/dev/null | sed -e 's/Temperatur: //'<br />
</source><br />
<br />
bash Script von Tron12 zum Auslesen aller Werte<br />
(Achtung Port 2701 ist nicht standard!! Sowie udp support muss enabled sein oder option -u nicht verwenden!)<br />
<br />
<source lang="bash"><br />
#! /bin/sh<br />
#<br />
# netcat-openbsd 1.89-3ubuntu2<br />
<br />
NETIOIP="-4 192.168.178.249"<br />
<br />
#für IPv6:<br />
#NETIOIP="-6 2001:6f8:1209:23:42::17"<br />
<br />
NETIOPORT="2702"<br />
<br />
N_DATE=`echo date | nc -u $NETIOIP $NETIOPORT -q 1 ` <br />
N_GET_ID=`echo 1w list | nc -u $NETIOIP $NETIOPORT -q 1 | grep -qe OK || exit 1`<br />
<br />
echo "Date: $N_DATE"<br />
echo "---------------------------------"<br />
<br />
for i in $N_GET_ID<br />
do<br />
tmp=`echo 1w convert $i | nc -u $NETIOIP $NETIOPORT -q 1 2>/dev/null | grep -qe OK || exit 1`<br />
tmp=`echo 1w get $i | nc -u $NETIOIP $NETIOPORT -q 1 2>/dev/null `<br />
echo "Sensor: $i :: $tmp"<br />
done<br />
</source></div>Mguehttp://www.ethersex.de/index.php?title=I2C_(Deutsch)&diff=480I2C (Deutsch)2012-04-07T16:41:16Z<p>Mgue: link to i2c slav example fixed</p>
<hr />
<div>{{i18n|I2C}}<br />
Der I2C-Bus (Inter Integrated Circuit) ist ein einfacher Zweidraht-Bus, der für die Kommunikation zwischen ICs innerhalb eines größeren Systems verwendet wird. Insbesondere bietet er sich an zur Kommunikation zwischen Microcontrollern und Peripheriegeräten.<br />
<br />
Das [[Ethersex]]-System kann sowohl als Master als auch als Slave in einem I2C-Bus arbeiten.<br />
<br />
In der Atmel-Dokumentation wird I2C als TWI (Two Wire Interface) geführt.<br />
<br />
==Master Mode==<br />
<br />
Im Master-Mode kann das Ethersex-System auf angeschlossene I2C-Slaves zugreifen. Unterstützt werden im Moment:<br />
<br />
* 24cXX EEPROMs (Als Storage Backend für das Virtuelle Dateisystem)<br />
* LM75 Temperatursensoren<br />
* PCA9531 8 bit LED Dimmer<br />
* PCF8574x Port Extension<br />
<br />
==Slave Mode==<br />
<br />
* Kann per I2C auf die [[ECMD (Deutsch) | ECMD ]] Schnittstelle zugegriffen werden.<br />
* In menuconfig -> Protocols -> ECMD -> I2C aktivieren<br />
<br />
[[I2C/Slave Example (Deutsch) | Beispielimplementierung]] mit Ethersex (Slave) und einem zweiten AVR (Master).<br />
<br />
==Anschluss==<br />
<br />
Die Leitungen SCL (Clock) und SDA (Data) liegen als "Alternate Function" auf I/O Leitungen der Controller. Beim ATmega32 sind dies PC0 (SCL) und PC1 (SDA).<br />
<br />
===Etherrape===<br />
<br />
Beim [[Etherrape]] ist der I2C-Bus auf einem separaten Steckverbinder herausgeführt.<br />
<br />
===Pollin AVR-NET-IO===<br />
<br />
Beim Pollin [[AVR-NET-IO]] liegen die Leitungen des Ports C auf J3, dem 25poligen SUB-D Steckverbinder. Dort lassen sich auch Versorgungsspannung und Masse für die angeschlossenen Slaves abgreifen:<br />
<br />
{|class=wikitable<br />
!Pin<br />
!Funktion<br />
|-<br />
|2<br />
|PC0 (SCL)<br />
|-<br />
|3<br />
|PC1 (SDA)<br />
|-<br />
|15<br />
|5V<br />
|-<br />
|18<br />
|GND<br />
|}<br />
<br />
==Konfiguration==<br />
<br />
Die Leitungen sind fest vorgegeben, daher muss keine Konfiguration des Pinnings erfolgen.<br />
<br />
Die Einstellungen für den Master-Mode finden sich unter "I/O support", "I2C Master Support".<br />
<br />
== ECMD ==<br />
<br />
= I2C = <br />
<br />
Mittels "i2c detect" werden die gefundenen I2C Adressen aufgelistet<br />
<br />
i2c detect<br />
detected at: 0x20 (32)<br />
detected at: 0x48 (72)<br />
detected at: 0x60 (96)<br />
<br />
Mit den allgemeinen I2C-Kommandos können alle I2C-Chips angesprochen werden. Mit dem Befehl<br />
<br />
i2c wbb 72 81<br />
<br />
wird z. B. die Temperatur-Konvertierung auf einem DS1631 gestartet. Geschrieben wird ein Byte mit dem Wert 81 an den Chip mit der Adresse 72.<br />
<br />
Mit dem Befehl <br />
<br />
i2c rwd 72 170<br />
<br />
wird ein Word von der Adresse 170 des Chips mit der Adresse 72 gelesen. Damit wird die Temperatur des DS1631 ausgelesen. Die Umrechung muß man dann per Hand durchführen.<br />
<br />
= LM75 =<br />
<br />
Um den LM75 Temperatursensor auszulesen (Basisadresse 0x48) muss die IC Adresse angegeben werden. In diesem Falle ist das "0" weil die IC Adresse a0 bis a2 auf Masse gesetzt werden. -> binär 000 = 0<br />
<br />
lm75 0<br />
21.5<br />
<br />
= DS1631 =<br />
<br />
Ein DS1631 Temperatursensor muß nach dem Einschalten der Stromversorgung erst aktiviert werden. Der erste DS1631 mit der Adresse 0x48 hat im Befehl die Adresse 0. Mit dem folgenden Befehl wird die Temperatur-Konvertierung eingeschaltet:<br />
<br />
ds1631 convert 0 1<br />
<br />
Jetzt kann die Temperatur ausgelesen werden. Die Genauigkeit beträgt immer die vollen 12bits. <br />
<br />
ds1631 temp 0<br />
22.875<br />
<br />
Wahrscheinlich können auch DS1621-Sensoren ausgelesen werden, das wurde aber noch nicht getestet!<br />
<br />
= PCF8574 =<br />
<br />
Für die Porterweiterung gilt das Schema "pcf8574x read adresse chip" wobei die adresse 0-7 sein kann, und chip "0" oder "1", je nachdem ob man den pcf8574 oder den pcf8574A benutzt.<br />
<br />
pcf8574x read 0 0<br />
FFFF<br />
<br />
Schalten von Ausgängen mit Wert 0xF0 am PCF8574 mit Adresse 5 (Das bedeutet das a0=1 und a2=1 ist, ergo 101)<br />
d.h. die ersten 4 Ausgänge werden auf "1" die anderen 4 Ausgänge auf "0" gesetzt.<br />
pcf8574x set 5 0 F0<br />
<br />
[[Category:Ethersex]]<br />
[[Category:StepByStep]]<br />
[[Category:I2C]]<br />
[[Category:ECMD]]</div>Mguehttp://www.ethersex.de/index.php?title=I2C/Slave_Example&diff=479I2C/Slave Example2012-04-07T16:38:50Z<p>Mgue: header</p>
<hr />
<div>{{i18n|I2C/Slave Example}}</div>Mguehttp://www.ethersex.de/index.php?title=I2C/Slave_Example_(Deutsch)&diff=477I2C/Slave Example (Deutsch)2012-04-07T16:36:45Z<p>Mgue: moved I2C/Slave Example to I2C/Slave Example (Deutsch):&#32;german version</p>
<hr />
<div>{{i18n|I2C/Slave Example}}<br />
In diesem Beispiel wird gezeigt wie man eine TWI Verbindung zwischen Ethersex und einem zweiten AVR herstellen kann.<br/><br />
== Konfiguration ==<br />
Zuerst muss Ethersex konfiguriert werden.<br/> <br />
<br />
Menuconfig -> Protocols -> ECMD -> I2C aktivieren<br />
<br />
Die Standardadresse ist 8 und die Pufferlänge 50<br/><br />
<br />
In diesem Beispiel wird die TWI Lib von [http://jump.to/fleury P. Fleury] verwendet.<br/><br />
<br />
== Definition ==<br />
Zuerst Definieren wir die Adresse für Lesen und Schreiben <br />
<source lang=c><br />
#define E6WR (0x8 << 1) | I2C_WRITE<br />
#define E6RD (0x8 << 1) | I2C_READ<br />
</source><br />
== Befehl senden ==<br />
Danach benötigen wir einen Puffer für die Ausgelesenen Daten<br />
Z.B.<br />
<source lang=c><br />
#define E6BUFLEN 50<br />
char E6_data[E6BUFLEN];<br />
<br />
</source><br />
Nun senden wir einen ECMD Befehl:<br />
<source lang=c><br />
if(!(i2c_start( E6WR ))) //Slave bereit zum schreiben?<br />
{<br />
i2c_write('i');<br />
i2c_write('p');<br />
i2c_write('\0'); //Befehl muss 0 Terminiert werden!<br />
}<br />
</source><br />
== Daten Empfangen ==<br />
<br />
Ethersex empfängt nun den Befehl und Wertet ihn automatisch aus. Jetzt müssen wir nur mehr das Ergebnis auslesen:<br />
<source lang=c><br />
if(!(i2c_rep_start( E6RD ))) //Slave bereit zum lesen?<br />
{<br />
for(n=0;n<E6BUFLEN;n++)<br />
{<br />
E6_data[n] = i2c_readAck();<br />
if(E6_data[n] == '\0')<br />
break;<br />
if(E6_data [n] == '\n')<br />
{<br />
E6_data[n+1] = '\0';<br />
break;<br />
}<br />
} <br />
i2c_readNak(); <br />
i2c_stop();<br />
}<br />
</source><br />
Nun haben wir die IP Adresse im E6_data Array stehen.</div>Mguehttp://www.ethersex.de/index.php?title=I2C/Slave_Example&diff=478I2C/Slave Example2012-04-07T16:36:45Z<p>Mgue: moved I2C/Slave Example to I2C/Slave Example (Deutsch):&#32;german version</p>
<hr />
<div>#REDIRECT [[I2C/Slave Example (Deutsch)]]</div>Mguehttp://www.ethersex.de/index.php?title=I2C/Slave_Example_(Deutsch)&diff=475I2C/Slave Example (Deutsch)2012-04-07T16:34:58Z<p>Mgue: moved Beispiel to I2C/Slave Example:&#32;Beispiel is a bit too general</p>
<hr />
<div>{{i18n|I2C/Slave Example}}<br />
In diesem Beispiel wird gezeigt wie man eine TWI Verbindung zwischen Ethersex und einem zweiten AVR herstellen kann.<br/><br />
== Konfiguration ==<br />
Zuerst muss Ethersex konfiguriert werden.<br/> <br />
<br />
Menuconfig -> Protocols -> ECMD -> I2C aktivieren<br />
<br />
Die Standardadresse ist 8 und die Pufferlänge 50<br/><br />
<br />
In diesem Beispiel wird die TWI Lib von [http://jump.to/fleury P. Fleury] verwendet.<br/><br />
<br />
== Definition ==<br />
Zuerst Definieren wir die Adresse für Lesen und Schreiben <br />
<source lang=c><br />
#define E6WR (0x8 << 1) | I2C_WRITE<br />
#define E6RD (0x8 << 1) | I2C_READ<br />
</source><br />
== Befehl senden ==<br />
Danach benötigen wir einen Puffer für die Ausgelesenen Daten<br />
Z.B.<br />
<source lang=c><br />
#define E6BUFLEN 50<br />
char E6_data[E6BUFLEN];<br />
<br />
</source><br />
Nun senden wir einen ECMD Befehl:<br />
<source lang=c><br />
if(!(i2c_start( E6WR ))) //Slave bereit zum schreiben?<br />
{<br />
i2c_write('i');<br />
i2c_write('p');<br />
i2c_write('\0'); //Befehl muss 0 Terminiert werden!<br />
}<br />
</source><br />
== Daten Empfangen ==<br />
<br />
Ethersex empfängt nun den Befehl und Wertet ihn automatisch aus. Jetzt müssen wir nur mehr das Ergebnis auslesen:<br />
<source lang=c><br />
if(!(i2c_rep_start( E6RD ))) //Slave bereit zum lesen?<br />
{<br />
for(n=0;n<E6BUFLEN;n++)<br />
{<br />
E6_data[n] = i2c_readAck();<br />
if(E6_data[n] == '\0')<br />
break;<br />
if(E6_data [n] == '\n')<br />
{<br />
E6_data[n+1] = '\0';<br />
break;<br />
}<br />
} <br />
i2c_readNak(); <br />
i2c_stop();<br />
}<br />
</source><br />
Nun haben wir die IP Adresse im E6_data Array stehen.</div>Mguehttp://www.ethersex.de/index.php?title=Beispiel&diff=476Beispiel2012-04-07T16:34:58Z<p>Mgue: moved Beispiel to I2C/Slave Example:&#32;Beispiel is a bit too general</p>
<hr />
<div>#REDIRECT [[I2C/Slave Example]]</div>Mguehttp://www.ethersex.de/index.php?title=I2C/Slave_Example_(Deutsch)&diff=474I2C/Slave Example (Deutsch)2012-04-07T16:34:38Z<p>Mgue: format</p>
<hr />
<div>{{i18n|I2C/Slave Example}}<br />
In diesem Beispiel wird gezeigt wie man eine TWI Verbindung zwischen Ethersex und einem zweiten AVR herstellen kann.<br/><br />
== Konfiguration ==<br />
Zuerst muss Ethersex konfiguriert werden.<br/> <br />
<br />
Menuconfig -> Protocols -> ECMD -> I2C aktivieren<br />
<br />
Die Standardadresse ist 8 und die Pufferlänge 50<br/><br />
<br />
In diesem Beispiel wird die TWI Lib von [http://jump.to/fleury P. Fleury] verwendet.<br/><br />
<br />
== Definition ==<br />
Zuerst Definieren wir die Adresse für Lesen und Schreiben <br />
<source lang=c><br />
#define E6WR (0x8 << 1) | I2C_WRITE<br />
#define E6RD (0x8 << 1) | I2C_READ<br />
</source><br />
== Befehl senden ==<br />
Danach benötigen wir einen Puffer für die Ausgelesenen Daten<br />
Z.B.<br />
<source lang=c><br />
#define E6BUFLEN 50<br />
char E6_data[E6BUFLEN];<br />
<br />
</source><br />
Nun senden wir einen ECMD Befehl:<br />
<source lang=c><br />
if(!(i2c_start( E6WR ))) //Slave bereit zum schreiben?<br />
{<br />
i2c_write('i');<br />
i2c_write('p');<br />
i2c_write('\0'); //Befehl muss 0 Terminiert werden!<br />
}<br />
</source><br />
== Daten Empfangen ==<br />
<br />
Ethersex empfängt nun den Befehl und Wertet ihn automatisch aus. Jetzt müssen wir nur mehr das Ergebnis auslesen:<br />
<source lang=c><br />
if(!(i2c_rep_start( E6RD ))) //Slave bereit zum lesen?<br />
{<br />
for(n=0;n<E6BUFLEN;n++)<br />
{<br />
E6_data[n] = i2c_readAck();<br />
if(E6_data[n] == '\0')<br />
break;<br />
if(E6_data [n] == '\n')<br />
{<br />
E6_data[n+1] = '\0';<br />
break;<br />
}<br />
} <br />
i2c_readNak(); <br />
i2c_stop();<br />
}<br />
</source><br />
Nun haben wir die IP Adresse im E6_data Array stehen.</div>Mguehttp://www.ethersex.de/index.php?title=ECMD_(Deutsch)&diff=473ECMD (Deutsch)2012-04-07T16:32:36Z<p>Mgue: /* ECMD Geschwindigkeit */</p>
<hr />
<div>{{i18n|ECMD}}<br />
{{Module<br />
|NAME=ECMD<br />
|MENUCONFIG={{Protocols}}->ECMD (Etherrape Command Interface) support<br />
|STATUS={{stable}}<br />
|PINNING=no<br />
|ECMD={{has_ecmd}}<br />
|DEPENDS=<br />
|REQUIRES=<br />
|CODE=[https://github.com/ethersex/ethersex/tree/master/protocols/ecmd https://github.com/ethersex/ethersex/tree/master/protocols/ecmd]<br />
}}<br />
<br />
= Was ist ECMD? =<br />
ECMD steht für '''Ethersex Command'''. ECMD ist ein einfaches, textbasiertes Protokoll mit dem mit einem Ethersex-System kommuniziert werden kann. Neben der Konfiguration des Ethersex Systems können auch die Hardware Schnittstellen angesprochen werden. Viele Module bieten ebenfalls ecmd Unterstützung an. Einen Überblick über die implementieren Befehle gibt die [[ECMD Reference]].<br />
<br />
= ECMD Schnittstellen =<br />
Unter [[ECMD Protocols|ECMD Protokolle]] kannst du nachlesen, wie dein ethersex mit ECMD angesprochen werden kann. Wenn du dein ethersex über Shell Scripte oder eigene Programme ansprechen möchtest, empfiehlt sich evtl. die libecmd (geschrieben in C) im contrib Ordner, welche alle [[ECMD Protocols|ECMD Protokolle]] beherrscht.<br />
<br />
= Eigenen ECMD Befehl erstellen =<br />
== Vorbereitung ==<br />
# Wechsel in den Ordner des Moduls, welches ein neues ECMD bekommen soll.<br />
# Erstelle eine Datei <tt>[modulname]_ecmd.c</tt><br />
# Füge <tt>#include "protocols/ecmd/ecmd-base.h</tt> ein<br />
<br />
== Funktionen ==<br />
Baue nun Funktionen mit einer Signatur wie die folgende Funktion hat:<br />
<pre><br />
int16_t parse_cmd_FUNCTIONSNAME (char *cmd, char *output, uint16_t len)<br />
{<br />
zu_was();<br />
return ECMD_FINAL_OK;<br />
}<br />
</pre><br />
ECMD_FINAL_OK bedeutet hier, das der Aufruf ein Erfolg war. Hierrauf wird im http Interface beispielsweise ein OK zurückgegeben.<br />
Wenn etwas schief läuft oder die Argumentanzahl falsch ist, dann kannst du ECMD_ERR_PARSE_ERROR zurückgeben. Wie läuft das eigentlich mit den ecmd Argumenten für dein neues Kommando? Hier siehst du ein kleines Beispiel um 3 Zahlen als Argumente entgegen zunehmen:<br />
<pre><br />
int16_t parse_cmd_FUNCTIONSNAME2 (char *cmd, char *output, uint16_t len)<br />
{<br />
uint8_t val1=0;<br />
uint8_t val2=0;<br />
uint8_t val3 = 0;<br />
ret = sscanf_P(cmd, PSTR("%hhu %hhu %hhu"), &val1, &val2, &val3);<br />
if (ret == 3)<br />
return ECMD_FINAL_OK;<br />
else<br />
return ECMD_ERR_PARSE_ERROR;<br />
}<br />
</pre><br />
Möchtest du auch andere Dinge als OK und PARSE ERROR zurückgeben können, nimmst du folgenden Code:<br />
<pre><br />
return ECMD_FINAL(snprintf_P(output, len, PSTR("%u"), uint_value));<br />
</pre> <br />
Hier wurde ein unsigned int zurückgegeben.<br />
<br />
== Bekanntmachen ==<br />
Nun musst du deine Funktion noch dem Rest der Firmware bekannt machen. Füge daher ganz unten in der Datei<br />
folgendes ein:<br />
<br />
<pre><br />
/*<br />
-- Ethersex META --<br />
block(Cooles Modul)<br />
ecmd_feature(FUNCTIONSNAME, "NEW ECMD COMMAND",, DESCRIPTION)<br />
ecmd_feature(FUNCTIONSNAME2, "NEW ECMD COMMAND2",VAL1 VAL2 VAL3, DESCRIPTION)<br />
*/<br />
</pre><br />
<br />
== Makefile erweitern ==<br />
Läuft analog zu normalen anderen Quellcode Dateien.<br />
<br />
= ECMD Geschwindigkeit =<br />
<br />
Eine Untersuchung zur Geschwindigkeit verschiedener Anbindungen und Konfigurationen ist unter [[ECMD Geschwindigkeit]] zu finden.</div>Mguehttp://www.ethersex.de/index.php?title=Quick_Start_Guide/Preparation&diff=429Quick Start Guide/Preparation2012-04-02T10:50:41Z<p>Mgue: binutils 2.22 bug</p>
<hr />
<div>{{i18n|Quick Start Guide/Preparation}}<br />
<br />
= Requirements =<br />
<br />
* AVR GCC-Compiler (Version 4.1 or higher)<br />
* AVR LIBC (Version 1.6.8, for 128er ATMegas 1.7)<br />
* GNU-Tools (Bash, Make, m4, awk)<br />
* AVR-Programmer (e.g. avrdude)<br />
<br />
'''Attention:''' binutils ''2.22'' has a bug that causes the compilation of ethersex to fail. Install version 2.21 until [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52692 GCC 4.7.1 has been released].<br />
<br />
== Linux Debian / Ubuntu ==<br />
<br />
apt-get install gcc-avr avr-libc binutils-avr m4 gawk libncurses5-dev make dialog git-core avrdude <br />
<br />
== Arch Linux ==<br />
<br />
pacman -Sy m4 avr-binutils avr-libc avrdude avr-gcc git gawk ncurses make perl<br />
<br />
== Mac OSX ==<br />
<br />
<br />
Using MacPorts (www.macports.org)<br />
Apple Bash and sed doesn't work, you need to install Bash V4.0 and GNU sed.<br />
First, sync the Port Repository to ensure that you´ll build the latest versions of the requirements.<br />
<br />
port selfupgrade<br />
<br />
port install git-core avrdude avr-binutils avr-gcc avr-libc bash sed<br />
<br />
<br />
You can also use the CrossPack, but MacPorts is more straightforward and updated.<br />
[http://www.obdev.at/products/crosspack/index-de.html]<br />
<br />
If the MacPort versions of avr-gcc or avrdude are too old. Here is a instuction how to build the toolchain manually: [http://www.heise.de/ct/projekte/machmit/ctbot/wiki/AVRToolchain]<br />
<br />
= Download the Source from GitHub =<br />
<br />
You can download Ethersex from github via git protocol<br />
<br />
git clone git://github.com/ethersex/ethersex.git<br />
<br />
or via http<br />
<br />
git clone http://github.com/ethersex/ethersex.git<br />
<br />
Updating a local version of ethersex is possible with:<br />
<br />
git pull origin<br />
<br />
[[Quick_Start_Guide/Configuration | next step]]</div>Mguehttp://www.ethersex.de/index.php?title=Template:Documentation_(Deutsch)&diff=428Template:Documentation (Deutsch)2012-04-02T00:12:59Z<p>Mgue: no colspan here</p>
<hr />
<div><noinclude>{{i18n|Template:Documentation}}</noinclude><br />
<br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#EEEEEE; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #FFFFFF; text-align: center; border-bottom:1px solid #aaaaaa;" | '''Dokumentation'''<br />
|-<br />
|<br />
[[Wiki Guidelines (Deutsch)|Wiki Richtlinien]]<br />
----<br />
* [[:Category:Hardware|Hardware Treiber]]<br />
* [[:Category:Protocol|Protokoll Support]]<br />
* [[:Category:Application|Dienste und Applikationen]]<br />
* [[ECMD Reference|ECMD Befehlssatz]]<br />
<br />
|}</div>Mguehttp://www.ethersex.de/index.php?title=Template:Facts_(Deutsch)&diff=427Template:Facts (Deutsch)2012-04-02T00:12:28Z<p>Mgue: no colspan here</p>
<hr />
<div><noinclude>{{i18n|Template:Facts}}</noinclude><br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#EEEEEE; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
| style="background-color: #FFFFFF; text-align: center; border-bottom:1px solid #aaaaaa;" | '''Überblick'''<br />
|-<br />
|Ethersex eine Firmware mit Netzwerkunterstützung für 8-bit AVR Mikrokontroller, die durch eine Community entwickelt wird.<br />
{|cellpadding="4" cellspacing="0" style="margin-top:5px; background:#EEEEEE; border:1px #aaa solid; font-size:95%; color:black; width:100%;"<br />
|-<br />
!style="width:50%" | Features<br />
!style="width:50%" | Unterstützte Boards<br />
|-<br />
|<br />
* unterstützt Atmega 8,16,32,64,128,644 und viele mehr<br />
* nutzt den Ethernet-Controller '''ENC28J60'''<br />
* leicht anzupassen und zu erweitern um deine Anforderungen zu erfüllen<br />
<br />
Protokolle:<br />
* TCP/IP IPv4/'''IPv6'''<br />
* OpenVPN<br />
* Software USB stack<br />
* RFM12 / RFM12B (433 MHz / 868 MHz)<br />
* '''i²c''' Master (Untersützung zahlreicher Chips) / Slave<br />
* onewire<br />
* http server<br />
* kann mit dem '''Ethersex Command Protocol (ECMD)''' ferngesteuert werden<br />
<br />
* [[Features (Deutsch)|und viele mehr]]<br />
|<br />
* NetIO (Pollin)<br />
* Etherrape (lochraster.org)<br />
* AVR Module (Ulrich Radig)<br />
* Jackalope (lochraster.org)<br />
* Probot (Conrad)<br />
* Fimser (OV Lennestadt)<br />
* JeeLink v2 (JeeLabs)<br />
* Funk-AVR-Evaluationsboard (Pollin)<br />
* TODO: Custom Board<br />
* [[Supported Boards (Deutsch)|und viele mehr]]<br />
<br />
|}<br />
|}</div>Mgue