diff --git a/docs/starting_methods.rst b/docs/starting_methods.rst index 757f966..1b3a289 100644 --- a/docs/starting_methods.rst +++ b/docs/starting_methods.rst @@ -28,13 +28,11 @@ it may not be able to access the internet. Manual Ethernet --------------- -Most of the time, the WiFi will be a preferred way of connecting to the network. -Nevertheless it is also possible to use Ethernet instead of WiFi. -The only difference in usage is related to configuring the ``socket_source`` differently. +Ethernet can also be used to connect to the location network. .. literalinclude:: ../examples/httpserver_simpletest_manual_ethernet.py :caption: examples/httpserver_simpletest_manual_ethernet.py - :emphasize-lines: 7,10,12-24,37 + :emphasize-lines: 11-20 :linenos: Automatic WiFi using ``settings.toml`` diff --git a/examples/httpserver_simpletest_manual_ethernet.py b/examples/httpserver_simpletest_manual_ethernet.py index 5d668b8..80ce1af 100644 --- a/examples/httpserver_simpletest_manual_ethernet.py +++ b/examples/httpserver_simpletest_manual_ethernet.py @@ -2,9 +2,9 @@ # # SPDX-License-Identifier: MIT +import adafruit_connection_manager import board import digitalio -from adafruit_wiznet5k import adafruit_wiznet5k_socket as socket from adafruit_wiznet5k.adafruit_wiznet5k import WIZNET5K from adafruit_httpserver import Request, Response, Server @@ -20,10 +20,9 @@ # Initialize ethernet interface with DHCP eth = WIZNET5K(spi_bus, cs) -# Set the interface on the socket source -socket.set_interface(eth) +pool = adafruit_connection_manager.get_radio_socketpool(eth) -server = Server(socket, "/static", debug=True) +server = Server(pool, "/static", debug=True) @server.route("/") pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy