Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8892689
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:04:12+00:00 2026-06-14T23:04:12+00:00

I’m trying to put together a cross-platform application that interfaces with Insteon automation hardware.

  • 0

I’m trying to put together a cross-platform application that interfaces with Insteon automation hardware. In the .Net based examples I’ve found, the System.IO.Ports.SerialPort class is used to read data from both an RS-232 Serial Port based device and a USB Serial Modem. On a Windows platform, the Serial Modems generally get mapped to a virtual COM Port and it’s not to difficult to run down a list, passing in new COM addresses and attempting to figure out which one the USB or Serial device is attached to.

Unfortunately on the Mac, I’m totally out of my element. MonoMac allows me to program in a more comfortable language, but something as low level as talking to hardware is a bit beyond my reach. My initialization code is as follows:

    private void OpenSerialConnection(string comPort)
    {
        _serialPort = new System.IO.Ports.SerialPort("/dev/ttys1", 19200, System.IO.Ports.Parity.None, 8, System.IO.Ports.StopBits.One);
        _serialPort.Encoding = System.Text.Encoding.Default;
        _serialPort.WriteTimeout = 1000;
        _serialPort.DataReceived += OnDataReceived;
        _serialPort.Open();
    }

The “/dev/ttsy1” value which is in place of where the “comPort” variable would go is part of some examples I found that suggest the address might be in the form of /dev/ttys*. After some searching, I discovered that a usb device would likely register as “/dev/tty.usbserial*”, but I’m wondering if there’s a more elegant way if detecting what this value is that I can leverage in Mono rather than instructing a user to go into Terminal and type “ls /dev/tty.*” and type it themselves?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:04:13+00:00Added an answer on June 14, 2026 at 11:04 pm

    I don’t have any personal experience with Mono on the Mac, but I think it’s possible to include and use Objective-C classes in your Mono projects. Assuming that’s the case, take a look at ORSSerialPort. ORSSerialPortManager’s -availablePorts method will give you an array of all the serial ports available on the system. You can also sign up to receive notifications when ports are added/removed, and the library also makes it easy to open a port, configure it, and send and receive data.

    Without something like this, you have to use IOKit to discover ports on the system, and the POSIX APIs for opening, configuring, reading from, and writing to serial ports. IOKit and the POSIX serial port APIs are low(ish) level C APIs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.