On Wed, 30 Dec 2020 16:19:56 +0100, RobertoA wrote:
> The Raspberry4 board has 6 native uart I'm not talking about serial
> ports via usb but uart on the gpio connector of the Raspberry board
> Having to control devices via uart (for example gps receivers,
> electronic scales, etc.) it would be useful to create a device that,
> communicating with the control computer via ethernet, would allow the
> computer to 'see' the virtual com ports, corresponding to the uart of
> the card Raspberry So it will be necessary to program the Raspberry so
> that it has a tcp /
>
Ignore the gpio lines: Just get a standard a USB-serial adapter. Each
supports a single serial line, so get one for each device with a serial
port that you need to connect to the Pi and either plug them directly
into the Pi or, if you run out of USB ports, via a USN connector block.
The ones I've used have all presented a common interface to Linux:
plugging one in on a Pi automatically creates a new serial device, /dev/
ttyUSBnn IIRC, that behaves exactly like one of the predefined serial
ports (/dev/ttynn) that are created at boot time on a PC with builot-in
serial ports. This means that any program using the standard Linux serial
port library routines can read and write to anything connected to your Pi
via a USBserial adapter. It can also set the baud rate, character size,
parity and stop bits.
The last Serial USB adapter I bought came from PicAxe, where they're used
to upload PIC binaries to a PICAXE chip and/or to let the program you
uploaded to the PICAXE chip talk to a program on your Linux box. They
work just fine if that's a Pi too.
PICAXE http://www.picaxe.com/ sell adaptors for £12.49 (VAT incl) +
postage:
https://picaxe.com/hardware/cables/picaxe-usb-download-cable/
I'm certain they're available elsewhere too, but that's where I bought
the last one I needed.
--
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|