How to configure wifi connection via ONVIF - ip-camera

I'm working on camera firmware (ONVIF services). I've found network interface configuration methods (Section 5.3) in ONVIF developer guide, but is it possible to configure wifi networks connection?
I need to:
get available wifi networks
choose wifi network
Does ONVIF describe such methods web-service should implement?

Yes, it is described in the core specification (section 8.2.22, page 64).
For 1., the method is ScanAvailableDot11Networks
For 2., SetNetworkInterfaces will use the Extension.Dot11 elements.
You also have to implement a few other methods, such as GetDot11Status and GetDot11Capabilities, and return correct information in GetNetworkInterfaces.

Related

How to resolve the problem of P2P Connection for 3 layers of NAT

Currently, I am doing a project which remoting a toy car under the cellular network which is a P2P connection.
I required to use PC (WiFi Connection) to control the toy car (Data hotspot connection) and transfer packet by using UDP.
It seems like have some issue within it, first for all will be the CGNAT problem. I know we can use the UDP hole punching but it is hard for me do to this due to I am weak knowledge on this area.
I would like to ask is there any way still can be implemented for the P2P connection if a VPN is available?
check out ZeroTier
ZeroTier combines the capabilities of VPN and SD-WAN, simplifying network management.
Emulates Layer 2 Ethernet with multipath, multicast, and bridging capabilities.
ZeroTier provides network control and P2P functionality.
Use ZeroTier to create products which run on their own decentralized networks.
Access your desktop, NAS, and other devices from anywhere

HttpListner discovery

I'm developing a system on Xamain in a way that each device can create network service via HttpListner then start listing for incoming calls from other devices on same LAN network. Upon creating the listner we can apply naming convention in the URI so that other devices can filterout non-related services.
The question is there a way to discover all hosts (ip+port) under same LAN having given service's prefix?
I could do it using device specific code for Android via NdsManager class then calling DiscoveringPeers() but I'm thinking why it's not possible to have equivalent functionality in .Net?
I used ZeroConf as source of inspiration to implement Multicasting clients and now all good. The most important is picking up the right Ip address adapted to your Network to multicast. See this table (https://en.wikipedia.org/wiki/Multicast_address).
Broadcasting to 255.255.255.255 was not the required behavior as well as it will not be routed.

How to find the device is connected to whether USB port 2.0 or USB port 3.00 ?

I just want to know how to find a usb device is connected to USB3.0 or USB2.0 port in window . I am using c++ and win32 API. please let me know your thoughts.
Based on how your question is phrased, I assume that you know when a device is connected, and need to know if the port it's connected is capable of USB 3.0 speeds.
Take a look at the USB_NODE_CONNECTION_INFORMATION_EX structure, and specifically the field Speed in it, which could correspond to a value defined in the enum USB_DEVICE_SPEED. For USB 3.0, the value of Speed would be UsbSuperSpeed.
The documentation page says that you could use IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX request to obtain information about the connection associated with the indicated USB port.
You may also find the following remarks from the documentation helpful:
If there is no device connected, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX just returns information about the port.
If a device is connected to the port IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX returns information about both the port and the connected device.
The USB_NODE_CONNECTION_INFORMATION_EX structure is an extended version of USB_NODE_CONNECTION_INFORMATION. The two structures are identical, except for one member. In the extended structure, the Speed member indicates the device speed.
I'd also encourage you to single-step through the usbview project which is part of the windows driver samples available in Github.

Understanding NDIS virtual miniport driver

I have built and installed the netvmini on windows 7/8. And Im able to ping from one IP to the other.
But I have some doubts with respect to its functionality which are listed below:
In which layer does the driver get placed w.r.t OSI layers.
Does the driver route the packets w.r.t the IP addresses given by the Application.
What is the role of NDIS protocol driver.
What is the difference between NDIS protocol driver and miniport driver.
Looking forward to some answers which will be of great help...
In the 2nd layer (MAC)
No, routing is done by the IP protocol (3rd layer). MAC layer operates with MAC addresses.
There is no specific role, as is. The role is defined by the driver developer and the location of the driver in the network stack. Protocol drivers are the highest level NDIS drivers and reside above miniport and filter drivers. Therefore, they naturally belong to higher layers of OSI model, e.g. they can implement functionality related to the transport layer (4th layer). See more here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff566823%28v=vs.85%29.aspx
Miniport driver is the lowest driver in the network stack, except for the bus driver. Usually it will implement functionality related to the 2nd layer (MAC). See more here: https://msdn.microsoft.com/en-us/library/windows/hardware/ff565951(v=vs.85).aspx

Algorithm for mapping network devices

Does anyone know a good method for mapping devices on a network?
I am looking for something that can establish the connection layout between devices to build a visual network diagram.
Any ideas?
This isn't an algorithm, but rather a protocol (or protocols) for discovering neighbors. If your switches/devices have Link Layer Discovery Protocol (LLDP) enabled, you can use that to determine a network of physical connections.
Note that older Cisco switches might not have LLDP, but will have CDP, a proprietary implementation of discovery. Same goes for Nortel and Extreme switches which also have their proprietary protocols. But LLDP is now the standard (802.1AB) that should be used for discovery.
You can also see on the Wikipedia page that there are implementations of LLDP (and other proprietary protocols) for Linux/Windows/Mac. Also, VMware ESX implements CDP.

Resources