Ecmd Reference

Aus Ethersex_Wiki
Version vom 30. Mai 2009, 10:42 Uhr von LadySM (Diskussion) (Importing text file)
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 patches for those files!

Network configuration

Command syntax Short description
mac [XX:XX:XX:XX:XX:XX] Display/Set the MAC address.
ip [IP] Display/Set the IP address.
netmask [IP] Display/Set the network mask.
gw [IP] Display/Set the address of the default router.
ipstats Display IP statistics.
free Display free space.

Resetting the controller

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

Stella commands

Command syntax Short description
stella store Store values in eeprom
stella load Load values from eeprom
stella cron CHANNEL VALUE MINUTE HOUR DAY MONTH DAYOFWEEK Add a cronjob for stella to set the CHANNEL to VALUE. You may use fade channel constants.
channels Return stella channel size
moodlight get CHANNEL Return on if channel CHANNEL is moodlighted
moodlight set CHANNEL ONOFF Set CHANNEL moodlight on=1 or off=0
stella fadestep set FADESTEP Set stella fade step
stella fadestep get Get stella fade step
channel set CHANNEL VALUE FUNCTION Set stella channel to value. The third parameter is optional. You may use 's' for instant set
channel get CHANNEL Get stella channel value

Cron commands

Command syntax Short description
cron_list Show all cron entries
cron_rm POSITION Remove one cron entry

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

Command syntax Short description
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 Pins

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 temperature conversion of either DEVICE or all connected devices

DNS Client

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

NTP Client/Server

Command syntax Short description
ntp query Query the NTP server to get an NTP update.
ntp server [IPADDR] Display/Set the IP address of the NTP server to use to IPADDR.

Clock

Command syntax Short description
time Display the current time in seconds since January 1st 1970.
date Display the current date.

Analog/Digital Conversion (ADC)

Command syntax Short description
adc get [CHANNEL] Get the ADC value in hex of CHANNEL or if no 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

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

Command syntax Short description
pwm melody Play melody
pwm wav Play wav
pwm stop Stop wav

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

MCUF

Command syntax Short description
mcuf modul list List all modules

Miscelleanous

Command syntax Short description
d ADDR Dump the memory at ADDR (16 bytes).
help List which commands are available.
version Display the version number.
whm Display the uptime.
eeprom reinit Force reinitialization of the EEPROM config area