Does pcap_findalldevs() in WinPcap work for IPv6 in Windows10? - pcap

I'm checking whether pcap_findalldevs can find IPv6 devices in Windows10
I'm not sure because Windows 10 doesn't seem one of supported platforms according to the homepage
(https://www.winpcap.org/install/default.htm)
Supported platforms:
Windows NT4/2000
Windows XP/2003/Vista/2008/Win7/2008R2/Win8 (x86 and x64)
I checked it out as below steps
(1) download developer's pack : https://www.winpcap.org/devel.htm
(2) open cygwin
(3) mv WpdPack\Examples-pcap\iflist
(4) build and run
As you see below result, it succeeds finding IPv4 devices
but it doesn't provides enough information for IPv6 devices
"Realtek USB NIC" is the device for IPv6
C:\cygwin64\home\WpdPack\Examples-pcap\iflist> iflist.exe
{6BA7B1CA-9393-4747-A1C7-BAFA5BF3CF0F}
Description: Microsoft Loopback: no
Address Family: #2
Address Family Name: AF_INET
Address: 10.177.98.131
Netmask: 0.0.0.0
Broadcast Address: 0.0.0.0
{6C5D9B8C-CA69-4E39-9946-A2CC10072117}
Description: Realtek USB NIC
Loopback: no
{1E922BCB-F3EF-4DC8-94A7-DCF1349730B4}
Description: VMware Virtual Ethernet Adapter
Loopback: no
Address Family: #2
Address Family Name: AF_INET
Address: 192.168.0.1
Netmask: 0.0.0.0
Broadcast Address: 0.0.0.0

WinPcap is a dead product. Even the WinPcap advise switching to Npcap. From the WinPcap news:
15 September 2018
WinPcap, though still available for download (v4.1.3), has not seen an upgrade in many years and there are no road map/future plans
to update the technology. While community support may persist,
technical oversight by Riverbed staff, responses to questions posed by
Riverbed resources, and bug reporting are no longer available.
Gordon Lyon, Nmap project founder, has created Npcap, a packet capture library for Windows, that includes WinPcap compatibility and
may be a suitable replacement for WinPcap and WinPcap Pro. Information
can be found at https://nmap.org/npcap/.
I would suggest looking into Npcap instead: https://nmap.org/npcap/guide/npcap-devguide.html

Related

How to request Ebox wifi with modbus

I've never used modbus before.
I have an eBox-Wifi Epever connected to an MPPT charge controller TRIRON for solar power.
I was able to make it connect to my wifi and now has an accessible IP : 192.168.39.149
I just want to extract some data from it, battery Voltage, etc...
On http://192.168.39.149:80, i have a web interface for administration. (Which is not what i want.)
After an nmap, I see that there is port 8088 open. (Can use modbus there maybe ? no web interface on this port.)
I installed and used modbus_cli like that modbus -b 115200 -p 1 192.168.39.149:8088 3101 but I can't make it return anything...
https://files.i4wifi.cz/inc/_doc/attach/StoItem/7068/MODBUS-Protocol-v25.pdf
http://www.solar-elektro.cz/data/dokumenty/1733_modbus_protocol.pdf
https://github.com/favalex/modbus-cli
EDIT : I changed for baud 9600 and port 502. (Which are the defaults for modbus ?)
Try python modpoll tool with the following configuration, install modpoll via pip install modpoll if not installed.
Create a local config file, e.g. epever.csv, only added voltage/current/power values for testing.
device,mydevice,1,,,
poll,holding_register,12544,4,BE_LE,
ref,PV_array_input_voltage,12544,uint16,r,V,0.01
ref,PV_array_input_current,12545,uint16,r,A,0.01
ref,PV_array_input_power,12546,uint32,r,W,0.01
poll local device,
modpoll --tcp 192.168.39.149 --tcp-port 8088 --config epever.csv
The configuration assumes you keep the device ID = 1 (default), and use BE_LE endian, please adjust endian setting according to the platform running on.
I don't know if you need more than the graph for EPever Solar Station.
That is what I use and it works really good.
I connect STA mode Not AP.
I create a virtual COM9 port Baut Rate 115200, 192.168.0.7 :8088.
I create a new SSID:LSD Passw. 12345678 in the router assign a static IP 192.168.0.7
I used android app "PortTester" and I see IP 192.168.0.7 port 8088 is open fast and simple. Follow this video like I did...
https://www.youtube.com/watch?v=RrEumwFHfJ4
What I try to do is integrate it in Home Assistant.
I see something here, it since to be someone has connect...
https://community.home-assistant.io/t/epever-modbus-rs-485-config/214397/3
I don't know if this work?
modbus:
type: tcp
host: 10.240.1.4
port: 8088
name: epever4
timeout: 2
type: rtuovertcp
host: 10.240.1.4
port: 8088
name: epever4

porting Socket programming from Ubuntu to Windows

I have the following connection in Ubuntu
Linux PC -> Switch (PoE) -> DUT
with the following ip configurations:
Ethernet adaptor Statically assigned
BASE IP (ipv4): 10.0.0.1
subnet : 255.255.255.0
gateway : 10.0.0.0
eth0 network address : 10.0.0.3
This setup enables me to send and receive UDP packets.Works perfectly fine in Ubuntu.
Now in Windows, I have made relevant changes to the python code of the codebase, but the code gets stuck waiting for UDP packets from the Hardware. I have statically assigned the same values as in Ubuntu. I am very new to networking..
(1) I have ensured Firewall is allowing UDP packets
(2) I have made the same IP address,subnet,gateway settings configurations.
Where am I going wrong?
It's impossible to say exactly what goes wrong based on this information.
I'd suggest trying Wireshark from https://www.wireshark.org/.
With that running on your windows PC, you can see if your packets are being sent out or not, and you can also see if the device responds or not. That way you can determine if the problem is in sending or receiving the packets.

Is writing DHCP client on Windows Phone 8 even possible?

Since I haven't installed windows 8 on PC yet, I'm not able to compile my program for phone and test whether or not will it works.
The question is: can I use DHCP ports (67 and 68), create there sockets and send/receive data in my app?
Reference of Socket API doesn't mention anything, however those ports can be locked by system DHCP client.
Since DHCP is a simple UDP protocoll it should be possible. You just need to check if it is possible on wp8 to open the ports in that low range. In linux that requires root permission, but luckily we use Windows.

Redirect telnet 23 to COM Port via WIFI

I bought an Bluetooth ELM327 to read codes out of my cars diagnostic ports
I connect to it via Bluetooth in windows and it makes a serial-over-bluetooth com port 4
which any application running on my windows will connect quite happily.
I then found a few apps for the iphone and android etc that connect to these ELM gadgets via WIFI and not Bluetooth (because for some reason you cannot pair to these devices of iphone)
Now obviously I can buy a WIFI enabled ELM327 - but it costs £130 and my Bluetooth one cost £15
So after reading about this a bit I found out that the WIFI enabled ones you connect up as ad-hoc network and the smartphone(iphone) app tenets in port 23 that relays normal serial commands.
So obviously in the WIFI enabled one there must be some processor that runs an nano-os with telnet and some rs-323 translators and not sure what else.
How, using Windows 7 will i be able to relay any incoming WIFI requests for Telnet port 23 to my COM 4 that is connected to my Bluetooth ELM327 ..
As this is surely all that is needed by the Smartphone app.
You dont have to connect using a Bluetooth library like suggested ... because you are already connected to the device and have COM4 exposed to you. SO all you have todo is use a telnet library and translate and handle the handshake then realy the infomation as serial data.
There's no feature built in to Windows (or any other platform I know of) for such a scenario.
It would be fairly straightforward however to write a program to listen on port 23 and open a bluetooth connection when connected to, and then forward the data received on each connection out onto the other.
For instance one could use my .NET library 32feet.NET (e.g. http://32feet.codeplex.com/wikipage?title=General%20Bluetooth%20Data%20Connections etc etc) along with TcpListener from the .NET framework class libraries.

Android Emulator Networking

How can I make Android Emulator and the host machine (Ubuntu 9.10) connected together to the same network?
For example
Android Emulator IP Address : 10.0.2.15
Ubuntu Host IP Address: 10.0.2.16
Thanks in advance
You have to use port forwarding using either 'adb forward' tool of Android or using 'redir add' from the emulator console
Android uses an internal router through which it accesses the host network connection. In that router, there is a firewall to avoid communication to the external world. If you need to enable communication between your emulator and the host, you need to use port forwarding option that is provided in Android emulator. Use telnet localhost port# in Android console. port# is usually appearing in the title bar of the emulator window. Numbers such as 5554, 5556, 5557 and so on.
Use add <protocol>:<host-port>:<guest-port> to define a port forwarding rule for your router. Protocol is udp/tcp and host port is the port of your computer and guest port is the port of your emulator. So, if you want to transfer all the http call to theh ost use add tcp:80:8080
More information is here