How to detect serial port disconnected in linux guest running on vmware player? - vmware-player

It seems to me that when running a linux guest on vmware player, if you disconnect the serial port there is no signal or interrupt. Similarly for connecting. Can anyone confirm this is true or perhaps it is a limitation of the driver I am using (https://github.com/voodootikigod/node-serialport)?

i noticed that when i plugin modem, dmesg showed me that it was detected. maybe you can follow what dmesg shows and find solution, good luck.

Related

DPDK: Zero Tx or Rx packets while runnning TestPMD

I have setup DPDK 20.11. While running the basic TestPMD code, the number of Transmitted packets and received packets are zero. I need help and I am new to this.
I have attached the terminal screenshot of running TestPmd. I would like to know where I am making mistake.
OS: Ubuntu 16.04.6LTS (Xenial Xerus)
Testpmd was provided with no arguments (just gave 'sudo ./dpdk-testpmd' command)
Physical NIC
Firmware Details:
The driver details and NIC firware has been provided in the link
[Edit 1] port info of first port
Port info of second port
Had a live debug on the setup, The physical were not physically connected NIC or switch. In Linux Kernel ethtool the links are down. Hence in DPDK application, we get same message as link Down
Solution: connect the interfaces with either NIC or switch to get ports state up

Use Wireless access point in VMWare

I'm learning some WiFi security stuff, and I have installed Ubuntu in my VMWare Workstation 11 environment. My host OS is Windows 7 which is connected to my home network over Wifi
Now what I need is in the guest OS (i.e. Ubuntu), I should be able to enable Wireless access (so that I can run Wifi network scans etc). I bridged my network and laso used NAT, both of which give me access to my home network via my Host but they appear as wired connections in Ubuntu. As I understand, this is only possible by using a USB WiFi dongle.
I have purchased a USB WiFi dongle now (it should arrive in a couple of days), but I'm not sure how can I get my Ubuntu guest OS to use that USB Wifi adapter while keeping my Host OS on the built-in Wifi adapter.
Do I simple plug in the USB network adapter into my laptop and it will be recognised in Ubuntu or do I need to make some settings in VMware?
Thanks in advance
I got this to work, posting my answer for posterity
I bought a TP Link WN823N USB Wifi adapter.
1) Keep your host Wifi on. Plug in the USB, let it download the drivers
2) Once installed, power on your VM
3) Open VMWare, right click on your VM -> Removable Devices
Here you should see your USB adapter. Select Connect (Disconnect from Host). This will now connect the USB Wifi adapter to your Linux VM and viola - it should just work!
Essentially what this does is the WiFi adapter will be connected to the VM and disconnected from the host, and the host can continue to use the built-in WiFi.

TCP streams on iOS don't show up on a wireless network

I am trying to send and receive TCP streams from an iPad via a wireless connection to a laptop. I create sockets with boost::asio. This project is a port of a data streaming library that I maintain that works quite well on Windows, OSX, and Linux.
I can get the app to send and receive streams to/from other computers on a wired LAN when I run it on the simulator. But, when I target the device itself, I can't see any streams.
As I say, I am communicating via wireless between an iPad and a laptop. I create a wireless network on the laptop and then give the iPad a static IP. The connection appears to be fine, because I can ping the iPad with no packet loss. I have also tried connecting the devices by putting them on the same wireless LAN (although I'm not supposed to use wireless routers at work) and this also does not work.
According to apple, setting up streams like this with NSStream will just work. Maybe there is some permissions magic happening under the hood that I am not doing with my calls to boost::asio functions. In any case, I can't see the streams.
Actually, it turns out the only thing that was wrong was that I needed to set up my routing table so that it pointed multicast to the wireless card:
> sudo route -nv add -net 224.0.0.183 -interface en1
I got the IP from inspecting packets in wireshark -- it is the address that my device is multicasting to in my laptop. Sending works (from device to laptop), receiving is still silent though. This may be something else that needs to be set int the routing table (I really don't understand much at all about multicasting) or else I can fiddle with some config settings with my library.

ping hostnames using avahi # Ubuntu in VMware. No resolving

I'm having a really strange problem. I have 2 virtual machines running ubuntu 11.4 in VMware player. These virtual machines have a bridged connection to my network. Since they use DHCP it would be more easy to let them talk to each other using hostnames instead of IP addresses.
That is where the it becomes a strange situation.
ping 192.168.0.10 //this is machine 1
ping 192.168.0.11 //this is machine 2
both work like a charm
ping machine1.local
ping machine2.local
work great on their own system. but ping machine1.local on machine 2 results in a "ping: unknown host machine1.local"
After trying and checking everything and getting nothing but the local machine in the avahi-browse, I installed wireshark to get to know what's really going on.
I ran wireshark, and then ran avahi-browse. In wireshark I saw all the responses to the MDNS message AND I GOT machine1.local AND machine2.local!!!
GREAT! but when I turned off wireshark the avahi-browse cache went empty again...
Why is it that when I have wireshark on in the virtual machine, the avahi-daemon gets the MDNS messages, and when I turn it off, the messages get lost again...
You may need to switch to the e1000 network adapter to (fully) support multicast. To switch to the e1000, open your vmx file in an editor and find the entry for the virtual ethernet adapters. Change or add this line:
ethernet0.virtualDev = "e1000"
(If you have more than one adapter, change it for each of ethernet0, ethernet1, etc.)
This thread details some of the multicast issues that seem similar to yours:
http://communities.vmware.com/message/1549658
This document describes the various possible virtual adapters and their limitations and capabilities:
http://kb.vmware.com/selfservice/microsites/search.do?cmd=displayKC&externalId=1001805

Is it possible to find out if a VNC connection is active

My application is running on windows XP, a VNC server is also running on the PC. I'd like to find out if someone is currently connected to the VNC server (e.g. to use simpler icons). I'm using UltraVNC.
Is there a simple (preferably documented) way to to this?
EDIT: Apparently someone voted to close because he/she thought this belonged on superuser, so I think I should clarify the question: I need a programmatic solution, preferably in .NET or C++. (This is problem is trivial for a user: just look at the VNC icon in the tray.)
You can use netstat to see if there is an established connection on the port your VNC server is listening on.
try netstat -an | find "ESTABLISHED" | find ":5900" on Windows at the command prompt.
There'll be a line entry for it if someone is connected.
Note: If you're connecting to another server then this search will find that connection too, so pay attention to the presence of the :5900 in the second column from the left since this is the local machine.
check the status of port 5900