Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Serial comm directly from unraid terminal?

Featured Replies

I have a Dell T630 tower server, which has a physical serial port.

I would like to be able to use this port to communicate with my MD1200 disk shelf, for health monitoring and configuration of settings.

Ideally, I'd like to be able to do this using the terminal (or a plugin, VM, whatever) from within unraid, which seems like it should be totally doable.  However, I have thus far been unable to figure out how to get unraid to talk to my T630's serial port.  I've done all sorts of searching, and found somewhat related posts (mostly old) that seem to be asking similar questions, but none are really ever resolved.  I've seen suggestions for using a USB-to-serial adapter, but I'm not really interested in that option, since I already have a specialized (expensive) console cable for my MD1200 that's serial-only. 

 

Anyone have suggestions for method for enabling simple comms between the unraid OS and the serial port?  I'd love to be able to eventually run automated scripts on a timer, but let's walk before we run. :)

  • Community Expert
7 minutes ago, Elmojo said:

I have a Dell T630 tower server, which has a physical serial port.

I would like to be able to use this port to communicate with my MD1200 disk shelf, for health monitoring and configuration of settings.

Ideally, I'd like to be able to do this using the terminal (or a plugin, VM, whatever) from within unraid, which seems like it should be totally doable.  However, I have thus far been unable to figure out how to get unraid to talk to my T630's serial port.  I've done all sorts of searching, and found somewhat related posts (mostly old) that seem to be asking similar questions, but none are really ever resolved.  I've seen suggestions for using a USB-to-serial adapter, but I'm not really interested in that option, since I already have a specialized (expensive) console cable for my MD1200 that's serial-only. 

 

Anyone have suggestions for method for enabling simple comms between the unraid OS and the serial port?  I'd love to be able to eventually run automated scripts on a timer, but let's walk before we run. :)

if detected would show as ttysx device where x is a number Do you have enabled in bios?

  • Author
5 minutes ago, SimonF said:

if detected would show as ttysx device

Detected where, exactly?  Where would I look? 

I do believe it's enabled in BIOS, but I can check if it doesn't show up.  I try not to reboot unless I have to. ;)

  • Author
5 minutes ago, SimonF said:

ls /dev/tty*

Gotcha!

When I run that command in terminal, I get the attached...

Looks like that last column on the right are serial devices, no?

How do I figure out which is the actual serial port?

TTY.jpg

  • Community Expert
1 minute ago, Elmojo said:

Gotcha!

When I run that command in terminal, I get the attached...

Looks like that last column on the right are serial devices, no?

How do I figure out which is the actual serial port?

TTY.jpg

should be ttys0 to 4 for physical s0 is com1 s3 is com4

  • Author

When I run the screen command in terminal, using "screen /dev/ttys0 38400,cs8", I get the response:  "Cannot exec '/dev/ttys0': No such file or directory"

Is that just because the cable is not physically connected at the moment?  I'm not super familiar with how serial comms work.

  • Author
9 minutes ago, SimonF said:

should be ttys0 to 4 for physical s0 is com1 s3 is com4

I'm not sure why it shows so many.  My server only has 1 physical serial port.  Maybe the others are internal headers or something?

  • Community Expert
1 minute ago, Elmojo said:

I'm not sure why it shows so many.  My server only has 1 physical serial port.  Maybe the others are internal headers or something?

sorry needs to be ttyS0 not lower case s

  • Author
1 minute ago, SimonF said:

sorry needs to be ttyS0

Aha!  I see, said the blind man... lol

Now I have a blank screen, which makes sense, since nothing is connected.  I'll check it out after a meeting this evening that I need to go prepare for.

Thanks for the help!  You're always on the ball, SimonF. ;)

 

  • Author

So this is odd...

I opened terminal and tried "screen /dev/ttyS1 38400,cs8", to see if maybe my serial port was just a different ID.

I got the same blank screen with the solid cursor.  However, if I pressed the up arrow (for history), I got all my serial console history from the MD1200!

This tells me that my serial port is ttyS1, and that it does indeed appear to be able to talk to the MD1200, which is great news.

Here's the weird part....

After that first contact, every time I try to connect again, or enter any new commands, the 'conversation' is getting more and more garbled.

I no longer see the standard prompt for the MD1200 console interface (something like Bluedress_1.06.00:), nor can I even type commands at this point.  I can start typing, but then it sort of stutters or freezes and doesn't allow me to complete the commands or execute them.

If I arrow up, and execute past commands, it may or may not work, but the output is increasingly jumbled.

Any idea what's happening?

  • Author
1 hour ago, JonathanM said:

Wrong speed or protocol?

Possible, I guess.  I'm using 38400, which is what I used in putty and it worked fine there.

As for protocol, The thread that discusses how to talk to these MD1200 boxes says it uses the standard 8N1.  However, that's not specifically an option with screen.

The article linked above lists these variables as options...

 

/dev/ttySX: Linux serial port (e.g., /dev/ttyS0 [COM1] )

  • baud_rate: Usually 300, 1200, 9600 (default), 19200, or 115200. This affects transmission as well as receive speed.

  • cs8 or cs7: Specify the transmission of eight (or seven) bits per byte.

  • ixon or -ixon: Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data.

  • ixoff or -ixoff: Enables (or disables) software flow-control for receiving data.

  • istrip or -istrip: Clear (or keep) the eight bit in each received byte.

I'm using the baud rate (38400) and cs8 flags in my string.  That may be incorrect, or incomplete.

Anyone have any ideas?  The folks over at STH have an extensive thread on the MD1200.  It lists the communication as "RS232, 38400-8-n-1", if that helps.

  • 2 weeks later...
  • Author

Any additional thoughts on this?  It feels like I'm really close to having this working...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.