Announcement

Collapse
No announcement yet.

Network setup with Ubuntu 22.04 LTS intsalled on RPi4

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

    Network setup with Ubuntu 22.04 LTS intsalled on RPi4

    I installed Ubuntu 22.04 LTS on a RPi4. Installed Ser2net.

    Instead of a ser2met.conf file a ser2net.yaml file was created.

    I did the configuration as follows:

    define: &banner \r\nser2net port \p device \d [\B] (Debian GNU/Linux)\r\n\r\n

    connection: &con0096
    accepter: tcp,2000
    enable: on
    options:
    banner: *banner
    kickolduser: true
    telnet: 600
    connector: serialdev,
    /dev/ttyS0,
    115200n81,local

    In the HomeSeer log there is the following:
    5/24/2023 9:23:06 PM

    Smart Meter P1
    Trace
    SAP:
    5/24/2023 9:23:06 PM

    Smart Meter P1
    Info
    SAP: Connected to 192.168.1.210:2000
    5/24/2023 9:23:06 PM

    Smart Meter P1
    Info
    Initialization of Smart Meter P1 version 4.0.16.0 complete
    5/24/2023 9:23:06 PM

    Smart Meter P1
    Info
    mono version detected: 6.12.0.182 (tarball Tue Jun 14 22:35:00 UTC 2022)

    ​Although the connection is established I will not retreive any data.

    Any idea what to change in the yaml file?

    ---
    John




    #2
    If you use telnet or putty to connect to that ip/port, do you get any data?

    (disable the plugin first so the port is not in use of course)
    stefxx

    Comment


      #3
      Originally posted by stefxx View Post
      If you use telnet or putty to connect to that ip/port, do you get any data?

      (disable the plugin first so the port is not in use of course)
      Need to trouvleshoot further as after using telnet all connections are refused.

      Comment


        #4
        stefxx
        YAML seems to be the way to go in the future. But all connections are refused. Will give up for now.

        Comment


          #5
          Originally posted by stefxx View Post
          If you use telnet or putty to connect to that ip/port, do you get any data?

          (disable the plugin first so the port is not in use of course)
          Seems there is communication however I get the following:

          5/25/2023 10:27:05 AM Thread created
          5/25/2023 10:27:05 AM Thread started
          5/25/2023 10:27:05 AM Connected to 192.168.1.210:2000
          5/25/2023 10:27:05 AM
          5/25/2023 10:27:05 AM Thread ReceiveCallback: Index was outside the bounds of the array.

          Comment


            #6
            Progress!

            Most likely the data is corrupt. Do you get valid data with telnet?
            stefxx

            Comment


              #7
              Originally posted by stefxx View Post
              Progress!

              Most likely the data is corrupt. Do you get valid data with telnet?
              No data with telnet.

              Im affraid that it has to do with the YAML file.

              Code:
              connection: &con0096
                  accepter: tcp,2000
                  enable: on
                  options:
                    banner: *banner
                    kickolduser: true
                    telnet-brk-on-sync: true
                  connector: serialdev,
                            /dev/ttyS0,
                            9600n81,local
              ​

              Comment


                #8
                Originally posted by John245 View Post

                No data with telnet.

                Im affraid that it has to do with the YAML file.

                Code:
                connection: &con0096
                accepter: tcp,2000
                enable: on
                options:
                banner: *banner
                kickolduser: true
                telnet-brk-on-sync: true
                connector: serialdev,
                /dev/ttyS0,
                9600n81,local
                ​
                stefxx
                The workaround (for how long it last) is to use the old configuration format.

                In this case I will get "WARNING: Using old config file. format, this will go away soon. Please switch to the yaml-based format"

                Do you have any idea how to convert between the old format and the new (yaml) format?

                Comment


                  #9
                  I will try to update my ser2net and see if I can get it working with the yaml configuration file, hopefully later today.
                  stefxx

                  Comment


                    #10
                    Originally posted by stefxx View Post
                    I will try to update my ser2net and see if I can get it working with the yaml configuration file, hopefully later today.
                    Hopefully it will update the old config file automatically to yaml when updating sernet.

                    Comment


                      #11
                      Can you show me your ser2net.conf?
                      stefxx

                      Comment


                        #12
                        Originally posted by stefxx View Post
                        Can you show me your ser2net.conf?
                        2000:telnet:600:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner

                        Comment


                          #13
                          Thanks.

                          In the yaml examples you are using ttyS0, but in the conf it is ttyUSB0. Could that be your problem?
                          stefxx

                          Comment


                            #14
                            Originally posted by stefxx View Post
                            Thanks.

                            In the yaml examples you are using ttyS0, but in the conf it is ttyUSB0. Could that be your problem?
                            When I change the yaml to
                            Code:
                            connection: &con0096
                                accepter: tcp,2000
                                enable: on
                                options:
                                  banner: *banner
                                  kickolduser: true
                                  telnet-brk-on-sync: true
                                connector: serialdev,
                                          /dev/ttyUSB0,
                                          115200n81,local
                            ​
                            Also no luck

                            Comment


                              #15
                              Try changing the "accepter" line to "accepter: telnet,2000"

                              accepter "tcp" corresponds to field 2 = "raw" in the old .conf format.

                              Comment

                              Working...
                              X