Loading ...
Sorry, an error occurred while loading the content.

aprs_status / perl?

Expand Messages
  • Keith VE7GDH
    I just installed version 3.0 of the aprs_status program from http://irlp.kc6hur.net/downloads/aprs_status-3.0.tgz. However, it looks like it needs perl. Can
    Message 1 of 27 , Apr 9, 2007
    • 0 Attachment
      I just installed version 3.0 of the aprs_status program from
      http://irlp.kc6hur.net/downloads/aprs_status-3.0.tgz. However, it looks like
      it needs perl. Can anyone comment on installing perl on an embedded node, or
      if there is any reason to not install it?

      Keith VE7GDH
      Node 1148
    • David Cameron - IRLP
      perl is huge. The size of perl for slackware and its dependencies is as large as the entire linux system plus IRLP currently on the flash drive. What needs to
      Message 2 of 27 , Apr 9, 2007
      • 0 Attachment
        perl is huge. The size of perl for slackware and its dependencies is as
        large as the entire linux system plus IRLP currently on the flash drive.

        What needs to happen is someone needs to rewrite the APRS status script to
        be a c executable or write it in something other than perl.

        Getting perl onto an embedded node is really not feasible.

        Dave Cameron
        VE7LTD

        On
        Mon, 9 Apr 2007, Keith VE7GDH wrote:

        > I just installed version 3.0 of the aprs_status program from
        > http://irlp.kc6hur.net/downloads/aprs_status-3.0.tgz. However, it looks like
        > it needs perl. Can anyone comment on installing perl on an embedded node, or
        > if there is any reason to not install it?
        >
        > Keith VE7GDH
        > Node 1148
        >
        >
        >
        >
        > Yahoo! Groups Links
        >
        >
        >
        >
      • Randy Hammock
        Guess I ll have to pull out my Unix Network Programming book and see how to rewrite the Perl code in C. ;-) At that point, I d probably redo the whole thing in
        Message 3 of 27 , Apr 9, 2007
        • 0 Attachment
          Guess I'll have to pull out my Unix Network Programming book and see how
          to rewrite the Perl code in C. ;-) At that point, I'd probably redo the
          whole thing in C and scrap the bash. But probably not very soon.

          See ya'll in Vega$

          On Mon, 2007-04-09 at 07:17 -0700, David Cameron - IRLP wrote:
          > perl is huge. The size of perl for slackware and its dependencies is
          > as
          > large as the entire linux system plus IRLP currently on the flash
          > drive.
          >
          > What needs to happen is someone needs to rewrite the APRS status
          > script to
          > be a c executable or write it in something other than perl.
          >
          > Getting perl onto an embedded node is really not feasible.
          >
          > Dave Cameron
          > VE7LTD
          >
          > On
          > Mon, 9 Apr 2007, Keith VE7GDH wrote:
          >
          > > I just installed version 3.0 of the aprs_status program from
          > > http://irlp.kc6hur.net/downloads/aprs_status-3.0.tgz. However, it
          > looks like
          > > it needs perl. Can anyone comment on installing perl on an embedded
          > node, or
          > > if there is any reason to not install it?
          > >
          > > Keith VE7GDH
          > > Node 1148
          > >
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          > >
          >
          >
          >
          >
          --
          Randy Hammock KC6HUR
          IRLP 4494 EchoLink 120688 (KC6HUR-L)
          http://kc6hur.net
          http://irlp.kc6hur.net
        • Keith VE7GDH
          Dave VE7LTD wrote... ... Thanks for the info, but that s really unfortunate. I was looking forward to finally getting the aprs_status script going - hi! It s
          Message 4 of 27 , Apr 9, 2007
          • 0 Attachment
            Dave VE7LTD wrote...

            > perl is huge. The size of perl for slackware and its dependencies is as
            > large as the entire linux system plus IRLP currently on the flash drive.
            >
            > What needs to happen is someone needs to rewrite the APRS status
            > script to be a c executable or write it in something other than perl.
            > Getting perl onto an embedded node is really not feasible.

            Thanks for the info, but that's really unfortunate. I was looking forward to
            finally getting the aprs_status script going - hi! It's too bad there isn't
            a stripped down version of perl minus the dependencies. I'll delete the
            files from my attempted install and wait for an embedded/c executable
            version. To me, this would be an important add-on.

            Keith VE7GDH
            Node 1148
          • David Cameron - IRLP
            Make a list of exactly what the script does, and maybe we can sit down and figure it out in Vegas or something. Doesnt it just report the current node status
            Message 5 of 27 , Apr 9, 2007
            • 0 Attachment
              Make a list of exactly what the script does, and maybe we can sit down
              and figure it out in Vegas or something.

              Doesnt it just report the current node status via the APRS global
              servers?

              Dave Cameron


              On Mon, 9 Apr 2007, Randy Hammock
              wrote:

              > Guess I'll have to pull out my Unix Network Programming book and see how
              > to rewrite the Perl code in C. ;-) At that point, I'd probably redo the
              > whole thing in C and scrap the bash. But probably not very soon.
              >
              > See ya'll in Vega$
              >
              > On Mon, 2007-04-09 at 07:17 -0700, David Cameron - IRLP wrote:
              >> perl is huge. The size of perl for slackware and its dependencies is
              >> as
              >> large as the entire linux system plus IRLP currently on the flash
              >> drive.
              >>
              >> What needs to happen is someone needs to rewrite the APRS status
              >> script to
              >> be a c executable or write it in something other than perl.
              >>
              >> Getting perl onto an embedded node is really not feasible.
              >>
              >> Dave Cameron
              >> VE7LTD
              >>
              >> On
              >> Mon, 9 Apr 2007, Keith VE7GDH wrote:
              >>
              >>> I just installed version 3.0 of the aprs_status program from
              >>> http://irlp.kc6hur.net/downloads/aprs_status-3.0.tgz. However, it
              >> looks like
              >>> it needs perl. Can anyone comment on installing perl on an embedded
              >> node, or
              >>> if there is any reason to not install it?
              >>>
              >>> Keith VE7GDH
              >>> Node 1148
              >>>
              >>>
              >>>
              >>>
              >>> Yahoo! Groups Links
              >>>
              >>>
              >>>
              >>>
              >>
              >>
              >>
              >>
              >
            • Keith VE7GDH
              Randy KC6HUR wrote... ... That would be great! Looking forward to it when you get a chance. Have fun in Las Vegas! Keith VE7GDH Node 1148
              Message 6 of 27 , Apr 9, 2007
              • 0 Attachment
                Randy KC6HUR wrote...

                > Guess I'll have to pull out my Unix Network Programming book and
                > see how to rewrite the Perl code in C.

                That would be great! Looking forward to it when you get a chance. Have fun
                in Las Vegas!

                Keith VE7GDH
                Node 1148
              • Keith VE7GDH
                Dave VE7LTD wrote... ... It creates an APRS object that uses IRLPXXXX for the object name, and includes the frequency, offset and any required tone in the
                Message 7 of 27 , Apr 9, 2007
                • 0 Attachment
                  Dave VE7LTD wrote...

                  > Make a list of exactly what the script does, and maybe we can sit down
                  > and figure it out in Vegas or something. Doesn't it just report the
                  > current node status via the APRS global servers?

                  It creates an APRS object that uses IRLPXXXX for the object name, and
                  includes the frequency, offset and any required tone in the beacon comment,
                  along with the node's status... e.g. LINK CLEAR, CONNECTED TO XXXX etc.
                  and periodically and whenever the status changes, connects to an APRS
                  server and sends the object. That gets it to the APRS-IS. From there, an
                  IGate operator close to the node can choose to gate that particular object
                  out to RF so local APRS users can see the status via APRS. It's especially
                  useful for visitors to the area that might not necessarily know the local
                  node frequency, but handy for all APRS users on RF to see the node's status.

                  Keith VE7GDH
                  Node 1148
                • Nate Duehr
                  ... Won t be in Vegas, but there is a perl compiler, Randy... sick and twisted as that may sound, you can create binaries from Perl code, as long as a few
                  Message 8 of 27 , Apr 10, 2007
                  • 0 Attachment
                    On 4/9/07, Randy Hammock <rhammock@...> wrote:
                    > Guess I'll have to pull out my Unix Network Programming book and see how
                    > to rewrite the Perl code in C. ;-) At that point, I'd probably redo the
                    > whole thing in C and scrap the bash. But probably not very soon.
                    >
                    > See ya'll in Vega$

                    Won't be in Vegas, but there is a perl compiler, Randy... sick and
                    twisted as that may sound, you can create "binaries" from Perl code,
                    as long as a few rules about things that normally would be "figured
                    out at run-time" in a normal perl environment were followed.

                    http://www.perl.com/doc/manual/html/utils/perlcc.html

                    One of our engineers used it to deploy a particular perl script when
                    he realized that the perl libraries he needed were not part of our
                    standard distribution for a product I work on... so he created a
                    monster binary with the libraries compiled in. (The -l flag, I
                    believe) It was HUGE, but it worked.

                    There's more information about the topic than I ever wanted to know here:

                    http://www.oreilly.com/catalog/pperl3/chapter/ch18.html

                    (It also mentions two ways to generate "readable" C code from a perl
                    program where the resulting C code is completely unreadable, but
                    works... and Dave could compile that for the embedded nodes. It comes
                    with a warning that if you attempt to read it, you will probably go
                    blind. GRIN...)

                    Nate WY0X
                  • David Cameron - IRLP
                    From what I can tell, all that is sent to the APRS network is two lines of text. Since this is the case, there is already a nice tool to do this. Can someone
                    Message 9 of 27 , Apr 10, 2007
                    • 0 Attachment
                      From what I can tell, all that is sent to the APRS network is two lines
                      of text. Since this is the case, there is already a nice tool to do
                      this.

                      Can someone run their aprs-status script in DEBUG mode, and send me the
                      info in a private email. It should contain the

                      Callsign
                      Validation number
                      Beacon Text

                      Then I can manipulate the TCP sender to use netcat, and all will be well,
                      without having to use perl or its overhead.

                      Dave Cameron
                      VE7LTD


                      On Tue, 10 Apr 2007, Nate Duehr wrote:

                      > On 4/9/07, Randy Hammock <rhammock@...> wrote:
                      >> Guess I'll have to pull out my Unix Network Programming book and see how
                      >> to rewrite the Perl code in C. ;-) At that point, I'd probably redo the
                      >> whole thing in C and scrap the bash. But probably not very soon.
                      >>
                      >> See ya'll in Vega$
                      >
                      > Won't be in Vegas, but there is a perl compiler, Randy... sick and
                      > twisted as that may sound, you can create "binaries" from Perl code,
                      > as long as a few rules about things that normally would be "figured
                      > out at run-time" in a normal perl environment were followed.
                      >
                      > http://www.perl.com/doc/manual/html/utils/perlcc.html
                      >
                      > One of our engineers used it to deploy a particular perl script when
                      > he realized that the perl libraries he needed were not part of our
                      > standard distribution for a product I work on... so he created a
                      > monster binary with the libraries compiled in. (The -l flag, I
                      > believe) It was HUGE, but it worked.
                      >
                      > There's more information about the topic than I ever wanted to know here:
                      >
                      > http://www.oreilly.com/catalog/pperl3/chapter/ch18.html
                      >
                      > (It also mentions two ways to generate "readable" C code from a perl
                      > program where the resulting C code is completely unreadable, but
                      > works... and Dave could compile that for the embedded nodes. It comes
                      > with a warning that if you attempt to read it, you will probably go
                      > blind. GRIN...)
                      >
                      > Nate WY0X
                      >
                    • Randy Hammock
                      ... That what I did, contacted a local I-Gate operator, and he gates my APRS-IS packets out to the RF world. -- Randy Hammock KC6HUR IRLP 4494 EchoLink 120688
                      Message 10 of 27 , Apr 10, 2007
                      • 0 Attachment
                        On Mon, 2007-04-09 at 10:04 -0700, Keith VE7GDH wrote:
                        > Dave VE7LTD wrote...
                        >
                        > > Make a list of exactly what the script does, and maybe we can sit down
                        > > and figure it out in Vegas or something. Doesn't it just report the
                        > > current node status via the APRS global servers?
                        >
                        > It creates an APRS object that uses IRLPXXXX for the object name, and
                        > includes the frequency, offset and any required tone in the beacon comment,
                        > along with the node's status... e.g. LINK CLEAR, CONNECTED TO XXXX etc.
                        > and periodically and whenever the status changes, connects to an APRS
                        > server and sends the object. That gets it to the APRS-IS. From there, an
                        > IGate operator close to the node can choose to gate that particular object
                        > out to RF so local APRS users can see the status via APRS. It's especially
                        > useful for visitors to the area that might not necessarily know the local
                        > node frequency, but handy for all APRS users on RF to see the node's status.

                        That what I did, contacted a local I-Gate operator, and he gates my
                        APRS-IS packets out to the RF world.

                        --
                        Randy Hammock KC6HUR
                        IRLP 4494 EchoLink 120688 (KC6HUR-L)
                        http://kc6hur.net
                        http://irlp.kc6hur.net
                      • Randy Hammock
                        ... I ll be happy to assist in any way. I an make what ever mods are needed to the aprs_status bash script to work with the new system. I need to do some more
                        Message 11 of 27 , Apr 10, 2007
                        • 0 Attachment
                          On Tue, 2007-04-10 at 08:22 -0700, David Cameron - IRLP wrote:
                          > From what I can tell, all that is sent to the APRS network is two
                          > lines
                          > of text. Since this is the case, there is already a nice tool to do
                          > this.

                          I'll be happy to assist in any way. I an make what ever mods are needed
                          to the aprs_status bash script to work with the new system. I need to do
                          some more testing here now. The APRS2 net has made some changes in the
                          last month. Don't know if I need to make changes to work with the new
                          structure. I was unable to send out any status packet this morning when
                          I did some testing.

                          Dave'e requested info was sent off-line earlier.

                          --
                          Randy Hammock KC6HUR
                          IRLP 4494 EchoLink 120688 (KC6HUR-L)
                          http://kc6hur.net
                          http://irlp.kc6hur.net
                        • Keith VE7GDH
                          Randy KC6HUR wrote... ... I upgraded from the APRS status script from Alan ZL1AMW to your ver 3 script yesterday on node 1147. It seems to be working OK. There
                          Message 12 of 27 , Apr 10, 2007
                          • 0 Attachment
                            Randy KC6HUR wrote...

                            > I was unable to send out any status packet this morning when I did some
                            > testing.

                            I upgraded from the APRS status script from Alan ZL1AMW to your ver 3 script
                            yesterday on node 1147. It seems to be working OK. There were some small
                            differences, such as the hyphen in the object name... IRLP-1147 instead of
                            IRLP1147, and IDLE instead of (I think) Link Clear and so on, but it
                            appeared to be functioning OK when I connected to it and disconnected.

                            I see that I'm replying to the embedded list. Node 1147 is non-embedded.

                            Keith VE7GDH
                            Node 1148
                          • ve7ltd
                            I have provided Randy with a working solution that does not use perl. He should have an updated version 3.01 APRS-STATUS script ready soon. The fix was really
                            Message 13 of 27 , Apr 10, 2007
                            • 0 Attachment
                              I have provided Randy with a working solution that does not use
                              perl. He should have an updated version 3.01 APRS-STATUS script
                              ready soon. The fix was really easy, and uses programs already
                              available on the embedded and all IRLP nodes.

                              Dave Cameron - VE7LTD

                              --- In irlp-embedded@yahoogroups.com, Randy Hammock <rhammock@...>
                              wrote:
                              >
                              > On Tue, 2007-04-10 at 08:22 -0700, David Cameron - IRLP wrote:
                              > > From what I can tell, all that is sent to the APRS network is two
                              > > lines
                              > > of text. Since this is the case, there is already a nice tool to
                              do
                              > > this.
                              >
                              > I'll be happy to assist in any way. I an make what ever mods are
                              needed
                              > to the aprs_status bash script to work with the new system. I need
                              to do
                              > some more testing here now. The APRS2 net has made some changes in
                              the
                              > last month. Don't know if I need to make changes to work with the
                              new
                              > structure. I was unable to send out any status packet this morning
                              when
                              > I did some testing.
                              >
                              > Dave'e requested info was sent off-line earlier.
                              >
                              > --
                              > Randy Hammock KC6HUR
                              > IRLP 4494 EchoLink 120688 (KC6HUR-L)
                              > http://kc6hur.net
                              > http://irlp.kc6hur.net
                              >
                            • David McAnally
                              ... I was experimenting with using the netcat (nc) command. Based on what I got back from verbose mode, NC wants to have matching addresses on DNS
                              Message 14 of 27 , Apr 10, 2007
                              • 0 Attachment
                                On 4/10/07, ve7ltd <dcameron@...> wrote:
                                I have provided Randy with a working solution that does not use
                                perl. He should have an updated version 3.01 APRS-STATUS script
                                ready soon. The fix was really easy, and uses programs already
                                available on the embedded and all IRLP nodes.

                                Dave Cameron - VE7LTD

                                I was experimenting with using the netcat (nc) command.  Based on what I got back from verbose mode, NC wants to have matching addresses on DNS reverse/forward lookups. I didn't find an option to disable that.  It seemed to skip non-matching reverse lookups on IP addresses from the aprs DNS hosts list. 

                                You probably came up with something better, but this is what "seems" to work for me.  I used the -n option and loop through the IP address list from a host lookup.  I replaced the call to the aprs_status_tx.pl script, with a call to this bash function, with the function added to the top of the aprs_status script.

                                (...)

                                [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts
                                source $SCRIPT/common-functions.sh
                                function aprs_status_tx {
                                        # Transmit to aprs server:
                                        server=" rotate.aprs2.net"
                                        port="14580"
                                        call="$1"
                                        passwd="$2"
                                        beacon="$3"
                                        logon="User $call pass $passwd vers IRLP-interface 1\n"
                                        for HOST in `/usr/bin/host -t a rotate.aprs2.net|cut -d' ' -f4`  ; do
                                                echo "$HOST"
                                                echo -ne "$logon$call$beacon\n" | $NETCAT -w2 -v -n $HOST $port
                                                if [ "$?" -eq "0" ] ; then
                                                        break
                                                fi
                                        done
                                }

                                (...)

                                aprs_status_tx "${APRS_CALL}" "${APRS_VALIDATION}" "${BTEXT}"

                                --
                                Regards,
                                David McAnally, WD5M
                              • Randy Hammock
                                ... I basically decided to just let nc do it s thing without scraping the host list. Maybe I ll modify it later for version 4.1. ... -- Randy Hammock KC6HUR
                                Message 15 of 27 , Apr 10, 2007
                                • 0 Attachment
                                  On Tue, 2007-04-10 at 23:50 -0500, David McAnally wrote:
                                  > On 4/10/07, ve7ltd <dcameron@...> wrote:
                                  >
                                  > I have provided Randy with a working solution that does not
                                  > use
                                  > perl. He should have an updated version 3.01 APRS-STATUS
                                  > script
                                  > ready soon. The fix was really easy, and uses programs already
                                  > available on the embedded and all IRLP nodes.
                                  >
                                  > Dave Cameron - VE7LTD
                                  >
                                  > I was experimenting with using the netcat (nc) command. Based on what
                                  > I got back from verbose mode, NC wants to have matching addresses on
                                  > DNS reverse/forward lookups. I didn't find an option to disable that.
                                  > It seemed to skip non-matching reverse lookups on IP addresses from
                                  > the aprs DNS hosts list.
                                  >
                                  > You probably came up with something better, but this is what "seems"
                                  > to work for me. I used the -n option and loop through the IP address
                                  > list from a host lookup. I replaced the call to the aprs_status_tx.pl
                                  > script, with a call to this bash function, with the function added to
                                  > the top of the aprs_status script.
                                  >
                                  > (...)
                                  >
                                  > [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts
                                  > source $SCRIPT/common-functions.sh
                                  > function aprs_status_tx {
                                  > # Transmit to aprs server:
                                  > server="rotate.aprs2.net"
                                  > port="14580"
                                  > call="$1"
                                  > passwd="$2"
                                  > beacon="$3"
                                  > logon="User $call pass $passwd vers IRLP-interface 1\n"
                                  > for HOST in `/usr/bin/host -t a rotate.aprs2.net|cut -d' ' -
                                  > f4` ; do
                                  > echo "$HOST"
                                  > echo -ne "$logon$call$beacon\n" | $NETCAT -w2 -v -n
                                  > $HOST $port
                                  > if [ "$?" -eq "0" ] ; then
                                  > break
                                  > fi
                                  > done
                                  > }
                                  >
                                  > (...)
                                  >
                                  > aprs_status_tx "${APRS_CALL}" "${APRS_VALIDATION}" "${BTEXT}"

                                  I basically decided to just let nc do it's thing without scraping the
                                  host list. Maybe I'll modify it later for version 4.1.

                                  >
                                  > --
                                  > Regards,
                                  > David McAnally, WD5M
                                  >
                                  >
                                  >
                                  --
                                  Randy Hammock KC6HUR
                                  IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                  http://kc6hur.net
                                  http://irlp.kc6hur.net
                                • Randy Hammock
                                  ... I released 4.1 which incorporates the DNS preprocessing. I only used the for loop and changed a few vars to match what I used. -- Randy Hammock KC6HUR
                                  Message 16 of 27 , Apr 10, 2007
                                  • 0 Attachment
                                    On Tue, 2007-04-10 at 23:50 -0500, David McAnally wrote:
                                    > On 4/10/07, ve7ltd <dcameron@...> wrote:
                                    >
                                    > I have provided Randy with a working solution that does not
                                    > use
                                    > perl. He should have an updated version 3.01 APRS-STATUS
                                    > script
                                    > ready soon. The fix was really easy, and uses programs already
                                    > available on the embedded and all IRLP nodes.
                                    >
                                    > Dave Cameron - VE7LTD
                                    >
                                    > I was experimenting with using the netcat (nc) command. Based on what
                                    > I got back from verbose mode, NC wants to have matching addresses on
                                    > DNS reverse/forward lookups. I didn't find an option to disable that.
                                    > It seemed to skip non-matching reverse lookups on IP addresses from
                                    > the aprs DNS hosts list.
                                    >
                                    > You probably came up with something better, but this is what "seems"
                                    > to work for me. I used the -n option and loop through the IP address
                                    > list from a host lookup. I replaced the call to the aprs_status_tx.pl
                                    > script, with a call to this bash function, with the function added to
                                    > the top of the aprs_status script.
                                    >
                                    > (...)
                                    >
                                    > [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts
                                    > source $SCRIPT/common-functions.sh
                                    > function aprs_status_tx {
                                    > # Transmit to aprs server:
                                    > server="rotate.aprs2.net"
                                    > port="14580"
                                    > call="$1"
                                    > passwd="$2"
                                    > beacon="$3"
                                    > logon="User $call pass $passwd vers IRLP-interface 1\n"
                                    > for HOST in `/usr/bin/host -t a rotate.aprs2.net|cut -d' ' -
                                    > f4` ; do
                                    > echo "$HOST"
                                    > echo -ne "$logon$call$beacon\n" | $NETCAT -w2 -v -n
                                    > $HOST $port
                                    > if [ "$?" -eq "0" ] ; then
                                    > break
                                    > fi
                                    > done
                                    > }
                                    >
                                    > (...)
                                    >
                                    > aprs_status_tx "${APRS_CALL}" "${APRS_VALIDATION}" "${BTEXT}"

                                    I released 4.1 which incorporates the DNS preprocessing. I only used the
                                    "for" loop and changed a few vars to match what I used.

                                    --
                                    Randy Hammock KC6HUR
                                    IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                    http://kc6hur.net
                                    http://irlp.kc6hur.net
                                  • Keith VE7GDH
                                    Randy KC6HUR wrote... ... I had ver 4.0 OK but I couldn t get 4.1 to work so I went back to 4.0 until I can get it sorted out. Keith VE7GDH Node 1148
                                    Message 17 of 27 , Apr 11, 2007
                                    • 0 Attachment
                                      Randy KC6HUR wrote...

                                      > I released 4.1 which incorporates the DNS preprocessing. I only
                                      > used the "for" loop and changed a few vars to match what I used.

                                      I had ver 4.0 OK but I couldn't get 4.1 to work so I went back to 4.0 until
                                      I can get it sorted out.

                                      Keith VE7GDH
                                      Node 1148
                                    • dcameron@irlp.net
                                      The program host on embedded nodes is not standard, and this will not work. I don t understand the problem though. What is netcat not doing right? Dave Sent
                                      Message 18 of 27 , Apr 11, 2007
                                      • 0 Attachment
                                        The program "host" on embedded nodes is not standard, and this will not work. I don't understand the problem though. What is netcat not doing right?

                                        Dave
                                        Sent from my BlackBerry device on the Rogers Wireless Network

                                        -----Original Message-----
                                        From: Randy Hammock <rhammock@...>
                                        Date: Tue, 10 Apr 2007 23:23:58
                                        To:irlp-embedded@yahoogroups.com
                                        Subject: Re: [irlp-embedded] Re: aprs_status / perl?

                                        On Tue, 2007-04-10 at 23:50 -0500, David McAnally wrote:
                                        > On 4/10/07, ve7ltd <dcameron@irlp.: <mailto:dcameron%40irlp.net> net> wrote:
                                        >
                                        > I have provided Randy with a working solution that does not
                                        > use
                                        > perl. He should have an updated version 3.01 APRS-STATUS
                                        > script
                                        > ready soon. The fix was really easy, and uses programs already
                                        > available on the embedded and all IRLP nodes.
                                        >
                                        > Dave Cameron - VE7LTD
                                        >
                                        > I was experimenting with using the netcat (nc) command. Based on what
                                        > I got back from verbose mode, NC wants to have matching addresses on
                                        > DNS reverse/forward lookups. I didn't find an option to disable that.
                                        > It seemed to skip non-matching reverse lookups on IP addresses from
                                        > the aprs DNS hosts list.
                                        >
                                        > You probably came up with something better, but this is what "seems"
                                        > to work for me. I used the -n option and loop through the IP address
                                        > list from a host lookup. I replaced the call to the aprs_status_tx.pl
                                        > script, with a call to this bash function, with the function added to
                                        > the top of the aprs_status script.
                                        >
                                        > (...)
                                        >
                                        > [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts
                                        > source $SCRIPT/common-functions.sh
                                        > function aprs_status_tx {
                                        > # Transmit to aprs server:
                                        > server="rotate.aprs2.net"
                                        > port="14580"
                                        > call="$1"
                                        > passwd="$2"
                                        > beacon="$3"
                                        > logon="User $call pass $passwd vers IRLP-interface 1\n"
                                        > for HOST in `/usr/bin/host -t a rotate.aprs2.net|cut -d' ' -
                                        > f4` ; do
                                        > echo "$HOST"
                                        > echo -ne "$logon$call$beacon\n" | $NETCAT -w2 -v -n
                                        > $HOST $port
                                        > if [ "$?" -eq "0" ] ; then
                                        > break
                                        > fi
                                        > done
                                        > }
                                        >
                                        > (...)
                                        >
                                        > aprs_status_tx "${APRS_CALL}" "${APRS_VALIDATION}" "${BTEXT}"

                                        I released 4.1 which incorporates the DNS preprocessing. I only used the
                                        "for" loop and changed a few vars to match what I used.

                                        --
                                        Randy Hammock KC6HUR
                                        IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                        http://kc6hur.: <http://kc6hur.net> net
                                        http://irlp.: <http://irlp.kc6hur.net> kc6hur.net
                                      • Randy Hammock
                                        netcat apparently does reverse DNS. Seems most of the APRS-IS machines are on DSL/Cable connection. netcat does the DNS lookup to get the IP then it does an
                                        Message 19 of 27 , Apr 11, 2007
                                        • 0 Attachment
                                          netcat apparently does reverse DNS. Seems most of the APRS-IS machines
                                          are on DSL/Cable connection. netcat does the DNS lookup to get the IP
                                          then it does an inverse lookup to verify the name and gets the "real"
                                          hostname from the ISP rather than the user registered name for the
                                          address. When it sees the hostname difference, it skips to the next
                                          entry in the rotate list. Skips as many 6 or more servers before finding
                                          a match. The host preprocessing Dave FLY came with allows passing just
                                          the IP to netcat which when in IP number mode (-n) accepts the number
                                          with doing any DNS lookups.

                                          Well, version 4.0 is still up on my server, and can be downloaded. Just
                                          change the 4.1 in the download instructions to 4.0.
                                          On Wed, 2007-04-11 at 13:17 +0000, dcameron@... wrote:
                                          > The program "host" on embedded nodes is not standard, and this will not work. I don't understand the problem though. What is netcat not doing right?
                                          >
                                          > Dave
                                          > Sent from my BlackBerry device on the Rogers Wireless Network
                                          >
                                          > -----Original Message-----
                                          > From: Randy Hammock <rhammock@...>
                                          > Date: Tue, 10 Apr 2007 23:23:58
                                          > To:irlp-embedded@yahoogroups.com
                                          > Subject: Re: [irlp-embedded] Re: aprs_status / perl?
                                          >
                                          > On Tue, 2007-04-10 at 23:50 -0500, David McAnally wrote:
                                          > > On 4/10/07, ve7ltd <dcameron@irlp.: <mailto:dcameron%40irlp.net> net> wrote:
                                          > >
                                          > > I have provided Randy with a working solution that does not
                                          > > use
                                          > > perl. He should have an updated version 3.01 APRS-STATUS
                                          > > script
                                          > > ready soon. The fix was really easy, and uses programs already
                                          > > available on the embedded and all IRLP nodes.
                                          > >
                                          > > Dave Cameron - VE7LTD
                                          > >
                                          > > I was experimenting with using the netcat (nc) command. Based on what
                                          > > I got back from verbose mode, NC wants to have matching addresses on
                                          > > DNS reverse/forward lookups. I didn't find an option to disable that.
                                          > > It seemed to skip non-matching reverse lookups on IP addresses from
                                          > > the aprs DNS hosts list.
                                          > >
                                          > > You probably came up with something better, but this is what "seems"
                                          > > to work for me. I used the -n option and loop through the IP address
                                          > > list from a host lookup. I replaced the call to the aprs_status_tx.pl
                                          > > script, with a call to this bash function, with the function added to
                                          > > the top of the aprs_status script.
                                          > >
                                          > > (...)
                                          > >
                                          > > [ -z "$SCRIPT" ] && SCRIPT=/home/irlp/scripts
                                          > > source $SCRIPT/common-functions.sh
                                          > > function aprs_status_tx {
                                          > > # Transmit to aprs server:
                                          > > server="rotate.aprs2.net"
                                          > > port="14580"
                                          > > call="$1"
                                          > > passwd="$2"
                                          > > beacon="$3"
                                          > > logon="User $call pass $passwd vers IRLP-interface 1\n"
                                          > > for HOST in `/usr/bin/host -t a rotate.aprs2.net|cut -d' ' -
                                          > > f4` ; do
                                          > > echo "$HOST"
                                          > > echo -ne "$logon$call$beacon\n" | $NETCAT -w2 -v -n
                                          > > $HOST $port
                                          > > if [ "$?" -eq "0" ] ; then
                                          > > break
                                          > > fi
                                          > > done
                                          > > }
                                          > >
                                          > > (...)
                                          > >
                                          > > aprs_status_tx "${APRS_CALL}" "${APRS_VALIDATION}" "${BTEXT}"
                                          >
                                          > I released 4.1 which incorporates the DNS preprocessing. I only used the
                                          > "for" loop and changed a few vars to match what I used.
                                          >
                                          > --
                                          > Randy Hammock KC6HUR
                                          > IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                          > http://kc6hur.: <http://kc6hur.net> net
                                          > http://irlp.: <http://irlp.kc6hur.net> kc6hur.net
                                          >
                                          >
                                          >
                                          >
                                          >
                                          > Yahoo! Groups Links
                                          >
                                          >
                                          >
                                          --
                                          Randy Hammock KC6HUR
                                          IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                          http://kc6hur.net
                                          http://irlp.kc6hur.net
                                        • David McAnally
                                          ... I m beginning to wonder of those verbose messages are just warning messages. The 0.7.1 GNU version of NC has continue; statements for similar messages,
                                          Message 20 of 27 , Apr 11, 2007
                                          • 0 Attachment
                                            On 4/11/07, Randy Hammock <rhammock@...> wrote:
                                            netcat apparently does reverse DNS. Seems most of the APRS-IS machines
                                            are on DSL/Cable connection. netcat does the DNS lookup to get the IP
                                            then it does an inverse lookup to verify the name and gets the "real"
                                            hostname from the ISP rather than the user registered name for the
                                            address. When it sees the hostname difference, it skips to the next
                                            entry in the rotate list. Skips as many 6 or more servers before finding
                                            a match. The host preprocessing Dave FLY came with allows passing just
                                            the IP to netcat which when in IP number mode (-n) accepts the number
                                            with doing any DNS lookups.

                                            Well, version 4.0 is still up on my server, and can be downloaded. Just
                                            change the 4.1 in the download instructions to 4.0.
                                            On Wed, 2007-04-11 at 13:17 +0000, dcameron@... wrote:
                                            > The program "host" on embedded nodes is not standard, and this will not work. I don't understand the problem though. What is netcat not doing right?
                                            >
                                            > Dave
                                            > Sent from my BlackBerry device on the Rogers Wireless Network

                                            I'm beginning to wonder of those verbose messages are just warning messages.  The 0.7.1 GNU version of NC has "continue;" statements for similar messages, but I didn't find the exact same text in that code. 

                                            Dave, can you just check the src of NC you use, in network.c and see if this is just a warning message displayed with verbose options?  If so, we can drop the host IP loop method.

                                            --
                                            Regards,
                                            David McAnally, WD5M
                                          • Randy Hammock
                                            ... one where it can do an inverse lookup, does it s thing, then it quits. That s what I saw when using the -v -v option for very verbose output. ... -- Randy
                                            Message 21 of 27 , Apr 11, 2007
                                            • 0 Attachment
                                              On Wed, 2007-04-11 at 14:33 -0500, David McAnally wrote:
                                              > On 4/11/07, Randy Hammock <rhammock@...> wrote:
                                              >
                                              > netcat apparently does reverse DNS. Seems most of the APRS-IS
                                              > machines
                                              > are on DSL/Cable connection. netcat does the DNS lookup to get
                                              > the IP
                                              > then it does an inverse lookup to verify the name and gets the
                                              > "real"
                                              > hostname from the ISP rather than the user registered name for
                                              > the
                                              > address. When it sees the hostname difference, it skips to the
                                              > next
                                              > entry in the rotate list. Skips as many 6 or more servers
                                              > before finding
                                              > a match. The host preprocessing Dave FLY came with allows
                                              > passing just
                                              > the IP to netcat which when in IP number mode (-n) accepts the
                                              > number
                                              > with doing any DNS lookups.
                                              >
                                              > Well, version 4.0 is still up on my server, and can be
                                              > downloaded. Just
                                              > change the 4.1 in the download instructions to 4.0.
                                              > On Wed, 2007-04-11 at 13:17 +0000, dcameron@... wrote:
                                              > > The program "host" on embedded nodes is not standard, and
                                              > this will not work. I don't understand the problem though.
                                              > What is netcat not doing right?
                                              > >
                                              > > Dave
                                              > > Sent from my BlackBerry device on the Rogers Wireless
                                              > Network
                                              >
                                              > I'm beginning to wonder of those verbose messages are just warning
                                              > messages. The 0.7.1 GNU version of NC has "continue;" statements for
                                              > similar messages, but I didn't find the exact same text in that code.

                                              >From what I can tell, nc merrily skips through the list until it finds
                                              one where it can do an inverse lookup, does it's thing, then it quits.
                                              That's what I saw when using the -v -v option for very verbose output.

                                              >
                                              > Dave, can you just check the src of NC you use, in network.c and see
                                              > if this is just a warning message displayed with verbose options? If
                                              > so, we can drop the host IP loop method.
                                              >
                                              > --
                                              > Regards,
                                              > David McAnally, WD5M

                                              --
                                              Randy Hammock KC6HUR
                                              IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                              http://kc6hur.net
                                              http://irlp.kc6hur.net
                                            • David McAnally
                                              ... That is what I thought initially. But when you look up the IP address that nc ends up using, it seems to be the first of those mismatched host names listed
                                              Message 22 of 27 , Apr 11, 2007
                                              • 0 Attachment
                                                On 4/11/07, Randy Hammock <rhammock@...> wrote:
                                                >From what I can tell, nc merrily skips through the list until it finds
                                                one where it can do an inverse lookup, does it's thing, then it quits.
                                                That's what I saw when using the -v -v option for very verbose output.


                                                That is what I thought initially. But when you look up the IP address that nc ends up using, it seems to be the first of those mismatched host names listed from nc.  I think nc is just iterating through the list doing reverse lookups on all of them before it actually tries to connect.  And then it seems to use the first one in the list. 

                                                Since the first attempt usually connects, I haven't seen it try more than one address yet.  Guess I could block some addresses with iptables and see what happens.  I  did run it enough to see it get a different order of addresses from the list at least once, and so connected to a different server.

                                                I see that nc closes the connection with a "net timeout" after sending the message.  Doesn't aprs igate syntax have a "quit" message/command to close the connection?  Maybe not.

                                                Oh well, we've probably filled up enough mailboxes with this off-topic discussion.  I'd suggest we just drop the host lookup loop, until we find out for sure it is needed.

                                                --
                                                Regards,
                                                David McAnally, WD5M
                                              • dcameron@irlp.net
                                                The script uses the installed version of nc, so there is no default version. The host program is all screwy on the embedded nodes. We will have to find a
                                                Message 23 of 27 , Apr 11, 2007
                                                • 0 Attachment
                                                  The script uses the installed version of nc, so there is no default version. The host program is all screwy on the embedded nodes. We will have to find a better solution, or compile something new for the embedded nodes. All embedded nodes have the IS_EMBEDDED flag set to YES.

                                                  Dave Cameron
                                                  Sent from my BlackBerry device on the Rogers Wireless Network

                                                  -----Original Message-----
                                                  From: Randy Hammock <rhammock@...>
                                                  Date: Wed, 11 Apr 2007 17:59:55
                                                  To:irlp-embedded@yahoogroups.com
                                                  Subject: Re: [irlp-embedded] Re: aprs_status / perl?

                                                  On Wed, 2007-04-11 at 14:33 -0500, David McAnally wrote:
                                                  > On 4/11/07, Randy Hammock <rhammock@ca.: <mailto:rhammock%40ca.rr.com> rr.com> wrote:
                                                  >
                                                  > netcat apparently does reverse DNS. Seems most of the APRS-IS
                                                  > machines
                                                  > are on DSL/Cable connection. netcat does the DNS lookup to get
                                                  > the IP
                                                  > then it does an inverse lookup to verify the name and gets the
                                                  > "real"
                                                  > hostname from the ISP rather than the user registered name for
                                                  > the
                                                  > address. When it sees the hostname difference, it skips to the
                                                  > next
                                                  > entry in the rotate list. Skips as many 6 or more servers
                                                  > before finding
                                                  > a match. The host preprocessing Dave FLY came with allows
                                                  > passing just
                                                  > the IP to netcat which when in IP number mode (-n) accepts the
                                                  > number
                                                  > with doing any DNS lookups.
                                                  >
                                                  > Well, version 4.0 is still up on my server, and can be
                                                  > downloaded. Just
                                                  > change the 4.1 in the download instructions to 4.0.
                                                  > On Wed, 2007-04-11 at 13:17 +0000, dcameron@irlp.: <mailto:dcameron%40irlp.net> net wrote:
                                                  > > The program "host" on embedded nodes is not standard, and
                                                  > this will not work. I don't understand the problem though.
                                                  > What is netcat not doing right?
                                                  > >
                                                  > > Dave
                                                  > > Sent from my BlackBerry device on the Rogers Wireless
                                                  > Network
                                                  >
                                                  > I'm beginning to wonder of those verbose messages are just warning
                                                  > messages. The 0.7.1 GNU version of NC has "continue;" statements for
                                                  > similar messages, but I didn't find the exact same text in that code.

                                                  >From what I can tell, nc merrily skips through the list until it finds
                                                  one where it can do an inverse lookup, does it's thing, then it quits.
                                                  That's what I saw when using the -v -v option for very verbose output.

                                                  >
                                                  > Dave, can you just check the src of NC you use, in network.c and see
                                                  > if this is just a warning message displayed with verbose options? If
                                                  > so, we can drop the host IP loop method.
                                                  >
                                                  > --
                                                  > Regards,
                                                  > David McAnally, WD5M

                                                  --
                                                  Randy Hammock KC6HUR
                                                  IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                                  http://kc6hur.: <http://kc6hur.net> net
                                                  http://irlp.: <http://irlp.kc6hur.net> kc6hur.net
                                                • Randy Hammock
                                                  ... I just rolled my site back to the 4.0 version with the host preprocessing. This will work for all nodes. Those who wish to experiment on their own, feel
                                                  Message 24 of 27 , Apr 11, 2007
                                                  • 0 Attachment
                                                    On Thu, 2007-04-12 at 02:19 +0000, dcameron@... wrote:
                                                    > The script uses the installed version of nc, so there is no default version. The host program is all screwy on the embedded nodes. We will have to find a better solution, or compile something new for the embedded nodes. All embedded nodes have the IS_EMBEDDED flag set to YES.

                                                    I just rolled my site back to the 4.0 version with the host
                                                    preprocessing. This will work for all nodes. Those who wish to
                                                    experiment on their own, feel free to do so.

                                                    > Dave Cameron
                                                    > Sent from my BlackBerry device on the Rogers Wireless Network
                                                    >
                                                    > -----Original Message-----
                                                    > From: Randy Hammock <rhammock@...>
                                                    > Date: Wed, 11 Apr 2007 17:59:55
                                                    > To:irlp-embedded@yahoogroups.com
                                                    > Subject: Re: [irlp-embedded] Re: aprs_status / perl?
                                                    >
                                                    > On Wed, 2007-04-11 at 14:33 -0500, David McAnally wrote:
                                                    > > On 4/11/07, Randy Hammock <rhammock@ca.: <mailto:rhammock%40ca.rr.com> rr.com> wrote:
                                                    > >
                                                    > > netcat apparently does reverse DNS. Seems most of the APRS-IS
                                                    > > machines
                                                    > > are on DSL/Cable connection. netcat does the DNS lookup to get
                                                    > > the IP
                                                    > > then it does an inverse lookup to verify the name and gets the
                                                    > > "real"
                                                    > > hostname from the ISP rather than the user registered name for
                                                    > > the
                                                    > > address. When it sees the hostname difference, it skips to the
                                                    > > next
                                                    > > entry in the rotate list. Skips as many 6 or more servers
                                                    > > before finding
                                                    > > a match. The host preprocessing Dave FLY came with allows
                                                    > > passing just
                                                    > > the IP to netcat which when in IP number mode (-n) accepts the
                                                    > > number
                                                    > > with doing any DNS lookups.
                                                    > >
                                                    > > Well, version 4.0 is still up on my server, and can be
                                                    > > downloaded. Just
                                                    > > change the 4.1 in the download instructions to 4.0.
                                                    > > On Wed, 2007-04-11 at 13:17 +0000, dcameron@irlp.: <mailto:dcameron%40irlp.net> net wrote:
                                                    > > > The program "host" on embedded nodes is not standard, and
                                                    > > this will not work. I don't understand the problem though.
                                                    > > What is netcat not doing right?
                                                    > > >
                                                    > > > Dave
                                                    > > > Sent from my BlackBerry device on the Rogers Wireless
                                                    > > Network
                                                    > >
                                                    > > I'm beginning to wonder of those verbose messages are just warning
                                                    > > messages. The 0.7.1 GNU version of NC has "continue;" statements for
                                                    > > similar messages, but I didn't find the exact same text in that code.
                                                    >
                                                    > >From what I can tell, nc merrily skips through the list until it finds
                                                    > one where it can do an inverse lookup, does it's thing, then it quits.
                                                    > That's what I saw when using the -v -v option for very verbose output.
                                                    >
                                                    > >
                                                    > > Dave, can you just check the src of NC you use, in network.c and see
                                                    > > if this is just a warning message displayed with verbose options? If
                                                    > > so, we can drop the host IP loop method.

                                                    --
                                                    Randy Hammock KC6HUR
                                                    IRLP 4494 EchoLink 120688 (KC6HUR-L)
                                                    http://kc6hur.net
                                                    http://irlp.kc6hur.net
                                                  • David McAnally
                                                    ... Ok, I thought I was done. But, after trying this new method on some more nodes, I find that the NC may not disconnect, and may hang the script on some
                                                    Message 25 of 27 , Apr 11, 2007
                                                    • 0 Attachment
                                                      On 4/11/07, dcameron@... <dcameron@...> wrote:
                                                      The script uses the installed version of nc, so there is no default version. The host program is all screwy on the embedded nodes. We will have to find a better solution, or compile something new for the embedded nodes. All embedded nodes have the IS_EMBEDDED flag set to YES.


                                                      Ok, I thought I was done.  But, after trying this new method on some more nodes, I find that the NC may not disconnect, and may hang the script on some nodes.  I have one node on FC5 that does not disconnect after sending the aprs message, even with -w1 timeout flag.  The aprs server sends back time stamp messages periodically, but nc never disconnects.

                                                      That node has a GNU NC version 0.7.1.  Interestingly, that nc version also includes a "-c" option to cause it to close the connection on EOF from stdin.  And that fixes the issue, on that node. 

                                                      Problem is, other nodes may not have that version of nc.  The version in IRLP doesn't have the -c option.  My RH7.3 nodes have nc version 0.6.1, and also don't have the -c option.

                                                      I suspect we will also need to touch a flag or status file in this script, and code to block attempts to run multiple instances of the script at the same time if the status file exists.  Just in case the script hangs. 

                                                      --
                                                      Regards,
                                                      David McAnally, WD5M
                                                    • David McAnally
                                                      ... I compiled GNU NETCAT 0.7.1 on my RH7.3 node. With the new -c disconnect option, that seems to work best. I m about to try it on RH9. It is on
                                                      Message 26 of 27 , Apr 11, 2007
                                                      • 0 Attachment
                                                        On 4/11/07, Randy Hammock <rhammock@...> wrote:
                                                        On Thu, 2007-04-12 at 02:19 +0000, dcameron@... wrote:
                                                        > The script uses the installed version of nc, so there is no default version. The host program is all screwy on the embedded nodes. We will have to find a better solution, or compile something new for the embedded nodes. All embedded nodes have the IS_EMBEDDED flag set to YES.

                                                        I just rolled my site back to the 4.0 version with the host
                                                        preprocessing. This will work for all nodes. Those who wish to
                                                        experiment on their own, feel free to do so.


                                                        I compiled GNU NETCAT 0.7.1 on my RH7.3 node.  With the new -c disconnect option, that seems to work best.  I'm about to try it on RH9.  It is on  sourceforge at <http://netcat.sourceforge.net/ >.

                                                        --
                                                        Regards,
                                                        David McAnally, WD5M
                                                      • David McAnally
                                                        I don t know why, but one of my RH7.3 nodes would not send the APRS packet using NC 0.7.1. The NC program seems to work, but no update appears to be received
                                                        Message 27 of 27 , Apr 12, 2007
                                                        • 0 Attachment
                                                          I don't know why, but one of my RH7.3 nodes would not send the APRS packet using NC 0.7.1.  The NC program seems to work, but no update appears to be received on APRS igate.  Verbose debugging didn't provide any clues either.

                                                          So I left that node running with the PERL for version of aprs_status, until I remembered another possible method.  I don't know if this will end up being the ultimate solution, but this is what I'm using now.

                                                          echo -e "$logon$call$beacon" >/dev/tcp/${server}/${port}

                                                          Always surprising what you find built-in to BASH and other shells.  No need for NC or PERL. 

                                                          I'm just not sure about timeouts on the connection attempts, and the bash manpage is a bit thin on this feature.  Google wasn't much help either.  I'll run it for a while and see what happens.  I'll probably add a lock file to the script to be sure multiple copies of the script don't get executed.

                                                          --
                                                          Regards,
                                                          David McAnally, WD5M
                                                        Your message has been successfully submitted and would be delivered to recipients shortly.