-
Notifications
You must be signed in to change notification settings - Fork 226
Open
Description
Id just like to prefix this with the fact that Im using a cheap ONVIF camera.
But wondering whether Im doing something wrong, response returns "false" however I cant connect to the camera on the new IP address.
Ive have managed to do other Get calls, but unable to perform this Set call.
dev, err := onvif.NewDevice(onvif.DeviceParams{
Xaddr: "192.168.1.10:8899",
Username: "admin",
Password: "",
HttpClient: new(http.Client),
})
if err != nil {
panic(err)
}
prefxedIpv4Address := xsdonvif.PrefixedIPv4Address{Address: "192.168.1.2", PrefixLength: 24}
ipv4NetworkInterfaceSetConfiguration := xsdonvif.IPv4NetworkInterfaceSetConfiguration{Enabled: true, Manual: prefxedIpv4Address, DHCP: true}
networkInterfaceSetConfiguration := xsdonvif.NetworkInterfaceSetConfiguration{Enabled: true, IPv4: ipv4NetworkInterfaceSetConfiguration}
setNetworkInterfaces := device.SetNetworkInterfaces{InterfaceToken: "eth0", NetworkInterface: networkInterfaceSetConfiguration}
setNetworkInterfaceResponse, err := sdk.Call_SetNetworkInterfaces(ctx, dev, setNetworkInterfaces)
if err != nil {
log.Println(err)
} else {
fmt.Println(setNetworkInterfaceResponse)
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels