libera/#maemo/ Wednesday, 2021-09-22

ceeneis there a socat like program or library which is BSD-like licensed?08:50
inzProbably not one that would do all, but if there's some specific part of socat you need, then probably yes.08:56
ceeneyeah, I wouldn't need the whole functionality, just something more basic like opening files, tcp connections and maybe serial ports, without anything fancy at all08:58
ceenetruth is, my needs are pretty basic so I could really write it myself, but you know, if there's something already there, why would I write it from scratch?09:02
inznetcat can do unix, udp and tcp sockets09:03
inz(but not serial)09:03
inzAnd you probably want the one from openbsd (unfortunately there is no portable version though)09:06
ceenemmm I think I'm gonna need to write my own thing09:10
ceeneI've just realized I need more than read() and write() over those open descriptors09:10
ceeneI'd like this to also interface with SPI drivers and also some custom rs232-spi converter09:11
inzMaybe you should write multiple things :)09:16
ceeneI don't know exactly what I should write09:17
KotCzarnymultitool09:17
inzReimplement everything!09:17
ceenewe're developing a new signal generator board based on an analog devices chip that is programmed by spi09:17
ceenewe are using it via a custom fpga board too, which has a proper spi controller that will communicate with the chip09:18
ceeneso I program it using spidev's linux interface from userspace09:18
ceenebut this same board, will also be interfaced via a rs232-spi converter, so I won't be able to use spidev interface, but a series of ascii commands that will translate to spi transactions09:19
ceeneso... same device, but interfaced via two different systems09:19
ceenehttps://github.com/agamez/libARTio15:52
ceenewelp15:52
ceenethat's the start of it15:52
ceenethis is going to be a not complete reimplementation of socat in the form of a library15:54
ceeneso totally a different thing lol15:54
ceenebut I'm gonna try to use the same addressing as socat, so this socat's example should work in the end $ socat readline /dev/ttyS0,raw,echo=0,crlf15:55
ceenebut it'll probably be a very simple thing with just a couple of controllers: generic open, serial port, tcp client and the propietary code we use for the rs232-spi converter15:57

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!