serial port on laptop with usb adapters - node.js

I was tasked to do a serial port related software and I'm trying to do some initial preparations. I'm using windows 7.
My laptop physically only has USB ports (besides the screen), is it possible to check serial ports like this at all? Will any cable adapters help?
Windows 7 device manager shows nothing is connected to serial ports, which makes sense. However I've written a small application (in node.js) to list the connected serial ports. It lists COM3 as a connected port (though no information on manufacturer or any id). Is there an explanation to this?

To software, a USB-to-RS232 adapter is no different than any other RS232 serial port. It will show up on COM1 or whatever just like a physical port would.
If you have a serial port showing up on your system on COM3, then something is there. It isn't uncommon for RS232 ports to be on the motherboard, but not be exposed externally. Also, if your laptop has a dial-up modem, then this would be on the COM port as well. If you have a cellular radio, these are often on COM ports.

Related

Serial data to multiple serial ports over ethernet

After weeks of research and nothing useful coming up I have to ask this:
Is it possible to send serial signals received on a Linux machine over Ethernet to one or more Linux machine serial port?
This is the setup: One device sends serial signals, one or more computers listen on their serial port for those signals (one way comm), in remote locations. I was looking for old computers with serial ports, running Linux, one for the sender and others for the receivers connected in a VPN, using serial-serial cable connection with clients. I do not want to use virtual ports because the computer(s) listening for serial signals can not be connected to the internet.
Can sound crazy...

Accessing Bluetooth stack on a remote desktop server

I have to get access to Bluetooth on a remote machine.
Here's how things are connected.
External Bluetooth Adapter connected to the client running the Remote desktop application.
The Remote Desktop should identify the device connected to the client since its connected to the USB port, but I am not able to access the Bluetooth stack on the remote desktop.
I just need to get the list of Bluetooth devices which is present near the client to appear on the server. Is it possible to do that ?
The KC-4132 is an embedded Class 1 Bluetooth USB Serial Adapter. This adapter enumerates using FTDI USB-UART bridge chip, so you get a virtual COM port. After sending the kcSerial command "AT Discovery" via COM port to the adapter, it will respond with a listing of all Bluetooth devices currently in range and discoverable. No messy Bluetooth stacks or drivers to interface with since the Bluetooth device is an embedded serial port adapter with its own command language.

Find serial ports on unix systems

I need to develop a service that will actively find new serial devices connected and spin a new thread for that serial device
The main reason is that we have a unix machine (some places a mac, others a linux and some even a raspberryPi). This machine will have many devices connected (external HDDs, Arduino(s) and phones, etc).
The software will look for all serial ports and find the arduinos connected, then it will spin a thread to handle that arduino.
Our problems are:
List only serial devices in any platform
On mac is /dev/tty.(any name here)
On linux is /dev/ttyUSB(#)
Detect only the arduinos
Some devices are listed as ttyUSB and others as ttyModem or even ttyACM
In linux i could create a udev rule, but on mac i didn't find a way
The sigrok project has a subproject called libserialport for finding devices on serial ports on the different operating systems.
http://sigrok.org/wiki/Libserialport

serial programming in vc++ mfc

I am writing two applications one is continuosly listening to "COM3" port and printing data.
When i run other application which should write to that "COM3" port i am getting error serial port does not exist for writing.
can 2 applications open handle to access the same serial COM port in our system at the time
This is not possible, Windows doesn't allow a serial port to be shared between processes. Once one process opens a port, another will get error 5 (access denied) when it tries to open the same port. Serial ports are far too primitive to allow any kind of sharing protocol.
You need a null modem. Either in hardware by using two ports, connect RxD to Txd. Or in software, a device driver that emulates serial ports. Like this one.

how to read from and write to a serial port (ttys0) from another pc via ethernet (eth0) on Ubuntu/Debian?

Well, there are two pc's connected via Wi-Fi and one of those (let's call it A) has a serial port printer (in ttys0) and a measure serial port device (in ttys1) connected too. So B needs to read some values from the mesure device connected on A and then write to the printer connected on A using a network connection.
ser2net is a good solution for this
aptitude install ser2net
Then edit the config in /etc/ser2net.conf
You can then make a tcp connection to a defined port and be connected to the serial port on the remote computer - very useful.
I don't know if Ubuntu has anything built-in, but you could run a couple of daemons using netcat. Of course, if you want it to be secure, you'd need to do a little more work.

Resources