Skip to content
This repository was archived by the owner on Jan 24, 2025. It is now read-only.

Latest commit

 

History

History
30 lines (22 loc) · 974 Bytes

File metadata and controls

30 lines (22 loc) · 974 Bytes

Looking for a new Maintainer!

Profinet Discovery Protocol

Profinet DCP (Discovery and Configuration Protocol) is a fundamental aspect of Profinet communication within industrial automation systems. This protocol facilitates the discovery and (configuration) of Profinet devices within a network, allowing for seamless integration and interoperability.

Note:
This need to run in privileged mode or you use capabilities

Example

fn main(){

    let networkdevicename = "wlp3s0".to_string();
    let mac = "00:00:00:00:00";
    let mut dcp = Dcphandler::new(networkdevicename);
    
    dcp.blink(mac.clone());
    dcp.set_name_of_station(mac.clone(), "cool".to_string());
    dcp.factory_reset(mac.clone());
    let devices = dcp.identify_all();
    for device in &devices {
        println!("Device: {}", device);
    } 
}

credits

this library was inspired by https://gitlab.com/pyshacks/pnio_dcp/