Closed per1234 closed 6 years ago
Working on all the modifications.
Should be done in the next 24 hours.
Thanks for your massive effort!
simone
Done.
The links to stream were omitted in the see also because they are potentially not stable due to the reference new structure.
Changes to existing pages
I have also included improvement suggestions not related to the 2.0.0 release for the affected reference pages because it seems like it will be easier for the person updating the page to make all necessary changes to a page at the same time, rather than addressing multiple issue reports.
https://www.arduino.cc/en/Reference/Libraries Change:
To:
https://www.arduino.cc/en/Reference/Ethernet Change:
To:
https://www.arduino.cc/en/Tutorial/WebClient Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/WebClientRepeating
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/WebServer
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/BarometricPressureWebServer
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/UDPSendReceiveString
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/UdpNtpClient
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/DhcpChatServer
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/DhcpAddressPrinter
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Tutorial/TelnetClient
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
https://www.arduino.cc/en/Guide/ArduinoEthernetShield
Change:
To:
Remove:
Change:
To:
https://store.arduino.cc/arduino-ethernet-shield-2
Change:
To:
https://www.arduino.cc/en/Reference/EthernetBegin
Change:
To:
Change:
To:
Change:
To:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Change:
To:
Add:
https://www.arduino.cc/en/Reference/EthernetLocalIP
Change:
To:
Add:
https://www.arduino.cc/en/Reference/ServerAvailable
Change:
To:
Change:
To:
New reference pages to create
Based partly on information from Paul Stoffregen's blog post: https://www.pjrc.com/arduino-ethernet-library-2-0-0/
https://www.arduino.cc/en/Reference/EthernetInit
Ethernet.init()
Description
Used to configure the CS (chip select) pin for the Ethernet controller chip. The Ethernet library has a default CS pin, which is usually correct, but with some non-standard Ethernet hardware you might need to use a different CS pin.
Syntax
Ethernet.init(sspin)
Parameters
sspin: the pin number to use for CS (byte)
Returns
Nothing
Example
https://www.arduino.cc/en/Reference/ClientRemoteIP
remoteIP()
Description
Returns the IP address of the client.
Syntax
client.remoteIP()
Parameters
none
Returns
the client's IP address (IPAddress)
Example
See also
https://www.arduino.cc/en/Reference/ClientLocalPort
localPort()
Description
Returns the local port number the client is connected to.
Syntax
client.localPort()
Parameters
none
Returns
the local port number the client is connected to (uint16_t)
Example
See also
https://www.arduino.cc/en/Reference/ClientRemotePort
remotePort()
Description
Returns the port of the host that sent the current incoming packet.
Syntax
client.remotePort()
Parameters
none
Returns
the port of the host that sent the current incoming packet (uint16_t)
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetRetransmissionTimeout
Ethernet.setRetransmissionTimeout()
Description
Set the Ethernet controller's timeout. The initial value is 200 ms. A 200 ms timeout times the default of 8 attempts equals a blocking delay of 1600 ms during a communications failure. You might prefer to set a shorter timeout to make your program more responsive in the event something goes wrong with communications. You will need to do some experimentation to determine an appropriate value for your specific application.
Syntax
Ethernet.setRetransmissionTimeout(milliseconds)
Parameters
milliseconds: the timeout duration (uint16_t)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetRetransmissionCount
Ethernet.setRetransmissionCount()
Description
Set the number of transmission attempts the Ethernet controller will make before giving up. The initial value is 8. 8 transmission attempts times the 200 ms default timeout equals a blocking delay of 1600 ms during a communications failure. You might prefer to set a lower number to make your program more responsive in the event something goes wrong with communications. Despite the name, this sets the total number of transmission attempts (not the number of retries after the first attempt fails) so the minimum value you would ever want to set is 1.
Syntax
Ethernet.setRetransmissionCount(number)
Parameters
number: number of transmission attempts the Ethernet controller should make before giving up (byte)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetClientSetConnectionTimeout
setConnectionTimeout()
Description
Set the timeout for
client.connect()
andclient.stop()
. The initial value is 1000 ms. You might prefer to set a lower timeout value to make your program more responsive in the event something goes wrong.Syntax
client.setConnectionTimeout(milliseconds)
Parameters
milliseconds: the timeout duration for
client.connect()
andclient.stop()
(uint16_t)Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetServerAccept
accept()
Description
The traditional server.available() function would only tell you of a new client after it sent data, which makes some protocols like FTP impossible to properly implement.
The intention is programs will use either
available()
oraccept()
, but not both. Withavailable()
, the client connection continues to be managed by EthernetServer. You don’t need to keep a client object, since callingavailable()
will give you whatever client has sent data. Simple servers can be written with very little code usingavailable()
.With
accept()
, EthernetServer gives you the client only once, regardless of whether it has sent any data. You must keep track of the connected clients. This requires more code, but you gain more control.Syntax
server.accept()
Parameters
none
Returns
a Client object. If no client has data available for reading, this object will evaluate to false in an if-statement. (EthernetClient)
Example
See also
https://www.arduino.cc/en/Reference/IfEthernetServer
Description
Indicates whether the server is listening for new clients. You can use this to detect whether
server.begin()
was successful. It can also tell you when no more sockets are available to listen for more clients, because the maximum number have connected.Syntax
if (server)
Parameters
none
Returns
whether the server is listening for new clients (bool)
Example
https://www.arduino.cc/en/Reference/EthernetHardwareStatus
Ethernet.hardwareStatus()
Description
Ethernet.hardwareStatus()
tells you which WIZnet Ethernet controller chip was detected duringEthernet.begin()
, if any. This can be used for troubleshooting. If no Ethernet controller was detected then there is likely a hardware problem.Syntax
Ethernet.hardwareStatus()
Parameters
none
Returns
which WIZnet Ethernet controller chip was detected during
Ethernet.begin()
(EthernetHardwareStatus):Example
See also
https://www.arduino.cc/en/Reference/EthernetLinkStatus
Ethernet.linkStatus()
Description
Tells you whether the link is active.
LinkOFF
could indicate the Ethernet cable is unplugged or defective. This feature is only available when using the W5200 and W5500 Ethernet controller chips.Syntax
Ethernet.linkStatus()
Parameters
none
Returns
the link status (EthernetLinkStatus):
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetMACAddress
Ethernet.setMACAddress()
Description
Set the MAC address. Not for use with DHCP.
Syntax
Ethernet.setMACAddress(mac)
Parameters
mac: the MAC address to use (array of 6 bytes)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetLocalIP
Ethernet.setLocalIP()
Description
Set the IP address of the device. Not for use with DHCP.
Syntax
Ethernet.setLocalIP(local_ip)
Parameters
local_ip: the IP address to use (IPAddress)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetDnsServerIP
Ethernet.setDnsServerIP()
Description
Set the IP address of the DNS server. Not for use with DHCP.
Syntax
Ethernet.setDnsServerIP(dns_server)
Parameters
dns_server: the IP address of the DNS server (IPAddress)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetGatewayIP
Ethernet.setGatewayIP()
Description
Set the IP address of the network gateway. Not for use with DHCP.
Syntax
Ethernet.setGatewayIP(gateway)
Parameters
gateway: the IP address of the network gateway (IPAddress)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetSetSubnetMask
Ethernet.setSubnetMask()
Description
Set the subnet mask of the network. Not for use with DHCP.
Syntax
Ethernet.setSubnetMask(subnet)
Parameters
subnet: the subnet mask of the network (IPAddress)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetMACAddress
Ethernet.MACAddress()
Description
Fills the supplied buffer with the MAC address of the device.
Syntax
Ethernet.MACAddress(mac_address)
Parameters
mac_address: buffer to receive the MAC address (array of 6 bytes)
Returns
Nothing
Example
See also
https://www.arduino.cc/en/Reference/EthernetDnsServerIP
Ethernet.dnsServerIP()
Description
Returns the DNS server IP address for the device.
Syntax
Ethernet.dnsServerIP()
Parameters
none
Returns
the DNS server IP address for the device (IPAddress)
Example
See also
https://www.arduino.cc/en/Reference/EthernetGatewayIP
Ethernet.gatewayIP()
Description
Returns the gateway IP address for the device.
Syntax
Ethernet.gatewayIP()
Parameters
none
Returns
the gateway IP address for the device (IPAddress)
Example
See also
https://www.arduino.cc/en/Reference/EthernetSubnetMask
Ethernet.subnetMask()
Description
Returns the subnet mask of the device.
Syntax
Ethernet.subnetMask()
Parameters
none
Returns
the subnet mask of the device (IPAddress)
Example
See also