How To Use Serial Port Monitor - abap

Hi I created a program let's say using ABAP and I want to monitor the data sent to my serial port (COM port)
Now there are a lot of software out there that can help me monitor this transaction.
But the problem is that the software only built to monitor data send from outside the computer.
For example some device sending data through com port to your pc.
BUT when you send the data from your PC to serial port it will raise an error on PORT is already open.
The way the port monitor software works is first opening the port and the read the data send to the serial port.
The problem happens when my own custom program try to send data to serial port, where I also need to open the port first.
So in order for my program to work then I have to shutdown the serial monitor software (this way I cannot use the monitor program).
But If I turn on the monitor software, then it will open a port that will make my program to become error and cannot open a port (I cannot send any data to serial port).
If I send data using my program without opening a port then it will send nothing.

You need to use com port emulator software. Generally these programs create virtual comport for listening. You application must connect to this virtual port.
Some of these emulator programs can connect virtual port to the real port. So you can get inbound and outbound data.

Related

VB.NET Server Does Not Receive Connection Requests from Remote Clients

VB.NET Server Does Not Receive Connection Requests from Remote Clients
A VB.NET server application does not see connection requests from another client on the network (i.e. with a different IP address). However, it does see connection requests from the client application running on the same computer as the server.
The listening socket is created with the following parameters
System.Net.Sockets.AddressFamily.InterNetwork
System.Net.Sockets.SocketType.Stream
System.Net.Sockets.ProtocolType.IP
We have experimented with the preceding without success.
The endpoint to which the listening socket is bound specifies the local IP address and a specific port number.
The wait-for-connection code is textbook asynchronous:
thelistener.Listen(10)
thelistener.BeginAccept(New System.AsyncCallback(AddressOf targetofaccept), thelistener)
If the client that attempts connection is on the same computer as the listener, then targetofaccept is run successfully. If the client that attempts connection is on some other computer on the network, then targetofaccept is not run.
The behavior occurs for any other client on the network (i.e., not just one).
Thinking that there was some firewall issue, we created VB6 servers and clients using the same addresses and ports. The VB6 server will receive connection requests regardless of the client system.
There is no other issue with communication between clients and the server, as far as we can see. The network architecture has not been modified for a number of years.
We are debugging the code as a VB.NET console application.
Any tips on how to diagnose appreciated.
Before calling Listen() you need to bind your listener socket to the address 0.0.0.0 (in .NET IPAddress.Any) so that it listens to connections from any IP address.
This can be done using the Socket.Bind() method:
Dim listenerEndpoint As New IPEndPoint(IPAddress.Any, <your port>)
thelistener.Bind(listenerEndpoint)
thelistener.Listen(10)
Thank you.
Issue WAS firewall. Fixed by finding exact location of the IDE (devenv.exe), opening "Windows Firewall" in the control panel, selecting "Allow a program or feature through firewall", selecting "Allow another program...", browsing to the exact location and selecting the executable, then ensuring "Home/Work (Private)" column is checked for that "Name".

What might be causing vxworks and windows to ignore eachother

I have a machine that boots (simultaneously) VxWork and Windows 10 IoT.
The hypervisor sets up two virtual Ethernet adapters. I can see that both exist.
The VxWorks VM is sending out UDP packets to the address that the Windows VM has, and there is a service on Windows listening for the packets on the correct port.
If I run Wireshark I can see the packets from VxWorks and they are being sent to the correct place, but the Windows service isn't picking them up.
The Windows service picks up packets if I run a python script to simulate the data to be sent and tell the service to listen to localhost.
What could be going wrong?
It turns out I need to configure the Windows Firewall. I have turned it off for now and the connection is being established.

Pica8 SDN whiteswitch ping from mangement console to host port

I am connecting my controller PC to a Pica8 white switch via the Management port. I can SSH into the switch and ping the controller PC, however I cant ping the hosts through the standard ports. I have created a bridge of the first four ports and have successfully pinged from host to host after I installed a flow that allowed it.
My question is, is there some kind of mechanism separating the controller port from all of the data ports, I would think I should be able to ping from the switch to the hosts.
I'm not sure this answers your question, but before pinging the management port I believe you need to set an IP for it via the console port.
I use minicom per the instructions located here. However, I am using the RJ45 to DB9 adapter cable -> USB Serial port connection. That looks like so.
Unfortunately, that creates a problem with minicom, since the instructions tell you to simply power up the switch and observe the received data. There is actually a little more to it than that. You have to configure minicom's serial port. Fortunately, there is a tech blog that I found very helpful. If you follow the provided instructions, it will walk you through changing ports. Once you modify the port that minicom is listening on (For me it is Port /dev/ttyUSB0), you should be able to configure your management port.

How do I telnet to a specific port on a Windows 8 Consumer Preview machine?

I have been trying to troubleshoot a program that 'listens' on port 7751 for TCP connections. In Windows 7 and before, sometimes I have to enable the port in any firewall software that exists but otherwise it works OK.
In testing on Windows 8 Consumer Preview, my app is unable to start its 'listening' service, and I get the error: "No connection could be made because the target machine actively refused it".
I turned off the Windows Firewall totally, to eliminate it, but the problem still exists (no other security software is installed on this Win8 box).
In order to eliminate my program, I went through the "Turn on/off Windows features" applet in Control Panel, and installed Telnet Server and Client. I have started the Telnet service (and made it automatic), and also added "Everybody" and myself specifically into the TelnetClients local group.
When I run from the command line:
telnet 192.168.100.93 7751
I am told "Could not open connection to the host, on port 7751".
I tried the following:
netstat -an | find /i "listening"
But the port 7751 was not listed (and program that should listen on it was running).
This port is not blocked by the firewall, as it is turned off.
I tried telnet to another port that was listed by the netstat command, and it works OK.
My application connects to the port using the following:
System.Net.Sockets.TcpClient tcpc = new TcpClient();
tcpc.Connect(server, port);
But the .Connect immediately sends it to the
catch(SocketException s)
Which reports the "No connection could be made because the target server actively refused it." Note the "target server" is itself.
My App is a regular Windows Forms app, in C#, which is built by Visual Studio 2005 (.net 2.0) on the Windows 8 box itself...
What am I doing wrong?
EDIT: In answer to the question below, the code which starts the listening is:
private TcpListener tcpL;
IPEndPoint ipEndPoint = new IPEndPoint(ipAddress, Configuration.portNumber);
tcpL = new TcpListener(ipEndPoint);
tcpL.Start();
(ipAddress and Configuration.portNumber are my IP address 192.168.100.93, and 7751 respectively).
This code is within a try/catch and does not go to the catch, so I assume it started OK?
Assuming that the commands you listed are returning valid data and 192.168.100.93 is the IP address of your machine (you could use 127.0.0.1 instead), your client won't be able to connect, as there isn't anything listening on the port.
Is your listening application using TcpClient to listen on a port? If not then the problem is on your listening application, so please show that code instead.

Net.Sockets : PC Portnumber changes dynamically in LAN via (DLINK)router

Hi i am creating server/client application using .net.Sockets something like cybercafe software.
Im following this example on codeproject Simple Socket Chat Program
there is no problem i run it on local pc. But when i run the client in the other pc in network i got a problem.
says :
No connection could be made because the target machine actively refused it.
I tried to use netstat -a on cmd and i found out that the portnumbers of all the p.c on our network always changes.
Is there any way to do it without using portnumber and just hostname or ipaddress only.
I need help...
Thanks in Regards
First, the random port numbers under Local Address in netstat are done so that everything gets a unique local port.
Also, a port is necessary for sockets.
The problem you are having is most likely because the firewall where your server software is located is blocking that port. For Windows 7 (and presumably Vista), you can unblock the port by running WF.msc, going to Inbound Rules on the left, clicking New Rule on the right, and adding a new program or port rule. The rest of the steps should be self-explanatory.