Accessing the Installed Drivers - drivers

I am fairly new .. I want to ask
If i can get the installed system drivers of any device/interface card in my Pc and use it in my own applications.
If i can then .. Can anyone tell me if i can use the sematic s7 installed MPI drivers for communication with the Siemens plc with my own application..
I want to use this with c#.net in windows environment

The first question needs more work: the drivers, once installed are already there. There is no concept of "getting" them. You can open a handle to installed drivers to perform various operations, if you know how, and the means to do so differs greatly between different types of drivers.
As for the second question: unless you either have source code or documentation of the driver in question, I doubt it would be possible. Of course, the simplest alternative is to obtain a library from the vendor to access the PLC from an application. The library will hide all the tricky parts of using the driver.

Related

In Linux device drivers what is the difference between mmc, mtd?

MTD memory technology devices is driver part dealing with flash kind of memory.
MMC is also flash memory in it's driver core it also has functions to deal with configuring boot partition. What is the difference between these two in their features and functionality and when to use which driver apis
I am a newbie to linux device driver.
If my customized embedded system hosts embedded linux in the SD/MMC card, do I have to look for and modify the files present in kernel source in the path /drivers/mtd or /drivers/mmc or both to adopt my hardware for functionalities like partitioning the card,formatting the card to required filesystem etc,..? If /drivers/mmc is needed to look for, then inside it /drivers/mmc/host or /drivers/mmc/core is needed for the functionalities related to hosting the OS with my above said needs.
Please anybody clarify my doubt.
This my doubt and not related to any of my experiments

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.

How would I go about making device drivers for my own kernel?

I am making my own operating system for fun. I'm reading and learning a lot from the Intel's 64bit and IA-32 architecture manual which is helpful for developing an operating system.
But one thing that I just can't find anywhere is how to make device drivers. The only posts I can find about device drivers on the internet are about making Linux or Windows drivers. But it's different from making drivers for my own kernel.
Can someone experienced please point me into the right direction, enlighten me where I can learn making my own device drivers for my own operating system?
For a start, simple keyboard or mouse drivers are enough, but I will appreciate anything, be it simple keyboard drivers, or complex network drivers
TL;DR: I need a solid source explaining how to make device drivers for my own kernel. I can't find any and hope that someone have stumbled upon one
(I'm not asking "how to make drivers?", but rather asking "can I have links to books/posts about making drivers?")
All a kernel-mode device driver is, is code executing under the kernel, which is not treated as the "main" kernel image itself - consider it as an "extension" to the main kernel image. On Windows for example, kernel-mode device drivers (which tend to use the *.sys file extension, which is also belonging to the Portable Executable (PE) Format) are treated as modules to ntoskrnl.exe (which is the main kernel image on Windows).
The idea is that your kernel-mode device drivers will have access to routines exported by your main kernel image (e.g. if you want to implement mechanisms like kernel-mode callbacks). You could start by making your own simple format for your kernel to understand, and then you can start implementing export support appropriate for your own file format (for the main kernel image) and import support (for the other kernel-mode software to make use of the APIs which it should have access to, provided by the main kernel image).
You'll have a lot of work to do if you want a good design implementation.

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

Interaction between browser and external hardware?

I'd like to know what are the different ways for a browser to interact with external hardware.
Something important : I have control over the machine. That means I can install addons( firefox, chrome ), and run exes on the machine.
I already have a JAVA program that can communicate with the hardware, and I'd like to know how to expose the interface to the browser. So that's one possibility I'm investigating but I'd like to know if there is any other way I can do it.
Thank you
I had a similar problem. The only ways presented were to either use an addon, or write use a tiny C server that uses HTML as it's GUI.
I know you are using Java, and this thread is C++ related, but the basic principles should still work: link here.
You can expose a COM interface from your java application and use silverlight to talk to it. This is significantly simpler if the desktop application is in .NET. Check out: http://www.wintellect.com/CS/blogs/jprosise/archive/2009/12/14/silverlight-4-s-new-com-automation-support.aspx
HTML5 will have a device element that will allow you to connect external devices. Right now, the only choice you have is using plugins to communicate to external hardware.
You can search about NPAPI (a new api called PPAPI is in the making) that will allow you to create a plugin that communicates to native code to do whatever you want.