Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Troubleshooting
  3. Couldn't create a symlink '/dev/ttyMySensorsGateway' to PTY! (17) File exists

Couldn't create a symlink '/dev/ttyMySensorsGateway' to PTY! (17) File exists

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 1.2k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • skywatchS Offline
    skywatchS Offline
    skywatch
    wrote on last edited by skywatch
    #1

    Hi,
    I have an RPi3 with nrf24l01+ directly attached and mysgw 2.2.0-beta.....

    It works for a while (ofetn more than a week), but then crashed and a reboot won't help.
    msygw -d reports...

     $ mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.0-beta
    mysgw: Couldn't create a symlink '/dev/ttyMySensorsGateway' to PTY! (17) File exists
    mysgw: Failed to open serial port.
    
    

    Not really sure how to get this working again? Any ideas out there please?

    1 Reply Last reply
    0
    • skywatchS Offline
      skywatchS Offline
      skywatch
      wrote on last edited by skywatch
      #2

      Anyway, today brings a new mystery for me as I did the following.....

      sudo systemctl daemon-reload
      sudo systemctl restart mysgw.service
      sudo systemctl stop mysgw.service
      sudo systemctl start mysgw.service

      Then to see what was going on....
      tail -f /var/log/syslog

      This showed data, so I connected to the web server (running MyController on the same pi as the MYSGW) and graphs were showing of data received since last night.... It looks like it's all back to normal, except it isn't as I still get exactly the same error message from mysgw -d.

      Weirder still!

      mfalkviddM 1 Reply Last reply
      0
      • skywatchS skywatch

        Anyway, today brings a new mystery for me as I did the following.....

        sudo systemctl daemon-reload
        sudo systemctl restart mysgw.service
        sudo systemctl stop mysgw.service
        sudo systemctl start mysgw.service

        Then to see what was going on....
        tail -f /var/log/syslog

        This showed data, so I connected to the web server (running MyController on the same pi as the MYSGW) and graphs were showing of data received since last night.... It looks like it's all back to normal, except it isn't as I still get exactly the same error message from mysgw -d.

        Weirder still!

        mfalkviddM Offline
        mfalkviddM Offline
        mfalkvidd
        Mod
        wrote on last edited by
        #3

        @skywatch sounds like you are trying to start two instances of mysgw at the same time. The first is started automatically at boot, and when you run sudo systemctl start mysgw.service. Then you try to start one more instance with sudo mysgw -d. The new instance can't create /dev/ttyMySensorsGateway because /dev/ttyMySensorsGateway already exists (it was created by the first instance of mysgw).

        1 Reply Last reply
        0
        • skywatchS Offline
          skywatchS Offline
          skywatch
          wrote on last edited by
          #4

          Aha! - Ok that does make sense :)

          I was mistaken in that I believed that mysgw -d enabled debug, but now realise that in order to do this it starts a new instance of mysgw.

          What I still can't get to the bottom of is what caused the problems in the first place. I suddenly loose all data from nodes but not from internal pi mqtt metrics.

          Over on MyController they think it is because I have nrf24l01+ attached directly to the pi and that people that use an additional arduino to attach the radio module and then HW serial to the pi have not had such problems. Does this seem likely in your experience?

          Thanks :)

          mfalkviddM 1 Reply Last reply
          0
          • skywatchS skywatch

            Aha! - Ok that does make sense :)

            I was mistaken in that I believed that mysgw -d enabled debug, but now realise that in order to do this it starts a new instance of mysgw.

            What I still can't get to the bottom of is what caused the problems in the first place. I suddenly loose all data from nodes but not from internal pi mqtt metrics.

            Over on MyController they think it is because I have nrf24l01+ attached directly to the pi and that people that use an additional arduino to attach the radio module and then HW serial to the pi have not had such problems. Does this seem likely in your experience?

            Thanks :)

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @skywatch the Arduino-based serial gateways are more proven. They have been around for a longer time so more people have tried them.

            But the Raspberry Pi gateway should work. May I suggest that you enable debug logging on the gateway using these instructions? You should then be able to get a clue in /var/log/syslog when/if the gateway stops working again.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            22

            Online

            11.7k

            Users

            11.2k

            Topics

            113.1k

            Posts


            Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • MySensors
            • OpenHardware.io
            • Categories
            • Recent
            • Tags
            • Popular