Windows 7 has a (neat?) new feature called a 'virtual wireless adapter'. Read about it here:
http://www.istartedsomething.com/20090516/windows-7-native-virtual-wifi-technology-microsoft-research/
I have an application that directly controls the windows wifi interface card using the Native Wifi API ( http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx ). Please take as a given for this question that I need to directly control the wifi adapter using this documented api and can't just leave it up to OS and user.
The Windows 7 virtual adapter is supposed to be included with any approved Windows 7 wifi drivers. The drivers that out there now seem to be pretty buggy, and I've found that unless I manually disable the virtual wifi adapter the real adapter will not reliably connect to a wireless access point when commanded by the WLAN api.
My main question is 'How to I detect the presence of a windows virtual wifi adapter?'
Note that the documentation for WlanEnumInterfaces says:
This virtual device normally shows up
in the “Network Connections Folder” as
‘Wireless Network Connection 2’ with a
Device Name of ‘Microsoft Virtual WiFi
Miniport adapter’ if the computer has
a single wireless network adapter.
This virtual device is used
exclusively for performing software
access point (SoftAP) connections and
is not present in the list returned by
the WlanEnumInterfaces function
.
I suspect there is shell api that might provide the enumeration that the control panel uses to display the virtual adapter.
For extra credit, how can I disable this adapter programatically?
Thanks in advance.
To detect the Windows 7 virtual adapter with the WLAN api you need to use the version defined by wlanapi.h in Windows SDK version 6.1.
You can enable or disable network adapters by using WMI or the INetConnection COM interface defined in netcon.h .
In the control panel > Network and Internet there's an option that says: "add a wireless device". I used that to detect the microsoft virtual wifi miniport adapter, cause after I installed Windows 7 it didn't appear in the network adapters but it was there and enabled, but not started.
To disable it from a command prompt run as administrator you could try:
netsh wlan set hostednetwork mode=disallow
(or disallowed, I haven't tried). See http://msdn.microsoft.com/en-us/library/dd815243%28VS.85%29.aspx
Related
There are many tutorials on how to make Vitrual Router and share
VPN TAP interface internate with the WiFi card as a HotSpot in Windows 10.
That said I have not found any tutorial on how to create a Wired (Ethernet) Virtual Router in Windows 10 that I can share my VPN connection (TAP+TUN interfaces) on that wired network interface.
Any workable code or windows powershell commands is really appreciated, I need to share
the VPN TAP and TUN adapter internet to other devices via Ethernet cable (Wired Virtual Router).
I am using Windows 10 pro.
I'm attempting to connect to a Cisco 4010 network switch via it's built in usb port (which internally is a usb to rs232 adapter wired to the back of the console port).
I have installed the Cisco usb console drivers version 3.1
When I plug into the usb port, the little green LED that indicates that the console port has switched to usb does not light up.
When I run putty, and attempt to connect via serial connection to COM16 (the usb to rs232 in the cisco switch) I get:
Unable to open connection to COM16
Opening '\.\COM16': Error 1450: Insufficient System resources exist to complete the requested service.
I have tried reinstalling the drivers to no effect.
I have 3 identical switches, which give me identical behaviour, all 3 new out of the box with no programming.
Changing the Baud rate makes no difference, not that I'm expecting it to as the issue seems to be COM16 doesn't exist or similar
Putty Settings and Device Manager
With the help of a colleague, we narrowed the issue down to windows using a default usb to rs232 driver rather than the cisco one I had installed. The big clue came when I tried using putty inside a VM and it worked, while on the host OS I was still getting error 1450.
We had to compeletely uninstall all drivers, reboot, reinstall drivers manually, reboot, then attempt the usb connection again.
The last comment here describes it:
https://community.cisco.com/t5/cisco-software-discussions/usb-console-cable/td-p/3952600
I will copy the solution across to here, for easier search of the solution for the next person who has the same issue.
For WIn10 , install the setup(x64).exe from the Cisco_usbconsole_driver_3_1.zip.
Check that the Cisco Serial (Comx) is using the correct driver provider which should be Cisco. Don't use the Cypress driver.
Device Manager
To update the driver,
If you installed it already and having issues, uninstall it using the setup(x64),exe then reboot PC.
Uninstall Cisco Driver
First, disconnect the blue Cisco USB console cable. Reinstall the Cisco USB console drive using setup(x64).exe from the Windows_64 folder which was extracted from file Cisco_usbconsole_driver_3_1.zip.
Reboot PC
Open device manager to observe the driver installation. Check that you see "Cisco USB to Serial Adapter". If you don't see it repeat the above steps.
if you see above "Cisco USB to Serial Adapter". then
Update Driver
Click UPDATE DRIVER, then Browse my computer for driver software.
Choose " Let me pick from a list of available driers on my Computer." Select "Cisco Serial".
Pick driver
Finally,. connect to the COM port x indicated in the Device Manager, Ports (COM & LPT) , Cisco Serial (COMx)
I have searched for hours. I am developing an activesync client in order to send sms from PC to a phone that will send it. Specifically a windows phone. Previously I have used Jeyo mobile comp. I have all documentation I need but I can't find the default http address of the activesync server on the Windows phone when it is connected through USB. I should mention that I have a disability and can't access Windows phone itself. The OS is 6 but the whole point of creating the software is so I can upgrade. Many thanks!
alternatively if I am barking up the wrong tree, i need to know what tree to bark. for example serial ports. i would only need code to connect and read/write. otherwise is there a way to detect the information with csharp, ipconfig definitely isn't detecting windows mobile and activesync definitely works.
The question is a bit unclear. But Jeyo Mobile Comp is a remote control software for Windows Mobile (6.x, not Windows Phone 8 or 10).
Another free remote control software you my look at is Sparus EveryWan Remote personal edition (free). It can show the screen of Windows Mobile on your Windows PC and you can use the device remotely using the USB ActiveSync connection.
Another option is MyMobiler (also free).
The ActiveSync connection is made using the IP addresses 169.254.1.1 and 169.254.1.2 or 192.168.55.101/102, depends on Connection Setting:USB:Enhanced Network on device. You will find the IP when the device is connected to your PC, ActiveSync is connected and you start a Windows CMD prompt on the PC; then type "ipconfig" to get a list of IP addresses used by the PC. There will be your IP connected to the LAN/WAN and the one connected to Windows Mobile.
There is NO default http access to the Windows Mobile device.
If you are looking for a programming API, see RAPI at Microsoft (https://msdn.microsoft.com/en-us/library/aa513321.aspx) or OpenNetCF Desktop Communication (https://rapi.codeplex.com/) support.
I am using native Wifi api on Windows to programmatically do a few tasks with WLANs. However, my problem is it exposes limited set of functions. I would like to access certain fields of a beacon frame that provides Access Point load, airtime and so on. Which are the tools that can be used to do this?
Thanks in advance!
I would take a look at winpcap. It is able to capture 802.11 frames. However, it is probable in windows that the chipset driver does not allow setting the WLAN to monitor mode. If this is the case then winpcap might not be able to get the necessary information about beacon frames.
There is also a commercial offering, airpcap, which seems to come bundled with drivers and hardware that allows to do full-scale wifi monitoring in windows.
There is one way to capture WiFi packets under Windows with Wireshark. You have to install Acrylic WiFi software
Acrylic WiFi is a WiFi sniffer for windows that installs an NDIS driver that captures wlan packets in monitor mode and also adds support to wireshark and Cain & Abel to capture WiFi packets.
Once Acrylic is installed you have to start Acrylic, wireshark or Cain as Administrator and select your NDIS WiFi interface.
In Windows Vista or later you can use Npcap that "support raw 802.11 traffic". Npcap is an update of WinPcap using NDIS 6 Light-Weight Filter (LWF).
https://wiki.wireshark.org/CaptureSetup/WLAN#Starting_from_Windows_Vista:_Npcap
Unfortunately, I have to deal with J2ME (which I consider ancient technology these days) on Sony Ericsson J108i (aka Cedar).
Unfortunately I've failed to configure on-device debugging. I've done the following:
enabled Java developer mode in service settings
configured USB -> Advanced -> Internet access -> Via computer
installed J2ME SDK 2.5.0.6
disabled the Windows firewall
tried the whole procedure on both Windows XP and Windows 7
Unfortunately, Connection Proxy fails to connect to the device. The network interface is there, named 'Sony Ericsson Device 1039 USB Ethernet Emulation (NDIS 5)', but when I try to connect, the following is logged:
[18.03.12 13:23:45] Getting device ip. Failed to get deviceip for interface(Sony Ericsson Device 1039 USB Ethernet Emulation (NDIS 5) - Sterownik miniport Harmonogramu pakietów). Trying to get it from Connection Proxy settings(sdkme.properties). java.lang.RuntimeException: Unable to connect to the SEMC SDK Service1.
[18.03.12 13:23:45] Getting device ip. No device for interface=Sony Ericsson Device 1039 USB Ethernet Emulation (NDIS 5) - Sterownik miniport Harmonogramu pakietów
It actually looks like the interface is never assigned the correct IP. I've tried assigning IP manually, but it failed too (perhaps I did it incorrectly - the documentation is not really verbose here).
Any idea what I do wrong? Any success stories with on-device debugging using this particular phone?
I managed to get my Cedar device working on Vista 32-bit SP2:
1. First of all, make sure you're not using jdk7uX (otherwise you have to install MSVC 10 redistributable pack to make SEMC_SDK_Service start properly).
2. Edit SDK_Root/OnDeviceDebug/lib/sdkme.properties, set ipprovider.rebindOnConnect: true
(it's false by default), then uncomment and set proxy.device.ip: 192.168.8.2 and proxy.local.ip: 192.168.8.1 (both are commented out and empty by default)
3. Run SDK_Root/OnDeviceDebug/bin/restart_service.cmd
4. (Re)connect your Cedar device
5. Wait about a minute
6. Run SDK_Root/OnDeviceDebug/bin/restart_service.cmd
7. Run arp -a in console and ensure your interface is using 192.168.8.*, this could also take about a minute
8. Restart connection proxy and connect to your phone, everything should be OK
9. You should repeat steps 4-8 after each Windows start