Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

ETH

Description

This command sets the Ethernet address of the ENC28J60 chip. ETH requires a single argument which is the new Ethernet address of the ENC28J60. The argument must a 12-digits hexadecimal number. The new address will be effective after next reboot.

Return value

ERR_OK (0) if the argument was accepted.
ERR_ARGUMENT (4) if the argument was not a valid 12-digits hex number.
ERR_REJECTED (12) if the argument has bit 0 set. Bit 0 is reserved for multicast addressing. 

Example

ETH 0c37e3771d66 

Sets the local ethernet of the ENC28J60 to 0c37e3771d66

Remarks

This command only makes sense on modules that are equipped with an Ethernet interface. WLAN interfaces have their own factory-assigned addresses which cannot be changed.

 


 

ETH?

Description

With ETH? one can query the current Ethernet address of the ENC28J60 chip and also some statistical values. The output consists of seven values separated by CR/LF (0x0d, 0x0a):

1. The ethernet address of the interface (assigned by the ETH command)

2. Number of received packets

3. Number of unsuccessful RX attempts (dropped packets)

4. Number of transmitted packets

5. Number of TX failures

6. Number of internal resets (rarely needed to keep the net alive)

7. The connection status, can be either NC (not connected) or CONN (connected)

Return value

ERR_OK (0) always.

Example

ETH?

Example output can be:

0c37e3771d66
1255
1
6340
0
0
CONN

Remarks

This command is only available if the module has an Ethernet interface.