Skip to content

Commit

Permalink
Merge pull request #4 from a7md0/a7md0-patch-1
Browse files Browse the repository at this point in the history
Update README & Pump version
  • Loading branch information
a7md0 authored Jun 6, 2023
2 parents 6695c0c + 454cd03 commit 9fe5a3c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WakeOnLan [![Build Status](https://travis-ci.com/a7md0/WakeOnLan.svg?branch=master)](https://travis-ci.com/a7md0/WakeOnLan) [![PlatformIO Registry](https://badges.registry.platformio.org/packages/a7md0/library/WakeOnLan.svg)](https://registry.platformio.org/libraries/a7md0/WakeOnLan)
# WakeOnLan [![Build Status](https://travis-ci.com/a7md0/WakeOnLan.svg?branch=master)](https://travis-ci.com/a7md0/WakeOnLan) [![PlatformIO Registry](https://badges.registry.platformio.org/packages/a7md0/library/WakeOnLan.svg)](https://registry.platformio.org/libraries/a7md0/WakeOnLan) [![arduino-library-badge](https://www.ardu-badge.com/badge/WakeOnLan.svg?)]([https://www.ardu-badge.com/MyLibrary](https://reference.arduino.cc/reference/en/libraries/wakeonlan))
This Library provides an easy way to generate/send magic packets from an ESP8266 or ESP32 to any MAC Address. Additionally, it supports the "SecureOn" feature from some motherboard manufacturers. Finally, it also supports using any port number (instead of the default port 9.)<br /><br />
This library can be used in any environment that the IPAddress, WiFiUDP & delay classes are available.

Expand All @@ -11,13 +11,13 @@ To install the library in the PlatformIO IDE, use the library name like so:
`lib_deps = https://github.com/a7md0/WakeOnLan.git`

#### Include and initialize WiFiUDP
```
```cpp
#include <WiFiUdp.h>
WiFiUDP UDP;
```

#### Include and initialize WakeOnLan class
```
```cpp
#include <WakeOnLan.h>
WakeOnLan WOL(UDP); // Pass WiFiUDP class
```
Expand All @@ -37,7 +37,7 @@ WakeOnLan WOL(UDP); // Pass WiFiUDP class
### **Send WOL from char array MAC Address**
#### Set MAC address in variable
```
```cpp
const char *MACAddress = "01:23:45:67:89:AB";
```

Expand All @@ -49,7 +49,7 @@ const char *MACAddress = "01:23:45:67:89:AB";


#### Set MAC address and SecureOn variables
```
```cpp
const char *MACAddress = "01:23:45:67:89:AB";
const char *secureOn = "FE:DC:BA:98:76:54";
```
Expand All @@ -63,7 +63,7 @@ const char *secureOn = "FE:DC:BA:98:76:54";
### **Send WOL from byte array MAC Address**

#### Set MAC address in variable
```
```cpp
uint8_t MAC[6] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB}; // 01:23:45:67:89:AB
```
Expand All @@ -75,7 +75,7 @@ uint8_t MAC[6] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB}; // 01:23:45:67:89:AB
#### Set MAC address and SecureOn in variable
```
```cpp
uint8_t MAC[6] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB}; // 01:23:45:67:89:AB
uint8_t SECURE_ON[6] = {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54}; // FE:DC:BA:98:76:54
```
Expand All @@ -90,7 +90,7 @@ uint8_t SECURE_ON[6] = {0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54}; // FE:DC:BA:98:76:5
### **Generate magic packet**

#### Generate
```
```cpp
size_t magicPacketSize = 6 + (6 * 16); // FF*6 + MAC*16
uint8_t* magicPacket = new uint8_t[magicPacketSize]; // Magic packet will be stored in this variable

Expand All @@ -100,7 +100,7 @@ WOL.generateMagicPacket(magicPacket, magicPacketSize, pMacAddress, sizeof(MAC));
```
#### Generate with "SecureOn"
```
```cpp
size_t magicPacketSize = 6 + (6 * 16) + 6; // FF*6 + MAC*16 + SecureOn
uint8_t* magicPacket = new uint8_t[magicPacketSize]; // Magic packet will be stored in this variable
Expand Down
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"maintainer": true
}
],
"version": "1.1.6",
"version": "1.1.7",
"frameworks": "arduino",
"platforms": "espressif32, espressif8266"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=WakeOnLan
version=1.1.6
version=1.1.7
author=a7md0 <[email protected]>
maintainer=a7md0 <[email protected]>
sentence=Generate and send Wake On Lan (WOL) packet over UDP protocol.
Expand Down

0 comments on commit 9fe5a3c

Please sign in to comment.