Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

IP

Description

The IP command exists to change settings of the integrated IP protocol stack. IP requires two or three arguments. The first argument is a refinement, that is, "what" should be done and the second argument is the actual value.The following list shows the capabilities of the IP command:

IP LOCAL xxx.xxx.xxx.xxx
This sets the local IP address (the address of the module itself). The second argument must be a valid IP address in standard dotted-decimal notation.

IP GW xxx.xxx.xxx.xxx
This tells the module where the IP gateway can be reached. All IP packets that doesn't match the subnet mask are send to the gateway which (hopefully) routes them into another net. The second argument must be a valid IP address in standard dotted-decimal notation.

IP MASK xxx.xxx.xxx.xxx
This sets the subnet mask that the module uses to decide if packets must be sent to the gateway machine. The second argument must be a valid IP address in standard dotted-decimal notation.

IP DNS xxx.xxx.xxx.xxx
To map domain names to IP addresses, the module needs the address of a machine that is able to respond to DNS queries. The second argument must be a valid IP address in standard dotted-decimal notation.

IP DHCP OFF | AUTO | AUTOCL | CLIENT | SERVER
Use IP DHCP CLIENT to enable automatic IP address assignment of the Avisaro module by a DHCP server.

If you want the Avisaro Module to be itself a DHCP server, invoke IP DHCP SERVER. DHCP server functionality of Avisaro Modules is limited to some extend, because it only offers addresses in the 192.168.0.x range without keeping any track of the clients.

The IP DHCP AUTO function can be used for easy auto-configuration of unconfigured modules. In this mode the module enables its very simple DHCP server, when it is in default mode. Default mode means that the SSID must be "avisaro" and the WLAN must be in ad-hoc mode. Any other mode disables the DHCP server automatically until the module is brought back into default mode.

IP DHCP AUTOCL is a mix mode of AUTO and CLIENT, because the module behaves like IP DHCP AUTO is active in default mode, but enables its DHCP client in configured mode. To disable anly DHCP functionallity use IP DHCP OFF.

IP ALIVE xxx
This sets or resets the global keep-alive timeout value which counts seconds. If the second argument is a decimal value greater than zero, all connected TCP sockets on all network interfaces will send keep-alive packets if they are inactive for the given time. If the second argument is zero, keep-alives are globally switched off.

Return Values

ERR_OK (0) if the command was accepted.
ERR_ARGUMENT (4) if one or more arguments didn't match.
ERR_REJECTED (12) if both network interfaces are enabled but the third argument was missing.

See (Mehr here) for complete list of error codes.

Example

IP LOCAL 192.168.0.233
IP GW 192.168.0.1
IP MASK 255.255.255.0
IP DNS 192.168.0.1
IP DHCP OFF
IP ALIVE 10

This is a complete configuration sequence for interface 0 (WLAN), if Ethernet is also enabled. In addition, the global keep-alive timeout is set to 10 seconds

Remarks

If only one network interface is active, either WLAN or ethernet, the above commands change settings for only that interface. If both interfaces, WLAN and Ethernet, are in use simultaneously a third argument is needed which must be 0 (for WLAN) and 1 (for Ethernet). The only exception is the IP ALIVE command which never needs a third argument because IP ALIVE affects all network interfaces.

IP?

Description

With the IP? command, all IP-related settings and values can be requested. IP? requires either zero or one argument which must be either 0 or 1. There are two sets of configuration entries, one for WLAN and one for Ethernet that can be queried. If 0 is given as argument, IP? shows all WLAN related settings. If 1 is given, then the Ethernet-related IP settings will be shown. Without an argument, IP? prints the settings of the currently active network interface. An argument is mandatory if both network interfaces are used simultaneously. Each output shows two blocks of IP addresses. The first block contains values stored in Flash memory while the second one shows the actually used values. These can differ from the stored settings if dynamic configuration over DHCP is enabled. IP? prints out IP settings line by line in the following order.

1. NVRAM-stored: Local IP address.

2. NVRAM-stored: Subnet mask.

3. NVRAM-stored: Gateway address.

4. NVRAM-stored: Nameserver address.

5. DHCP flag. This can be of of OFF, AUTO, AUTOCL, CLIENT, SERVER, indicating if dynamic configuration with DHCP is enabled or not.

6. Currently active: Local IP address.

7. Currently active: Subnet mask.

8. Currently active: Gateway address.

9. Currently active: Nameserver address.

10. Keep-alive timeout. This is the global TCP keep-alive timeout value.

Example

IP? 0

Prints out something like that

192.168.0.133 
255.255.255.0
192.168.0.1
192.168.0.1
OFF
192.168.0.133
255.255.255.0
192.168.0.1
192.168.0.1
10