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. Controllers
  3. Domoticz
  4. Orange Pi ttl serial port [SOLVED]

Orange Pi ttl serial port [SOLVED]

Scheduled Pinned Locked Moved Domoticz
6 Posts 3 Posters 12.6k Views 3 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.
  • dbemowskD Offline
    dbemowskD Offline
    dbemowsk
    wrote on last edited by dbemowsk
    #1

    So I have Domoticz set up on an Orange Pi PC board which has a 3 pin ttl serial port right next to the power connector. I was hoping that I could connect that to my gateway which would free up my USB serial adapter for other uses, not to mention making the setup less bulky. I have two main issues with it.

    First, the port in linux that references it is /dev/ttlS0. When I try to open my serial monitor to use that port, it can't connect to it for some reason. However, if I go to a terminal and type "cat /dev/ttlS0" and reset the gateway, I see the gateway identification data come through.

    Second, when I look at the setup of the gateway in Domoticz, I don't have the option of selecting that serial port. The only port it shows me for a selection is /dev/ttlUSB0, and that is only if I have my USB adapter plugged in. If I unplug that and refresh, I have 0 options in the drop down list for the port selection. Is Domoticz set up to ONLY look at USB serial devices? If so, is there any way I can change that?

    Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
    Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

    mfalkviddM martinhjelmareM 2 Replies Last reply
    0
    • dbemowskD dbemowsk

      So I have Domoticz set up on an Orange Pi PC board which has a 3 pin ttl serial port right next to the power connector. I was hoping that I could connect that to my gateway which would free up my USB serial adapter for other uses, not to mention making the setup less bulky. I have two main issues with it.

      First, the port in linux that references it is /dev/ttlS0. When I try to open my serial monitor to use that port, it can't connect to it for some reason. However, if I go to a terminal and type "cat /dev/ttlS0" and reset the gateway, I see the gateway identification data come through.

      Second, when I look at the setup of the gateway in Domoticz, I don't have the option of selecting that serial port. The only port it shows me for a selection is /dev/ttlUSB0, and that is only if I have my USB adapter plugged in. If I unplug that and refresh, I have 0 options in the drop down list for the port selection. Is Domoticz set up to ONLY look at USB serial devices? If so, is there any way I can change that?

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

      @dbemowsk for the first question, I would look at the permissions on the device (ls -l). Are they different from the device that works?

      For the second question, yes Domoticz only looks at devices named USB*. This is easily solved with a link, see Enable the gateway for ues with Domoticz at https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway (don't forget to edit rc.local)

      dbemowskD 1 Reply Last reply
      0
      • mfalkviddM mfalkvidd

        @dbemowsk for the first question, I would look at the permissions on the device (ls -l). Are they different from the device that works?

        For the second question, yes Domoticz only looks at devices named USB*. This is easily solved with a link, see Enable the gateway for ues with Domoticz at https://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway (don't forget to edit rc.local)

        dbemowskD Offline
        dbemowskD Offline
        dbemowsk
        wrote on last edited by
        #3

        @mfalkvidd OK, we'll try to get through the first part and I think your suggestion for the symbolic link on the second part is going to work just fine. That was something I hadn't thought of.

        Now, as for the first part, looking at ls -l for /dev/ttyS0 vs /dev/ttyUSB0, there are two differences that I see that could affect this. The first is as you mentioned, permissions.
        Crw--w---- for /dev/ttyS0
        Crw-rw---- for /dev/ttyUSB0
        The second issue is that /dev/ttyUSB0 is in the group dialout, but /dev/ttyS0 is in the group tty. So I did 2 things. I added the orangepi user to the tty group with "usermod -a -G tty orangepi". Next I tried to change the permissions for /dev/ttyS0 using "chmod 660 /dev/ttyS0" which did change the permissions, but as soon as I did a restart to get the user groups to update properly, I tried opening the port in CuteCom and it said that I could not open it. I checked the permissions again and it seems that that is something that gets checked and reset on reboot. I am not sure where to look to find where it checks the permissions on that. I could have a shell script that runs on boot that changes it back to the 660 permissions, but I think that is pointless if there is a way to disable the change back in the first place.

        Thanks for the help.

        Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
        Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

        1 Reply Last reply
        0
        • dbemowskD dbemowsk

          So I have Domoticz set up on an Orange Pi PC board which has a 3 pin ttl serial port right next to the power connector. I was hoping that I could connect that to my gateway which would free up my USB serial adapter for other uses, not to mention making the setup less bulky. I have two main issues with it.

          First, the port in linux that references it is /dev/ttlS0. When I try to open my serial monitor to use that port, it can't connect to it for some reason. However, if I go to a terminal and type "cat /dev/ttlS0" and reset the gateway, I see the gateway identification data come through.

          Second, when I look at the setup of the gateway in Domoticz, I don't have the option of selecting that serial port. The only port it shows me for a selection is /dev/ttlUSB0, and that is only if I have my USB adapter plugged in. If I unplug that and refresh, I have 0 options in the drop down list for the port selection. Is Domoticz set up to ONLY look at USB serial devices? If so, is there any way I can change that?

          martinhjelmareM Offline
          martinhjelmareM Offline
          martinhjelmare
          Plugin Developer
          wrote on last edited by martinhjelmare
          #4

          @dbemowsk

          The serial port might be setup for console login. In that case you should disable that to use the port for another program. You can google how to check and do that.

          Then use a udev rule if you want to have persistent change of permissions of the port.

          dbemowskD 1 Reply Last reply
          0
          • martinhjelmareM martinhjelmare

            @dbemowsk

            The serial port might be setup for console login. In that case you should disable that to use the port for another program. You can google how to check and do that.

            Then use a udev rule if you want to have persistent change of permissions of the port.

            dbemowskD Offline
            dbemowskD Offline
            dbemowsk
            wrote on last edited by
            #5

            @martinhjelmare I think I do recall reading something that that port was for console logins. I liked it because it was an easy 3 pin header to connect to. I think /dev/ttyS1 is on the GPIO header. I will look at using that one.

            Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
            Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

            1 Reply Last reply
            0
            • dbemowskD Offline
              dbemowskD Offline
              dbemowsk
              wrote on last edited by
              #6

              So I found that GPIO pins 6, 8 and 10 were /dev/ttyS3. I used the link from @mfalkvidd and did the symbolic link and changed the /etc/rc.local file and I now have everything working in Domoticz on /dev/ttyUSB30. I cannot seem to see the device in CuteCom, but if I need to debug in there I can do it on /dev/ttyS3.

              Thanks for the help guys. you are great.

              Vera Plus running UI7 with MySensors, Sonoffs and 1-Wire devices
              Visit my website for more Bits, Bytes and Ramblings from me: http://dan.bemowski.info/

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


              16

              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