How to create a virtual serial port on mac - macos

I want to create virtual serial port which can be used to communicate between two application. I had tried with pty/tty pair(pseudoterminal) on mac. It worked also. But what i need it i want to configure it in such a way that other application could find it while doing the serial port search. Here i am stuck.
Does anyone knows how to make this pair confiurable so that they can act as serial port and list down while doing a serial port search.

Related

Adafruit Huzzah32 ESP32 WebSocket and WebServer on the same port

I have a Adafruit Huzzah32. I am using wifi as the transport.
I am trying to get the WebServer and WebSocket to work together. Is there any example of this?
I have tried a couple different libraries, but none of them seem to do both server pages and WS socket handling on the same port.
I can set them up separately, but then I have to use 2 different ports and I would like them to be on the same port.
What you're asking for doesn't make any sense.
Port numbers uniquely identify the service using the TCP connection. They determine how the connection's data is handled. You can't have two different things using one port because the port number is what's used to distinguish between them.
What is it that you're actually trying to accomplish by trying to use the same port number?

How to know a filter device driver is hooked to a com port

I have been trying to determine if a USB serial port (COM) port is monitored by a system bus driver without success. Basically I have an application that monitors a com port via a filter device driver. I was able to do this after reading this article from the Dr Dobb's magazine. Now what am trying to achieve in a seperate app is to be able to determine if there is an app hooked to a particular com port using a filter device driver. Can anyone help or guide me

LAN Port as controller

i need only to get any voltage out from my laptop to control a relay
how to get a signal from a LAN port from any pin ?
in my laptop there is no com Port or lpt Port
also the usb port needs interfacing circuits which is not nessesary
in my simple project
thats why i choosed the LAN Port
i use (visual basic 6)
any help would much appriciated .
While such things as PoE exist, normal ports do not provide any power to external devices. The USB ports are far more likely candidates since they are designed to support powering external devices, though the amount of current supported varies by adapter/hub (most "ports" are actually internal hub ports).

How to open busy serial port (share port) with pyserial

Is it possible open serial port which already in use?
and send data to it
Or create new one and share it for few applications?
I'm trying to avoid use of port pairs (created by windows driver)
I guess you could use an intemediate program like Hyperterminal and sendkeys to it from other apps, ao that Hyperterminal sends them from multiple sources.
Other than a workaround like that I've never heard of a port beng open in more than one program simultaneously.

Can I access the Parallel Port normally when using USB to Parallel Port adapter?

Preliminary story
There is this program which uses the Parallel Port to synchronize with other hardware. It will set the Parallel Port output to a specified (byte) value. This works without problems when using the built-in Parallel Port of a PC. The target platforms are Windows XP to 7, all worked fine so far. Source code is in Delphi, accessible and can be modified.
How it works
In Delphi I can use the io.dll to set the value of the Parallel Port, but there are also other solutions available, like inpout32.dll or port.dll. I call something like PortOut, specify a port number and the byte value and the port is set.
What I now want to do - and where I need help
Now the change: this needs to work on a machine which has no Parallel Port built-in (not even on the mainboard). There are several options available:
use a USB to Parallel Port adapter to add a LPT port to the PC
use a PCI card which adds a LPT port to the PC
use a PCI Express card which adds a LPT port to the PC
I am currently heading for and concentrating on the easiest and cheapest possibility: a USB to Parallel Port adapter.
Main question
There seem to be differences between Parallel Port adapters which are made to connect just a printer and other adapters which seem to be more powerful. Is there really a difference? Or can I just use one of these 5$ printer-adapters, plug in my own hardware and access the port from Delphi code? Or do I need a special adapter? Has anyone experience with this? There is a related question here, but the different adapter types (if existent) are not mentioned there. This page suggests that there are indeed differences:
Contrary to all other USB parallel ports which can connect to printers only, this makes connection to most hardware.
I hope there exists a solution via USB because for this you don't have to open the PC, which means the adapter can be added on demand.
Sub-question
Do you have experience with PCI (Express) solution? I have to use one if the USB approach is not successful.
Since I've been wrestling with this very thing recently here's what I've discovered; If you mean by using IO port addressing (indicated by your reference to inpout32.dll), no. Unless your USB-parallel port driver supports full port emulation or virtualization, which most do not, this is generally not possible. If you need to directly access the port to do normal "bit-twiddling", you should get a separate Parallel port PCI-card. Most of them present themselves as normal IO at the standard address(es). I am presuming you're not planning on using the parallel port to actually communicate with a printer, right?
What is interesting is that USB-Serial adapters are much easier to use since they appear as simple virtual devices where you can merely "open" them using a simple stream; TFileStream.Create("COM1", fmOpenRead) or Windows.CreateFile("COM2", ...);
Here is some devices that purport to do full emulation of a parallel port through USB:
https://www-user.tu-chemnitz.de/~ygu/bastelecke/PC/USB2LPT/index.en.htm

Resources