Skip to content

Commit 613dda8

Browse files
authored
Merge pull request #8205 from dhalbert/8.2.x-backport-8165-network-docs
8.2.x backport 8165 network docs
2 parents 03c1cde + 54b23fe commit 613dda8

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

docs/workflows.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ MDNS is used to resolve [`circuitpython.local`](http://circuitpython.local) to a
9494
hostname of the form `cpy-XXXXXX.local`. The `XXXXXX` is based on network MAC address. The device
9595
also provides the MDNS service with service type `_circuitpython` and protocol `_tcp`.
9696

97+
Since port 80 (or the port assigned to `CIRCUITPY_WEB_API_PORT`) is used for web workflow, the `mdns`
98+
[module](https://docs.circuitpython.org/en/latest/shared-bindings/mdns/index.html#mdns.Server.advertise_service)
99+
can't advertise an additional service on that port.
100+
97101
### HTTP
98102
The web server is HTTP 1.1 and may use chunked responses so that it doesn't need to precompute
99103
content length.

shared-bindings/mdns/Server.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(mdns_server_find_obj, 1, _mdns_server_find);
171171
//| ``service_type`` and ``protocol`` can only occur on one port. Any call after the first
172172
//| will update the entry's port.
173173
//|
174+
//| If web workflow is active, the port it uses can't also be used to advertise a service.
175+
//|
174176
//| :param str service_type: The service type such as "_http"
175177
//| :param str protocol: The service protocol such as "_tcp"
176178
//| :param int port: The port used by the service"""

shared-bindings/wifi/Radio.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,12 @@ MP_PROPERTY_GETTER(wifi_radio_ipv4_subnet_ap_obj,
559559
//| ipv4_dns: Optional[ipaddress.IPv4Address],
560560
//| ) -> None:
561561
//| """Sets the IP v4 address of the station. Must include the netmask and gateway. DNS address is optional.
562-
//| Setting the address manually will stop the DHCP client."""
562+
//| Setting the address manually will stop the DHCP client.
563+
//|
564+
//| .. note::
565+
//|
566+
//| In the raspberrypi port (RP2040 CYW43), the access point needs to be started before the IP v4 address can be set.
567+
//| """
563568
//| ...
564569
STATIC mp_obj_t wifi_radio_set_ipv4_address(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
565570
enum { ARG_ipv4, ARG_netmask, ARG_gateway, ARG_ipv4_dns };

0 commit comments

Comments
 (0)