8000 Describe multicast APIs in readme, update keywords. · lemio/Arduino@69eb31a · GitHub
[go: up one dir, main page]

Skip to content

Commit 69eb31a

Browse files
committed
Describe multicast APIs in readme, update keywords.
1 parent 1e0bfa7 commit 69eb31a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ This is mostly similar to WiFi shield library. Differences include:
7575
- ```WiFi.localIP()``` is for STA, ```WiFi.softAPIP()``` is for AP.
7676
- ```WiFi.RSSI()``` doesn't work
7777
- ```WiFi.printDiag(Serial);``` will print out some diagnostic info
78+
- ```WiFiUDP``` class supports sending and receiving multicast packets on STA interface.
79+
When sending a multicast packet, replace ```udp.beginPacket(addr, port)``` with
80+
```udp.beginPacketMulticast(addr, port, WiFi.localIP())```.
81+
When listening to multicast packets, replace ```udp.begin(port)``` with
82+
```udp.beginMulticast(WiFi.localIP(), multicast_ip_addr, port)```.
83+
You can use ```udp.destinationIP()``` to tell whether the packet received was
84+
sent to the multicast or unicast address.
85+
Also note that multicast doesn't work on softAP interface.
7886

7987
WiFiServer, WiFiClient, and WiFiUDP behave mostly the same way as with WiFi shield library.
8088
Four samples are provided for this library.

hardware/esp8266com/esp8266/libraries/ESP8266WiFi/keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ remotePort KEYWORD2
5353
softAP KEYWORD2
5454
softAPIP KEYWORD2
5555
softAPmacAddress KEYWORD2
56+
softAPConfig KEYWORD2
5657
printDiag KEYWORD2
5758
hostByName KEYWORD2
5859
scanNetworks KEYWORD2

0 commit comments

Comments
 (0)
0