Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Thrashing is just virtual crashing.


devel / comp.arch.embedded / Re: Remote COM port

SubjectAuthor
* Remote COM portpozz
+* Re: Remote COM portArthur Erhardt
|`* Re: Remote COM portpozz
| `- Re: Remote COM portArthur Erhardt
+- Re: Remote COM portDavid Brown
+* Re: Remote COM portPaul Rubin
|`- Re: Remote COM portpozz
+- Re: Remote COM portTheo
`- Re: Remote COM portchrisq

1
Remote COM port

<uk1i0s$3m6un$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1709&group=comp.arch.embedded#1709

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.niel.me!news.gegeweb.eu!gegeweb.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Remote COM port
Date: Mon, 27 Nov 2023 08:55:11 +0100
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <uk1i0s$3m6un$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 07:55:08 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c5cb9e7d127660467f95bf96787c3ad6";
logging-data="3873751"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18tCEyS92V6IGtaB2lx+9Vg5ky5RPc//xQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:2RSp5vEJb8Xb6Ec5Rfn8kN9VeTU=
Content-Language: it
 by: pozz - Mon, 27 Nov 2023 07:55 UTC

I have a proprietary device with a RS232 port controlled by a Windows
application that opens a standard COM port.

Now I need to move the device in a remote position with Internet
connection. The user (and the Windows PC) will be in a different position.

I want to develop an embedded Linux box with RS232 port connected to the
device and Internet.

I know there are many commercial solutions, but before I'd search for an
open-source solution, if any. Here the big issue is the virtual COM
driver for Windows.

It's not a one-piece scenario, so it makes sense to develop my embedded
box that solves this problem. Moreover, I would stay generic regarding
RS232 baudrates, parity and so on.

Re: Remote COM port

<ksj2poFqjpqU1@mid.individual.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1710&group=comp.arch.embedded#1710

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet2...@erhardt-net.de (Arthur Erhardt)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: 27 Nov 2023 08:37:12 GMT
Lines: 39
Message-ID: <ksj2poFqjpqU1@mid.individual.net>
References: <uk1i0s$3m6un$1@dont-email.me>
X-Trace: individual.net CrrwCtRUjyVyvL/HVMpHvwc5KU8yOvMm6ZZJm4LaGJc/zbue+g
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:04QQjfcdbRiMyjsSoNv73dOdcQs= sha256:8mdCBJD57Z5nQNrXLA/Q3u0SG615sBXyIr8rXHpD/YM=
X-No-Archive: yes
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/6.2.0-26-generic (x86_64))
 by: Arthur Erhardt - Mon, 27 Nov 2023 08:37 UTC

pozz <pozzugno@gmail.com> wrote:
> I have a proprietary device with a RS232 port controlled by a Windows
> application that opens a standard COM port.

> Now I need to move the device in a remote position with Internet
> connection. The user (and the Windows PC) will be in a different position.

> I want to develop an embedded Linux box with RS232 port connected to the
> device and Internet.

> I know there are many commercial solutions, but before I'd search for an
> open-source solution, if any. Here the big issue is the virtual COM
> driver for Windows.
Two devices would remove the need for any kind of special software on
windows. For the sake of the argument, make it two raspberry pis with
USB to RS232 adapters.

<windows pc.com1> <--> <raspberrypi1.ttyUSB0> <--> internet via your
interface of choice <raspberrypi2.ttyUSB0> <--> <proprietary equipment>

The software you want on the linux systems is socat or netcat and
should be part of any modern distribution, though not installed by
default. For this to work, your windows software shouldn't do
anything fancy with the status lines of RS232.

Any raspberry pi is grossly oversized for the task, so feel free to
search for something smaller and cheaper.

This
https://stackoverflow.com/questions/484740/converting-serial-port-data-to-tcp-ip-in-a-linux-environment
might give some hints concerning how to use the software.

> It's not a one-piece scenario, so it makes sense to develop my embedded
> box that solves this problem. Moreover, I would stay generic regarding
> RS232 baudrates, parity and so on.

--
A. Erhardt

Re: Remote COM port

<uk1kuc$3mohs$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1711&group=comp.arch.embedded#1711

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!newsfeed.endofthelinebbs.com!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: david.br...@hesbynett.no (David Brown)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: Mon, 27 Nov 2023 09:44:59 +0100
Organization: A noiseless patient Spider
Lines: 30
Message-ID: <uk1kuc$3mohs$1@dont-email.me>
References: <uk1i0s$3m6un$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 27 Nov 2023 08:45:00 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="5704c807c812aff9ba3a6d376398dc26";
logging-data="3891772"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/YMLshQr97eTD1NllxALeeox/39q5AMS0="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.11.0
Cancel-Lock: sha1:ebRyoejTw/bSaRizXsbXNshkSQ8=
In-Reply-To: <uk1i0s$3m6un$1@dont-email.me>
Content-Language: en-GB
 by: David Brown - Mon, 27 Nov 2023 08:44 UTC

On 27/11/2023 08:55, pozz wrote:
> I have a proprietary device with a RS232 port controlled by a Windows
> application that opens a standard COM port.
>
> Now I need to move the device in a remote position with Internet
> connection. The user (and the Windows PC) will be in a different position.
>
> I want to develop an embedded Linux box with RS232 port connected to the
> device and Internet.
>
> I know there are many commercial solutions, but before I'd search for an
> open-source solution, if any. Here the big issue is the virtual COM
> driver for Windows.
>
> It's not a one-piece scenario, so it makes sense to develop my embedded
> box that solves this problem. Moreover, I would stay generic regarding
> RS232 baudrates, parity and so on.

If you need to be able to set baud rates from the PC app as though it
were a normal COMs port, then you need to start by finding a virtual COM
driver solution and work from there. On the Linux side, connecting a
tcp/ip port to a serial port should be simple - depending on your needs
it can be anything from a netcat with stdio and stdout redirections, to
a small server program that can handle multiple connections, multiple
ports, etc.

But google first for the virtual comms port or redirector on the Windows
side - that's the hard part. I'd expect the documentation for such
virtual comms ports to come with suggestions for the Linux side.

Re: Remote COM port

<87zfyz5wu9.fsf@nightsong.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1712&group=comp.arch.embedded#1712

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: no.em...@nospam.invalid (Paul Rubin)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: Mon, 27 Nov 2023 02:12:14 -0800
Organization: A noiseless patient Spider
Lines: 10
Message-ID: <87zfyz5wu9.fsf@nightsong.com>
References: <uk1i0s$3m6un$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="afa11cf0c170b0f181820ea4c16a6553";
logging-data="3917244"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19t6yR07MmsP69TElrw9kSL"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Cancel-Lock: sha1:Hb+ctCNwtoOkdJho/PN2QmhuoSM=
sha1:lqga5lIspmoNH8/RR3mt9CdVaLw=
 by: Paul Rubin - Mon, 27 Nov 2023 10:12 UTC

pozz <pozzugno@gmail.com> writes:
> It's not a one-piece scenario, so it makes sense to develop my
> embedded box that solves this problem. Moreover, I would stay generic
> regarding RS232 baudrates, parity and so on.

Do you have a question? Why is a box needed? I've used PySerial in
Python programs on Linux for stuff like that. It communicates ok with
some pretty weird RS232 hardware. The details escape me but I remember
I did have to patch the library for some reason. The patch was pretty
simple and I believe the author merged it.

Re: Remote COM port

<Vsx*r2rwz@news.chiark.greenend.org.uk>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1713&group=comp.arch.embedded#1713

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!newsfeed.xs3.de!callisto.xs3.de!nntp-feed.chiark.greenend.org.uk!ewrotcd!.POSTED.chiark.greenend.org.uk!not-for-mail
From: theom+n...@chiark.greenend.org.uk (Theo)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: 27 Nov 2023 10:58:15 +0000 (GMT)
Organization: University of Cambridge, England
Message-ID: <Vsx*r2rwz@news.chiark.greenend.org.uk>
References: <uk1i0s$3m6un$1@dont-email.me>
Injection-Info: chiark.greenend.org.uk; posting-host="chiark.greenend.org.uk:212.13.197.229";
logging-data="23155"; mail-complaints-to="abuse@chiark.greenend.org.uk"
User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
Originator: theom@chiark.greenend.org.uk ([212.13.197.229])
 by: Theo - Mon, 27 Nov 2023 10:58 UTC

pozz <pozzugno@gmail.com> wrote:
> I know there are many commercial solutions, but before I'd search for an
> open-source solution, if any. Here the big issue is the virtual COM
> driver for Windows.
>
> It's not a one-piece scenario, so it makes sense to develop my embedded
> box that solves this problem. Moreover, I would stay generic regarding
> RS232 baudrates, parity and so on.

So the main problem is not provision of the internet link (which can be done
a dozen ways) but conveyance of the serial port settings?

In other words, it's easy to make a transparent link that sends a fixed
115200 8N1 all day long, but what you want is to pick up that the
application set it to 31250 7E2, send that message to the other end, which
configures its UART to match?

In the latter case you either have to hook into the COM driver to get that
information, or do some detection to try to deduce the settings of the
bitstream the PC is sending you, which is potentially error prone (not sure
how to tell between 7E2 and 8N2, for example).

I note that are open source virtual COM drivers like:
https://com0com.sourceforge.net/
and that has 'com2tcp' which sounds a bit like what you want. The project
is ancient though, so not sure of status on modern Windows.

(once in TCP, I'd tunnel it over SSH port forwarding so you can restrict
access to those with appropriate keys)

Theo

Re: Remote COM port

<uk45av$6esl$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1714&group=comp.arch.embedded#1714

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.nntp4.net!news.hispagatos.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: Tue, 28 Nov 2023 08:37:04 +0100
Organization: A noiseless patient Spider
Lines: 48
Message-ID: <uk45av$6esl$1@dont-email.me>
References: <uk1i0s$3m6un$1@dont-email.me> <ksj2poFqjpqU1@mid.individual.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 07:37:03 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a38b728b4144615cb59d98d42bea631";
logging-data="211861"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zmPw/8DzQROKMpKjLwlwpp2w93ttIU+8="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:5f8tOUlunhc7YYHNqbckqdytrug=
Content-Language: it
In-Reply-To: <ksj2poFqjpqU1@mid.individual.net>
 by: pozz - Tue, 28 Nov 2023 07:37 UTC

Il 27/11/2023 09:37, Arthur Erhardt ha scritto:
> pozz <pozzugno@gmail.com> wrote:
>> I have a proprietary device with a RS232 port controlled by a Windows
>> application that opens a standard COM port.
>
>> Now I need to move the device in a remote position with Internet
>> connection. The user (and the Windows PC) will be in a different position.
>
>> I want to develop an embedded Linux box with RS232 port connected to the
>> device and Internet.
>
>> I know there are many commercial solutions, but before I'd search for an
>> open-source solution, if any. Here the big issue is the virtual COM
>> driver for Windows.
> Two devices would remove the need for any kind of special software on
> windows. For the sake of the argument, make it two raspberry pis with
> USB to RS232 adapters.
>
> <windows pc.com1> <--> <raspberrypi1.ttyUSB0> <--> internet via your
> interface of choice <raspberrypi2.ttyUSB0> <--> <proprietary equipment>
>
> The software you want on the linux systems is socat or netcat and
> should be part of any modern distribution, though not installed by
> default. For this to work, your windows software shouldn't do
> anything fancy with the status lines of RS232.
>
> Any raspberry pi is grossly oversized for the task, so feel free to
> search for something smaller and cheaper.
>
> This
> https://stackoverflow.com/questions/484740/converting-serial-port-data-to-tcp-ip-in-a-linux-environment
> might give some hints concerning how to use the software.

I was thinking about this solution, I see two drawbacks:

* The user PC, that is already connected to Internet, must be equipped
with an additional box that must be connected to Internet

* Linux doesn't know anything about the serial port settings (baudrate,
parity, and so on). The user should know the settings used by the
third-party application and set them in the Linux box.

>> It's not a one-piece scenario, so it makes sense to develop my embedded
>> box that solves this problem. Moreover, I would stay generic regarding
>> RS232 baudrates, parity and so on.
>

Re: Remote COM port

<uk45ec$6esl$2@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1715&group=comp.arch.embedded#1715

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: pozzu...@gmail.com (pozz)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: Tue, 28 Nov 2023 08:38:52 +0100
Organization: A noiseless patient Spider
Lines: 14
Message-ID: <uk45ec$6esl$2@dont-email.me>
References: <uk1i0s$3m6un$1@dont-email.me> <87zfyz5wu9.fsf@nightsong.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 07:38:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2a38b728b4144615cb59d98d42bea631";
logging-data="211861"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX192oWW3XK7yqSsrUMdzD5b6d0mYeXoQhm0="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:6N/n7OwhY07Pi7rVaqDN2fC1VGU=
In-Reply-To: <87zfyz5wu9.fsf@nightsong.com>
Content-Language: it
 by: pozz - Tue, 28 Nov 2023 07:38 UTC

Il 27/11/2023 11:12, Paul Rubin ha scritto:
> pozz <pozzugno@gmail.com> writes:
>> It's not a one-piece scenario, so it makes sense to develop my
>> embedded box that solves this problem. Moreover, I would stay generic
>> regarding RS232 baudrates, parity and so on.
>
> Do you have a question? Why is a box needed? I've used PySerial in
> Python programs on Linux for stuff like that. It communicates ok with
> some pretty weird RS232 hardware. The details escape me but I remember
> I did have to patch the library for some reason. The patch was pretty
> simple and I believe the author merged it.

The application that opens the serial port runs on Windows and can't be
changed.

Re: Remote COM port

<kslp9oFj4asU1@mid.individual.net>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1716&group=comp.arch.embedded#1716

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.samoylyk.net!newsfeed.xs3.de!callisto.xs3.de!weretis.net!feeder8.news.weretis.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From: usenet2...@erhardt-net.de (Arthur Erhardt)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: 28 Nov 2023 09:13:28 GMT
Lines: 50
Message-ID: <kslp9oFj4asU1@mid.individual.net>
References: <uk1i0s$3m6un$1@dont-email.me> <ksj2poFqjpqU1@mid.individual.net> <uk45av$6esl$1@dont-email.me>
X-Trace: individual.net SUA2sZov12UzoJY+kQCsiAeZ4CWmS+X4IL7l4Gfugm9F7Hzbz2
X-Orig-Path: not-for-mail
Cancel-Lock: sha1:n2RmWVjmfyBtpPn3pIbgfH7Czi0= sha256:P8AxkDS1rZyIgRgUI3Ow88f7PsYF/y9jzN3tUAo9OpU=
X-No-Archive: yes
User-Agent: tin/2.6.2-20220130 ("Convalmore") (Linux/6.2.0-26-generic (x86_64))
 by: Arthur Erhardt - Tue, 28 Nov 2023 09:13 UTC

pozz <pozzugno@gmail.com> wrote:
> Il 27/11/2023 09:37, Arthur Erhardt ha scritto:
> > pozz <pozzugno@gmail.com> wrote:
> >> I have a proprietary device with a RS232 port controlled by a Windows
> >> application that opens a standard COM port.
> >
> >> Now I need to move the device in a remote position with Internet
> >> connection. The user (and the Windows PC) will be in a different position.
> >
> >> I want to develop an embedded Linux box with RS232 port connected to the
> >> device and Internet.
> >
> >> I know there are many commercial solutions, but before I'd search for an
> >> open-source solution, if any. Here the big issue is the virtual COM
> >> driver for Windows.
> > Two devices would remove the need for any kind of special software on
> > windows. For the sake of the argument, make it two raspberry pis with
> > USB to RS232 adapters.
> >
> > <windows pc.com1> <--> <raspberrypi1.ttyUSB0> <--> internet via your
> > interface of choice <raspberrypi2.ttyUSB0> <--> <proprietary equipment>
> >
> > The software you want on the linux systems is socat or netcat and
> > should be part of any modern distribution, though not installed by
> > default. For this to work, your windows software shouldn't do
> > anything fancy with the status lines of RS232.
> >
> > Any raspberry pi is grossly oversized for the task, so feel free to
> > search for something smaller and cheaper.
> >
> > This
> > https://stackoverflow.com/questions/484740/converting-serial-port-data-to-tcp-ip-in-a-linux-environment
> > might give some hints concerning how to use the software.

> I was thinking about this solution, I see two drawbacks:

> * The user PC, that is already connected to Internet, must be equipped
> with an additional box that must be connected to Internet

> * Linux doesn't know anything about the serial port settings (baudrate,
> parity, and so on). The user should know the settings used by the
> third-party application and set them in the Linux box.
Very well observed. To overcome these drawbacks, you will need two
pieces of software, one on each end, that communicate the RS232 port
status in addition to RX and TX. I can't help with that, since I
never used or needed a virtual com port driver of that kind.

--
A. Erhardt

Re: Remote COM port

<uk4omq$9hfe$1@dont-email.me>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=1717&group=comp.arch.embedded#1717

 copy link   Newsgroups: comp.arch.embedded
Path: i2pn2.org!i2pn.org!news.1d4.us!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: devz...@nospam.com (chrisq)
Newsgroups: comp.arch.embedded
Subject: Re: Remote COM port
Date: Tue, 28 Nov 2023 13:07:37 +0000
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <uk4omq$9hfe$1@dont-email.me>
References: <uk1i0s$3m6un$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 28 Nov 2023 13:07:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="b368d4f5c3b3ffe751e7d3f568d798dd";
logging-data="312814"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+l2+mlBZRE51KNPCA8AgBM"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:HwwhbMcuDuvJfdkUwg/F6cJKmSA=
Content-Language: en-US
In-Reply-To: <uk1i0s$3m6un$1@dont-email.me>
 by: chrisq - Tue, 28 Nov 2023 13:07 UTC

On 11/27/23 07:55, pozz wrote:
> I have a proprietary device with a RS232 port controlled by a Windows
> application that opens a standard COM port.
>
> Now I need to move the device in a remote position with Internet
> connection. The user (and the Windows PC) will be in a different position.
>
> I want to develop an embedded Linux box with RS232 port connected to the
> device and Internet.
>
> I know there are many commercial solutions, but before I'd search for an
> open-source solution, if any. Here the big issue is the virtual COM
> driver for Windows.
>
> It's not a one-piece scenario, so it makes sense to develop my embedded
> box that solves this problem. Moreover, I would stay generic regarding
> RS232 baudrates, parity and so on.

Why not use a single port terminal server, rs232 <-> lan ?. Used a lot
here in the lab to get serial port kit onto the network. Typical type
is the Patton 2120, though that model has probably been replaced now.
Startech and Moxa build those as well, various types and capabilities,
including windows port compatability

Don't need a complete system to do that, gross overkill...

Chris

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor