Ecmd Reference

Aus Ethersex_Wiki
Wechseln zu: Navigation, Suche

This page is automatically generated from ecmd_defs.m4 and wiki.m4 which are part of the Ethersex source code repository. Do not edit this page but send pages for those files!

Network configuration

Command syntax Short description
mac xx:xx:xx:xx:xx:xx Set the MAC address.
show mac Display the MAC address.
show ip Display the IP address.
show netmask Display the network mask.
show gw Display the IP address of the default router.
show version Display the version number.
ip IP Set the IP address.
netmask IP Set the network mask.
gw IP Set the address of the default router.

Resetting the controller

Command syntax Short description
reset Reset the Ethersex.
wdreset Go into endless loop to trigger a watchdog timeout.

Stella commands

Command syntax Short description
stella store Store values in eeprom
stella load Load values from eeprom
channels CHANNELS Return stella channel size
stella version STELLAVERSION Get stella protocol version
stella fadestep set FADESTEP Set stella fade step
stella fadestep get Get stella fade step
channel set CHANNEL VALUE Set stella channel value
channel get CHANNEL Get stella channel value
bootloader Call the bootloader.

Port I/O

Command syntax Short description
io set ddr PORTNUM HEXVALUE [MASK] Set the DDR of port PORTNUM to VALUE (possibly using the provided MASK).
io get ddr PORTNUM Display the current value of the DDR PORTNUM.
io set port NUM HEXVALUE [MASK] Set the PORT NUM to VALUE (possibly using the provided MASK).
io get port NUM Display the current value of the PORT NUM.
io get pin PORTNUM Display the current value of the PIN-register of the port PORTNUM.
io get mask PORTNUM Display the mask of the port PORTNUM.
c6 get VARNAME Display the current value of the ECMD_GLOBAL Variable
c6 set VARNAME VALUE Set an new value on the ECMD_GLOBAL Variable

Named Pin

Command syntax Short description
pin get NAME Read and display the status of pin NAME.
pin set NAME STATUS Set the status of pin NAME to STATUS.
pin toggle NAME Toggle the status of pin NAME.

HD44780 LCD Display

Command syntax Short description
lcd clear [LINE] Clear line LINE (0..3) or the whole display (if parameter is omitted)
lcd write TEXT Write TEXT to the current cursor location
lcd goto LINE COL Move cursor to LINE and column COL (origin is 0/0)
lcd char N D1 D2 D3 D4 D5 D6 D7 D8 Define use-definable char N with data D1..D8 (provide DATA in hex)
lcd init CURSOR BLINK Reinitialize the display
lcd shift DIR Shift the display to DIR (either left or right)

Dallas 1-wire

Command syntax Short description
1w list Return a list of the connected onewire devices
1w get DEVICE Return temperature value of onewire DEVICE (provide 64-bit ID as 16-hex-digits)
1w convert [DEVICE] Trigger temperatur conversion of either DEVICE or all connected devices

DNS

Command syntax Short description
nslookup HOSTNAME Do DNS lookup for HOSTNAME (call twice).
show dns Display the IP address of the configured DNS server.
dns IPADDR Set the IP address of the DNS server to use to IPADDR.

SYSLOG

Command syntax Short description
syslog STRING Send string to syslog server.
show syslog Display the IP address of the configured SYSLOG server.

Clock

Command syntax Short description
time Display the current time.
date Display the current date.
whm Display the uptime.

ADC

Command syntax Short description
adc get [CHANNEL] Get the ADC Value in HEX of CHANNEL or if noch channel set of all channels.

KTY

Command syntax Short description
kty get [CHANNEL] Get the temperature in xxx.x °C of CHANNEL or if noch channel set of all channels.
kty cal get Return the calibration difference to 2k2 Resistor.
kty autocalibrate CHANNEL Calibrate to 1000 Ohm precision Resistor.

Dataflash

Command syntax Short description
df status Display internal status.
fs format Format the filesystem.
fs list List the directory.
fs mkfile NAME Create a new file NAME.
fs remove NAME Delete the file NAME.
fs truncate NAME LEN Truncate the file NAME to LEN bytes.
fs inspect node NODE Inspect NODE and dump to serial.
fs inspect inode INODE Inspect INODE (and associated page).

SD/MMC Card Reader

Command syntax Short description
sd dir List contents of current SD directory.

RFM12

Command syntax Short description
rfm12 status Display internal status.
rfm12 setbaud BAUD Set baudrate to BAUD.
rfm12 setbandwidth BW Set RX bandwidth to BW.
rfm12 setmod MOD Set modulation to MOD.
rfm12 setgain GAIN Set preamplifier gain to GAIN.
rfm12 setdrssi DRSSI Set the drssi to DRSSI.
rfm12 tevion housecode command delay cnt
rfm12 2272 housecodeCommand delay cnt
rfm12 external filter Toggel receiver

Miscelleanous

Command syntax Short description
d ADDR Dump the memory at ADDR (16 bytes).
help List which commands are available.

DC3840 Handycam support

Command syntax Short description
dc3840 capture Make a picture
dc3840 send A B C D E Send provided command bytes to the camera.
dc3840 sync Re-sync to the camera
pwm start pwm

I2C (TWI)

Command syntax Short description
i2c detect list detected I2C Chips
lm75 ADDR Get temperature
pca9531 ADDR PERIODPWM1 DUTYPWM1 PERIODPWM2 DUTYPWM2 LED0..3 LED4..7 set PWM1 and PWM2 and LED states
pcf8574x read ADDR CHIP Get bits
pcf8574x set ADDR CHIP HEXVALUE Set bits
eeprom reinit Force reinitialization of the EEPROM config area

FS20 Befehl

Command syntax Short description
fs20 send Hauscode Adresse 0x00 turn off
fs20 send Hauscode Adresse 0x01 an, 6,25% Einschalten auf Helligkeitsstufe 1 (min.)
fs20 send Hauscode Adresse 0x02 an, 12,5% Einschalten auf Helligkeitsstufe 2
fs20 send Hauscode Adresse 0x0f an, 93,75% Einschalten auf Helligkeitsstufe 15
fs20 send Hauscode Adresse 0x10 an, 100% Einschalten auf Helligkeitsstufe 16 (max)
fs20 send Hauscode Adresse 0x11 an, alter Wert Auf letztem Helligkeitswert einschalten
fs20 send Hauscode Adresse 0x12 toggle Wechsel zwischen “aus” und “an, alter Wert“
fs20 send Hauscode Adresse 0x13 dim up Eine Helligkeitsstufe heller
fs20 send Hauscode Adresse 0x14 tdim down Eine Helligkeitsstufe dunkler
fs20 send Hauscode Adresse 0x15 dim up and down ..., + bis max, kurz warten, - bis min, kurz warten,
fs20 send Hauscode Adresse 0x16 timeset Timerprogrammierung (Start, Ende)
fs20 send Hauscode Adresse 0x17 send status Nur bei bidirektionalen Komponenten!
fs20 send Hauscode Adresse 0x18 aus, für Timerzeit
fs20 send Hauscode Adresse 0x19 an, 100%, für Timerzeit
fs20 send Hauscode Adresse 0x1A an, alter Wert, für Timerzeit
fs20 send Hauscode Adresse 0x1B reset (auf Auslieferzustand)

FS20 CODE

CODE' BERECHNUNG'
HAUSCODE Hauscode (12341234) Von allen Ziffern "1" abziehen (01230123) -> BC (obase=16,ibas=4) 0x1B1B
ADRESSE ADRESSEGRUPPE/Unteradresse (2222 ) Von allen Ziffern "1" abziehen (1111) -> BC (obase=16,ibas=4) 0x55
Lokaler Master (Adresse) ADRESSEGRUPPE/Unteradresse (2244 ) Von allen Ziffern "1" abziehen (1133) -> BC (obase=16,ibas=4) 0x5F
Globaler Master (Adresse) ADRESSEGRUPPE/Unteradresse (4444 ) Von allen Ziffern "1" abziehen (3333) -> BC (obase=16,ibas=4) 0xFF

Other Information

See ECMD Protocols on how ECMD can be called from various protocols.