Programmable network diagnostic tools? - bandwidth

Are there any network diagnostics tools available that I can use to measure things like bandwidth.
As such there are a lot of tools which can do this, but I need one that I can embed in my application and program. Environment is WinCE but please list any generic tools also, preferably open source.

Winpcap is a netwok packet capture library for windows which i believe is a port of a *nix library. It is (or was, at one point) used by the network traffic anlyzer Wireshark (a.k.a. Ethereal)
While I'm not certain if the library would work on WinCE, or whether it directly provides what your looking for, it may serve as a framework for any packet analysis that would need to be done in order to facilitate bandwidth use measurement

Related

Flutter and IBM as400

a particular question: is there a direct way to make an AS400 connection or do you have to go through PHP? I don't have to read data on DB2, but do the various commands (wrkactjob, wrksyssts, etc.). Thank you.... sorry for the English.
what I thought (maybe it can't be done) is this: in the app screen there are buttons, each button executes a command (wrkactjob, clroutq, etc.) and the answer occurs in another screen ... I didn't want to write commands directly like on 5250 or telnet
From your referral to typical "health checking" programs, like wrkactjob, and wrksyssts I guess your primary goal is to have an application running on your Android based phone to quickly check the status of a machine from wherever you are. Correct?
Have you considered how to get access to the machine's IP address when you're on the road and not connected to the local WiFi?
You can access this "performance data" through SQL — as John Y pointed out — and display it in whatever for is convenient on your mobile device. But I highly doubt Android provides ODBC infrastructure, even though you might manage to get the correct binary blobs (CPU wise) of the ODBC drivers from IBM botched into Android.
Otherwise you want to create a mechanism to scrape the screen for whatever is displayed, and translate that textual representation into UI elements provided by Flutter, if you want UI elements instead of textual output.
If you already have your doubts that you can't do telnet with Flutter, I think you'll have to learn a lot about Flutter as an SDK before even thinking about how to start developing an application. TCP/IP networking services are a function of the underlying OS and you'll have to go through all the Flutter abstraction layers to eventually be able to build a TCP session. With some luck, there is already code available to handle the telnet protocol peculiarities for you. Perhaps not, then you need to provide telnet negotiation and protocol yourself. This is documented in numerous RFCs. Use Google yourself.
Next point is: You need to establish translation routines for conversion of EBCDIC charset data into ASCII. Because Android is Linux based, you need to learn how to call libc routines like iconv() through Flutter, providing a C interface for charset conversion, including EBCDIC flavors as source/target.
Final point: You need to learn how to interpret the 5250 data stream, and translate the terminal emulator instructions into dynamically place Flutter UI elements at appropriate positions on screen. And of course you need to understand what to send back to IBM i to make it understand your request. The tn5250 data stream is also documented in publicly available RFCs.
There once was a facility called Workstation Gateway in the OS, but as I've found out, it has been removed in V5R2. This might have provided an easier means, because the 5250 data stream was converted on the fly to plain HTML.
Now it's your turn to decide if your goal is worth the apparent effort you're required to go through.
I am not sure what you mean by "direct". Do you mean doing your own socket programming? You could, but there are easier ways to connect.
The most obvious and straightforward choices are probably ODBC, JDBC, HTTP, and SSH.
ODBC and JDBC of course provide an SQL-based interface, and you can use that to issue commands (via the QCMDEXC procedure or scalar function) or access an increasingly comprehensive array of IBM i services.
If what you need still isn't available via SQL, or you simply don't like working in SQL, you could make use of the XMLSERVICE library, which provides its own programming interface "on top of" any of the connection types mentioned above. Despite all the instructions for building from source, normally this should already be installed on your IBM i. There are higher-level wrappers for XMLSERVICE in several programming languages (.NET, Node.js, PHP, Python, Ruby, and Swift), but as of this writing, not Dart. I am not familiar with Flutter, but I imagine you could use the JavaScript interop package to work with the Node.js wrapper.

Is it required to use an OPC Server to Communicate with Controllogix?

I'm wondering if for simply communicating with a PLC, like reading and writing tags, do I need all of the other heavy lifting that comes with an OPC-UA server?
I've tried writing a simple server in Python that talks to the PLC, but I get denied when requesting information from the PLC.
The Controllogix PLC I'm attempting to communicate with uses Ethernet/IP to communicate, so why doesn't a simple server/client script work? What is required exactly to communicate with an Allen Bradley PLC or PLC's in general?
There is quite a bit required to communicate with a PLC.
Each vendor has a driver, there are firmware compatibility considerations. Different protocols to think about.
OPC-UA makes it a bit more generic, but OPC-UA still has a set of things to work around when setting up communications.
Most of the OPC products I've worked with, needs to have their security adjusted to allow anonymous communication. It's generally bad practice to do this. (A network intrusion would be able to read/write to your automation layer) There is certificate signing and some encryption business that needs to be turned off if you're looking for simple communication. (Again, not a good practice but ok for learning)
After all that you have to have a notion of how your PLC is set up on your OPC server, there are channels, devices, namespaces etc. You'll point the OPC client to some opc.tcp://:
If you got this far you're almost done, I'm assuming your OPC server is running and has tags configured at this point. You can use your OPC-UA API to do a read. It can return just the value, or you can get an object back with tag health, timestamp, and a bunch of other data. Depends on the implementation. After that you can do subscriptions, writes...whatever else you need.
TLDR: OPC server not required, but may be the easiest method. Turn off security. (But turn it back on before exposing your control layer to the net)
I am also a little late to this conversation. If you are interested in coding your own solutions and don't want to use any of the commercially available standards, AdvancedHMI is a "mostly" open source solution written in VB.NET which is 100% free and provides communications to many different PLCs including the ControlLogix platform. Since I see you are programming in Python you may also be interested to know that the project does work under Mono on the Linux OS. I have used it to write gateways between EthernetIP and ModbusTCP and to pull data serially from OEM devices and push this data to a CLX PLC.
The forum is full of many helpful hints and is very active and supported.
Just trying to give you another option. DDE, NetDDE, FastDDE, OPC, DCOM, Suitelink.... These are all good, but mostly a pay to play adventure. As a programmer, it seems ridiculous to have to pay such an excessive amount of money just to talk to my hardware, IMHO. Sorry for the rant. Have Fun!
Update - Just wanted to also suggest the following open source project written in python:
https://github.com/dmroeder/pylogix
I have used this to write small programs for communicating with CompactLogix and ControlLogix. (Even to/from a RaspberryPi!)
Depends on several factors, if you want something simple to program you can opt for Modbus/TCP I think some AB PLC supports it without extra hardware.
However if you want something with more security for example for industrial use then OPC UA would be better choice but the programming has a complexity far higher than Modbus, even using the libraries of OPC Foundation or others. There is the option of using a commercial or free (if any) OPC UA server to save work, then you will need to program the client side only.
With Ethernet/IP it should also be possible, but the problem is that there is no clear specification and even different AB models talk different Ethernet/IP dialect ! , it is also far more complex to program than Modbus.
I am a little late to this discussion, but there are a couple commercial tools that make this a bit easier. The one that comes to mind for me when you say you are using python is Cogent's data hub. It is certainly not the cheapest tool out there, but they have already done all of the heavy lifting for PLC/PC communications & security.
If trying to read CLX data using Python, there are several open source implementations that will save you a lot of work. Such as this:
https://github.com/dmroeder/pylogix
If you use .NET and Visual Studio, you can use AdvancedHMI
to be able to read and write OPC Tags to ControlLogix platform is done via its communication Driver RSLinx. RSLinx acts as an OPC Server, it will need to be configured to communicate with the PLC and run on a networked PC on the same LAN. Several flavours of RSLinx are available (for WAN/VLAN also) but essentially this is the communications driver you need to talk to AB PLC's

FTDI differences between VCP and D2XX

I have a FTDI FT232R device and am currently trying to figure out whether to use VCP or D2XX. I've read a little about the pros and cons of both, but am still unable to determine which one to use for this project. Since I am going to use Linux for this project, is it even worth the extra effort to use D2XX? Any kind of help or information would be appreciated.
Greetings,
Sparkas
Here what I understood from some reading and experience. This list is not exhaustive and I hope that I will be able to improve it with the community answers.
VCP
Pros:
Built-in inside the Linux kernel
Cons:
Slower than D2XX? I've being using an FTDI device and its documentation said that there where not using the VCP method because the driver was too slow.
D2XX:
Pros:
More features: For instance one could use the FT_ListDevices() function to get the list of FTDI enabled devices. This function is not available using VCP.
Cons:
You have to embed the FTDI library inside the project
VCP: Is the virtual com port which appear as the legacy comm port port like /dev/ttyUSB0.
D2XX interface is the proprietary interface for the FTDI devices.
D2XX gives much more access to the hardware which are not available by the VCP.
Like working in different mode . Asynchronous , synchronous mode or bit bang mode or writing to the eeprom chip.
References:
http://www.dlpdesign.com/tnt/VCP%20Vs%20D2XX.pdf
http://www.avrfreaks.net/forum/ftdi-high-baudrate

multiple instances of programmable SIP soft phone

I have recently moved to telecom and working on automation framework to automate the VoIP phone.
In current framework, for a simple call/conference scenario, additional helper phones are being used. The current framework configure these additional physical helper phones which takes considerable time and consumption of resources.
I am trying to replace these physical helper phones with the programmable soft phones, so that the test execution will be little bit fast.
Please let us know if this can be possible.
I am not looking for GUI-based soft SIP client because automating the UI actions will be another challenge and prone to error.
This framework is being developed in Perl
Your help will be highly appreciated!!
Take a look at SIPp. http://sipp.sourceforge.net/
I think it will do what you want, it even has some handling of RTP data.
If perl is not a strict requirement, the KitCAT framework is extremely (Java) developer-friendly. Test cases are written in JUnit, for ease of integration with other tools. It provides logs at varying levels (including SIP messages), and supports multiple user agents, which can all be coordinated within a test case. (The latter is not well supported in other SIP testing tools, such as sipp). It also provides coordination with other protocols (e.g., RTP, HTTP).
There is a (somewhat dated) screencast that shows installation and basic usage of the tool.

Any good library or software for queue networks simulation?

I have been trying to make work EZSIM with no luck, which is a software to build discrete event simulators in a graphical DOS environment. In this software, my simulator and many others (of the other people in the course I'm taking) don't work, but teacher's simulator (and examples of the downloaded files) does work.
So, I began to distrust of the software.
Do you know any software that resolves the same kind of problems but really works? It will be good if it is free, or I can download an evaluation copy or something like that.
If you don't know any software, do you know any library which might work? Preferably in C#, Ansi C, Java or Delphi.
This may be more than what you're looking for, but check out NS2. It's the standard for open source network simulations, and will allow you to simulate all kinds of network layer behavior.
I've also used JUNG in the past. It's very flexible, although it also doesn't offer much out of the box.
I used Möbius in my computer systems analysis class. It is free for educational use (which sounds like what you're doing). It's a Java GUI which generates C++ code.
The R package queuecomputer. queuecomputer is a computationally efficient method for simulating queues with arbitrary arrival and service times. There is a submitted paper on arXiv describing the algorithm used in the package. Examples can be found within the arXiv paper and the vignette. A web app based on the package is available at https://ace-ebert.shinyapps.io/queue_simulator_mmk/ .