wake_on_lan 2.0.3 copy "wake_on_lan: ^2.0.3" to clipboard
wake_on_lan: ^2.0.3 copied to clipboard

outdated

Send wake on LAN magic packets to devices on your local network.

example/main.dart

import 'package:wake_on_lan/wake_on_lan.dart';

void main() async {
  // Create the IPv4  broadcast address
  String ip = '192.168.1.255';
  String mac = 'AA:BB:CC:DD:EE:FF';

  // Validate that the two strings are formatted correctly
  if (!IPv4Address.validate(ip)) return;
  if (!MACAddress.validate(mac)) return;

  // Create the IPv4 and MAC objects
  IPv4Address ipv4Address = IPv4Address.from(ip);
  MACAddress macAddress = MACAddress.from(mac);

  // Send the WOL packet
  // Port parameter is optional, set to 55 here as an example, but defaults to port 9
  WakeOnLAN.from(ipv4Address, macAddress, port: 55).wake();
}
14
likes
0
pub points
70%
popularity

Publisher

verified publisherjagandeepbrar.io

Send wake on LAN magic packets to devices on your local network.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

convert

More

Packages that depend on wake_on_lan