Announcement

Collapse
No announcement yet.

HS3 Linux & Virtual Com ports

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    No worries [emoji851]. When you get that sorted I'd be very keen to see if you can get your plugin to talk to /dev/ttyS99 though or if you get the same error as I.
    Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

    Comment


      #17
      Originally posted by vasrc View Post
      Well spotted
      The plugin should account for that since it looks at the OS, but obviously not. I default to COM1 if there's nothing in the DB, so I'm thinking my OS check is too late. I found a couple other timeout issues as well when switching back and forth from Serial to TCP so I'll need to address them as well.

      Thanks,
      Z
      For what it's worth, fixing the portname gives the same error. It does seem to be an issues between Mono's System.IO and socat. I can manually poll the panel using the socat /dev/ttyS99 link fine, and I can TCP link to the device as well. The IO call always fails.

      Someone did look into the mono serial open call:
      The code we care lives in this place of the source tree: mono/support/serial.c. The open_serial(char*) is defined here and performs a simple call to a system open(), like this: open (devfile, O_RDWR | O_NOCTTY | O_NONBLOCK). open_serial() doesn't check the format of devfile parameter. Maybe that the O_NOCTTY flag enforce a device file and /dev/pts/1 created by socat is not recognized as device file. So the problem comes back to socat: how to run socat in a way that will allow the creation of valid device file?

      Z

      Comment


        #18
        And this is why I'm looking for an alternative to socat, hoping that the the alternative implements the virtual device better.
        Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

        Comment


          #19
          Originally posted by beerygaz View Post
          And this is why I'm looking for an alternative to socat, hoping that the the alternative implements the virtual device better.
          I never found one, so I just added the TCPclient, which is easy to do and has the advantage of not having to mess with an agent (socat), local.rc, manual updates, etc.
          I'm assuming this is for a plugin or program you have access to of course.

          Z

          Comment

          Working...
          X