Communicate over serial port options?

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
I have a dell compellant sc200 disk array, and I'm trying to communicate with it over serial. I can send commands with echo, but I can't get a true serial console connection. Truenas Scale doesn't have screen, minicom, cu, putty, tip... or any other program that I could find. Using cat to view the output from a different terminal causes a gibberish loop.

root@zion[~]# cat /dev/ttyS1
_sh
unknown_cmd -> cmd:t0.1.03.000 args:4

12Pack.Slot0.1.03.000 >tup 20_sh^M^Junknown_cmd -> cmd:t0.1.03.000 args:4^M^J^M^J12Pack.Slot0.1.03.000
unknown_cmd -> cmd:tup args:5

12Pack.Slot0.1.03.000 >tup 20_sh^M^Junknown_cmd -> cmd:t0.1.03.000 args:4^M^J^M^J12Pack.Slot0.1.03.000
unknown_cmd -> cmd:tup args:5

12Pack.Slot0.1.03.000 >M^Junknown_cmd -> cmd:tup args:5^M^J^M^J12Pack.Slot0.1.03.000 >tup 20_sh^M^Junkn
unknown_cmd -> cmd:M^Junknown_cmd args:6

12Pack.Slot0.1.03.000 >wn_cmd -> cmd:t0.1.03.000 args:4^M^J^M^J12Pack.Slot0.1.03.000 ^M^Junknown_cmd ->
unknown_cmd -> cmd:wn_cmd args:6

12Pack.Slot0.1.03.000 >cmd:tup args:5^M^J^M^J12Pack.Slot0.1.03.000 >M^Junknown_cmd -> cmd:tup args:5^M^
unknown_cmd -> cmd:cmd:tup args:6
Any suggestions?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Any suggestions?
Maybe find a docker container that provides what you want and run it as an app? (privileged if necessary to hit the hardware/dev)
 

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
Thanks for the suggestion.

I'm sure that could/would work, but it seems an excessive solution to such a simple problem.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Sounds like this would be worth a feature request, most of those are included in Core.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You could use a network attached serial terminal server... of course, those cost a bit of coin. I picked up a 2 port model late last year to replace a very old one, (that still worked). Took me a while to get the SSH access working, (had to use, horror of horrors, "telnet"!, until then). It does not like my SSH key because it's too large :-(, but password authentication does work. I'd probably been better off with a different model that cost a bit more, though it also has more features.

At other jobs we had 32 / 48 port serial terminal servers. Either from Avocent, (which is now owned by Vertiv), or Lantronix.

In my case, this is the console to my home media server. It does not have IPMI :-(.
 
Last edited:

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
That is an even more elaborate and expensive option to my simple problem.
This is for my measley homelab consisting of a R730, R630, R230, and R430. Thankfully, they all have iDRAC enterprise.
I definitely don't need to tell my wife I spent MORE money on a serial terminal server.
Please see the smirk the entire time I wrote this.... Because it was there.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Why not roll your own terminal server with a Raspberry Pi? Pis are very affordable, and can run a flavor of Debian called Raspbian. You should be able to install all the serial terminals you like.
 

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
I think we're getting far off the goal here.

Let's assume I only had the one server, with a true serial port. That server is running truenas scale bare metal. It shouldn't need a currently priced $60+ pi (or other costly solution) to communicate over serial using a cable I already have.

Again, my server is already connected via serial cable to my disk array. Communication is possible, but extremely limited without the apps I mentioned in my OP. That cable wouldn't work with a pi as it isn't USB.

I do appreciate everyone's time and effort. I definitely know I've come up with extremely elaborate solutions to simple problems. In this case, I'm hoping for a simple solution to an extremely simple problem.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Alternatively, you could install a Linux Live image to a thumb drive, and boot from the thumb drive to run your serial terminal.

Conceivably, you could also copy the terminal binary off the thumb drive to your boot pool, assuming you have enough space on the thumb drive to include OpenZFS.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
...
Conceivably, you could also copy the terminal binary off the thumb drive to your boot pool, assuming you have enough space on the thumb drive to include OpenZFS.
This is probably the best solution. Their is no real need for TrueNAS SCALE to have a terminal program that supports serial connections.

Simply find a suitable program like Minicom from a recent compatible build, install it on your datapool in a specific location. Then you probably need to write a wrapper script for it, to have local libraries that TN SCALE does not supply. And possibly links to similar versioned libraries.

The last point is one reason I dislike Linux. The constant need to update everything. Some trivial program like Minicom should be pretty stable. But, it may point to newer or older versions of shared object libraries than TN SCALE has. Minicom might not even need newer features, but it's built against what that Linux distro had at the time of that specific release.
 

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
This is probably the best solution. Their is no real need for TrueNAS SCALE to have a terminal program that supports serial connections.

Simply find a suitable program like Minicom from a recent compatible build, install it on your datapool in a specific location. Then you probably need to write a wrapper script for it, to have local libraries that TN SCALE does not supply. And possibly links to similar versioned libraries.

The last point is one reason I dislike Linux. The constant need to update everything. Some trivial program like Minicom should be pretty stable. But, it may point to newer or older versions of shared object libraries than TN SCALE has. Minicom might not even need newer features, but it's built against what that Linux distro had at the time of that specific release.
Ok, but without apt permissions, what's the simplest way?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Perhaps I should have used "copy" instead of "install". So, find a Debian or Ubuntu release, of x64, have it load Minicom if it's not already included. Then copy the binary Minicom, (or what ever you plan to use), over to TN SCALE. Use "ldd" against it to see what SO Libraries it's built against. Any missing ones you need to find on the Debian or Ubuntu release and copy them over. Or possibly create links for ones that TN SCALE has, but different versions.

If you had to copy any SO Libraries over, or make links in the local directory used to install Minicom, then you likely need a wrapper script. This would specify the local directory for LD_LIBRARY_PATH, then the stock one for TN SCALE. Remember, if you put those different libraries or links in the TN SCALE boot pool, any changes may be lost on update of TN SCALE.

I've done this type of work before, and it can work. But it's not trivial to get all the dependencies fixed.

What you are asking for, while reasonable, is generally beyond the scope of this forum. If what I wrote helps, great. Or if someone can help you further, great again. But, I am not in a position to walk you through making this work. Sorry.


Last, if you don't need regular access to the serial port, then you might as well use a Linux live ISO distro. Boot it as needed.
 

Milkysunshine

Dabbler
Joined
Mar 1, 2022
Messages
16
Or, we could simply have one, maybe two of these time tested, well distributed across multiple distro applications available in scale as they were in core?

I need access while truenas is booted and working. A temporary boot image isn't what I'm looking for.

I'm not asking for rocket science here, but it truly feels like it with all the responses. I'm asking to simply live communicate bidirectionally over serial from my truenas server to my disk array. ...a simple process that has happened for umpteen years. I would like to do it without rebooting the truenas server, without needing more hardware, without needing a docker container with privileges, without spending more money, and most importantly, without a headache.

As I said, I can send commands, and I've found I can see basic information with sg utils... But there are things I simply cannot do without a bidirectional serial terminal interface.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
As @Ericloewe said, make the feature request. TrueNAS SCALE is different enough from the FreeBSD based TN Core that things like this are probably not thought of during development.

So, make the feature request, (top of the forum - "Report a Bug");
iXSystems - Jira bug & feature tracker

Then get as many forum members to vote for it. I think you need 10 votes before iXSystems will look at it, (they do this to cut down on the requests that only a few people want).
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Posting the feature request link here is one good way to get people to look at it.

You might see if you can vote for it :smile:.
 
Top