Opened 12 years ago
Closed 11 years ago
#8734 closed enhancement (fixed)
SerialConnect replacement
Reported by: | pulkomandy | Owned by: | pulkomandy |
---|---|---|---|
Priority: | low | Milestone: | R1 |
Component: | Applications | Version: | R1/Development |
Keywords: | Cc: | degea@… | |
Blocked By: | Blocking: | ||
Platform: | All |
Description
BeOS R5 came with SerialConnect. Haiku has no replacement for it.
Moreover, the R5 version uses private APIs and can't be used in Haiku. Possible alternative in the meantime is minicom, but a native GUI app is better.
Attachments (1)
Change History (16)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Well, I use such tools daily both at home and at work. Not with old-fashioned serial ports, but with usb to UART converters. It has uses when working with microcontrollers.
I need it, so I'll work on it anyway. I don't mind moving it to an optional package if others think it's of no use.
comment:3 by , 12 years ago
Cc: | added |
---|
I'll stay tuned to here and TTY ..etc, both for tunetracker (the touchscreen industry's not quite transitioned to USB yet, and there's no transition to speak of re. audio switcher boxes) and for personal reasons (*cough* HP48 *cough*).
follow-up: 5 comment:4 by , 12 years ago
I would certainly use it as well, but I don't think you and me make the typical user :-)
follow-up: 6 comment:5 by , 12 years ago
Replying to axeld:
I would certainly use it as well, but I don't think you and me make the typical user :-)
Some days ago Diver has show me the issue in the AbiWord BugZilla about someone's request for Haiku port. Those guys objected that "all 2 of 3 Haiku users should take care about porting on theirs own force". Well, I just want to say that I'm a third potential user of SerialConnect. So we are going to be 100% of Haiku users in this World. :-D
Well, now going serious. Isn't the SerialConnect just a special flavour of terminal application? May be some additions in the Terminal for creating special kind of TTY window/tab will be enough to have a "native SerialConnect replacement"?
comment:6 by , 12 years ago
Replying to siarzhuk:
Well, now going serious. Isn't the SerialConnect just a special flavour of terminal application? May be some additions in the Terminal for creating special kind of TTY window/tab will be enough to have a "native SerialConnect replacement"?
sort of. If you look at BeOS version, it's easy to notice it started as a copy-paste of Terminal code. However, you still need extra menus (baudrate configuration and so on), and you don't need some of the features (tabs, color profiles). This makes them different enough.
Sure, the main view uses a monospaced font and they both parse ANSI X3.64/ECMA-48 escape sequences. But, the parser for these sequences in our Terminal is quite a mess. So I started porting libvterm (needed some gcc2 compatibility changes) and will try to use it. If it works well, maybe we can use it in Terminal as well.
https://launchpad.net/libvterm
Right now I have the UI set up and a port of libvterm (compiled, not tested yet). I have to build a TermView relying on libvterm for parsing now, and add the BSerialPort based logic.
comment:7 by , 12 years ago
SerialConnect, or something similar in Haiku, would be greatly useful for us at our FM radio station (and I'm sure for other stations). We've been using BeOS with TuneTracker to run our station every day 24/7 for the last eight years now, and will be switching to Haiku very soon. We need to connect a piece of equipment to the Haiku computer via a serial port for the sole purpose of logging incoming ASCII text. Presently we need to use a separate Windows computer running HyperTerminal. The disadvantage of SerialConnect in BeOS is that the text is not automatically written to a text file, but requires manual copy/paste, which is a problem if there is a power failure... all the logged text would be lost.
follow-up: 10 comment:8 by , 12 years ago
For this you actually do not need SerialConnect (which is more or less just a Terminal that connects to the serial interface), but an application like stty to configure the port. Then you can just do a
$ cat /dev/ports/serial/0 > my-log-file
.
Something like this should also work under BeOS. However, Haiku still does not have a working serial driver unless you have a USB serial adapter.
comment:9 by , 12 years ago
just a quick blurb that PulkoMandy pushed his SerialConnect app upstream a few months ago: http://cgit.haiku-os.org/haiku/tree/src/apps/serialconnect
It needs some love but it's a great start :)
comment:10 by , 12 years ago
Replying to axeld:
For this you actually do not need SerialConnect (which is more or less just a Terminal that connects to the serial interface), but an application like stty to configure the port. Then you can just do a
$ cat /dev/ports/serial/0 > my-log-file
.Something like this should also work under BeOS. However, Haiku still does not have a working serial driver unless you have a USB serial adapter.
Hi, thanks for your help. I'm not sure if this is the right venue for getting advice, but I've been testing out a BeOS machine so I can then duplicate it using a USB-Serial adaptor with Haiku. Unfortunately not having any luck. I've searched Google and BeOS documentation extensively for stty commands to figure it out myself first, but can't seem to get it to work. I tried the following:
Connected BeOS and Windows machines using serial ports and null modem, to verify successful connection. Ran SerialConnect on serial port 1 and it received ASCII text fine from Windows. Closed SerialConnect and ran in Terminal: stty 9600 -parenb -cstopb cs8 ; cat < /dev/ports/serial1
But, now no text received from Windows in the BeOS Terminal window. It must be opening the port, because there are no error messages when I run it in Terminal, and I tried running it when SerialConnect is running and it returns an error saying the port is busy. Is there something I'm doing wrong with the Terminal command?
also tried sending ASCII out to Windows HyperTerminal from BeOS, but no luck:
stty 9600 -parenb -cstopb cs8 ; cat > /dev/ports/serial1
Even tried rebooting and running the Terminal commands, but still no go.
comment:11 by , 12 years ago
Sounds like cat et al. are not as device-friendly in BeOS as they are in Haiku.. I remember trying cat (alone, without stty even) in Haiku and having success accessing the serial device at Dane's.. Though the second call would be better off using the "echo" command rather than cat, since in write mode the cat command will just sit there waiting for the user, so rather something like..
stty 9600 -parenb -cstopb cs8 ; echo "teststring" > /dev/ports/serial1
But if reading won't work, the above probably won't work either.
Re. not losing the contents of SerialConnect in case of a power failure, maybe (probably?) that window allows access to scripts and the "hey" command, in which case it's easy to write a script that captures the window contents every 10 seconds and writes it to a file.. Get in touch with Dane @ TT systems if interested.
comment:12 by , 12 years ago
Status: | new → in-progress |
---|
comment:13 by , 12 years ago
Hi there, I finished the first run of work on SerialConnect. You can now configure the serial ports and log the output to a file. I'd like if you can test this version and report on it before I add it to the Haiku image.
So here's a zip file for you. This is built usig the gcc2 compiler on a fairly recent Haiku nightly.
comment:14 by , 12 years ago
Wow, I just tried it and it worked GREAT. Connected it with a broadcast switcher device and was able to communicate both ways with it, and log results to a file. Nice work!
comment:15 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | in-progress → closed |
SerialConnect is now available in nightly images.
Given the wide spread use of the serial interface nowadays, I don't think it's worth the effort. Sure it would be nice, but as long as there are alternatives, I wouldn't bother.