Announcement

Collapse
No announcement yet.

Airport Express always gets wrong IP

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

    Airport Express always gets wrong IP

    My airport express always shows up in the logs as: 169.254.122.74:5000. It also appears in airplay.ini with this IP as well. This is not correct it has a 10.X.X.X ip address which is confirmed in the Airport utility and by pinging. When including this device as a speaker all other speakers don't function. Can you please make a suggestion as to why this may be?

    #2
    Ok I did a factory reset on the device and it's now functioning correctly.

    Comment


      #3
      Further to this in case anyone else has this error. If the Airport express is not connected to an ip network when booting it seems to supply a 169.254.x.x IP address to the Airplayspeak plugin even when it is connected and is using a valid IP address later. This will confound the plugin and make it unreliable.

      Spud in the interests of making this plugin more solid you could detect this ip address and log an issue to make people aware of the problem.

      The error is reproducible. Let me know if you require further info.

      Comment


        #4
        https://who.is/whois-ip/ip-address/169.254.122.74

        Computers use addresses starting with "169.254." when they do not have a manually configured address or when they are not told which address to use by a service on the network. They are commonly called the "link local" addresses."

        Comment


          #5
          AVAHI returning IP address for Airport Express Eth interface, not the Wifi interface

          I also discovered the wrong IP address being used for AirSpeak on my Raspberry Pi 3b Homseer install. Thinking it was a DNS resolution issue, I did the following:
          • Went into my TimeCapsule (my DHCP server) and created a static IP for the Airport Express of 172.16.40.3
          • I restarted the Airport Express to verify it was being set to 172.16.40.3 (used the AirPort Utility to verify)
          • I even added an /etc/hosts entry on my homeseer computer of:
            • 172.16.40.3 workbench workbench.local

          • I can "$ ping workbench.local" from my homeseer computer and it resolves to 172.16.40.3
          • I went into /Config/AirplaySpeak.ini
            • xxxxxxxxxx98###name=Workbench
            • xxxxxxxxxx98###ipaddress=172.16.40.3
              • I manually changed it from the 169, self-assigned IP



          When HomeSeer starts up, I can see AirplaySpeak still resolves Workbench to 169.254.64.171

          I tried "$ grep -irn '169.254.64.171' *" from my HomeSeer root and it did not find that string in any other file.

          It's at that point I noticed that the MAC address listed in AirplaySpeak.ini is NOT the wireless interface of the Airport Express, it is the Ethernet interface! Since the Airport Express is configured to use DHCP & the Ethernet interface isn't plugged into anything, the Ethernet interface never gets assigned an IP address, so it gives itself a self-assigned address of 169.254.x.x
          • Airport Express Mac addresses:
            • xx:xx:xx:xx:xx:98 Ethernet
              • 169.254.64.171 (self-assigned IP)

            • xx:xx:xx:xx:xx:99 Wireless
              • 172.16.40.3 (DHCP assigned from my TimeCapsule and the only way I connect to the Airport Express)



          So I finally added "xx:xx:xx:xx:xx:98###forceip=True" to /Config/AirplaySpeak.ini and it can now send TTS to my Airport Express.

          How does AirplaySpeak utilize avahi to resolve the Airport Expresses? I did a quick googling for avahi and found "avahi-browse" but my homeseer computer can't find that command (do you know where it's located so I can update my $PATH?). I did find /etc/avahi/hosts file, but there were no entries for the Airport Express. I'm hoping avahi can return the wifi interface information instead of the eth info, but I can't troubleshoot further until I find where it's installed.

          Perhaps after you get the name of the Airport Express you could ping that name + ".local" to get the IP address of the wifi interface and use that instead of the address returned from avahi?
          Last edited by RandyInLA; August 7, 2016, 08:46 AM.

          Comment


            #6
            Correct Mac Address & Full Hostname For Airport Express From AVAHI

            Turns out I didn't have avahi-browse, so I installed the avahi utils:
            Code:
            $ sudo apt-get install avahi-utils
            After playing around with various command line options, I was able to coerce the Airport Express into revealing it's full Hostname & wireless interface Mac address:
            Code:
            $ avahi-browse --resolve --parsable --terminate -a | grep IPv4 | grep "Apple Base Station"
            Which results in this output:
            =;wlan0;IPv4;Workbench;Apple AirPort;local;Workbench.local;169.254.x.x;5009;"waMA=xx-xx-xx-xx-xx-98,raMA=xx-xx-xx-xx-xx-99,raNm=<myWiFiName>,raCh=149,raSt=1,raNA=0,syDs=Apple Base Station V7.6.7,syFl=0x8C,syAP=107,syVs=7.6.7,srcv=76700.5,bjSd=17"

            • 7th attribute is the full hostname: Workbench.local
              • Should be able to ping the full hostname to get the IP address of the Wireless interface. Though, a few times, I was still getting the IP address of the Eth interface. So I re-added an /etc/hosts entry, 172.16.40.3 workbench.local, forcing the IP I wanted. If I have to manually add the correct IP address somewhere, I'd rather do it in the hosts file so the computer knows where it is, not just AirplaySpeak. I realize you are currently storing the returned IP address from avahi in the .ini file, so the manually entered correct IP address & forceip=True still need to be inserted there. Maybe if you can sense that it's an AirPort Express, ping the full hostname & store the returned IP, then just the addition of the IP address to the /etc/hosts file would be all that is needed. If not, the user will still have to manually change the .ini file.

            • 8th attribute is the self-assigned IP address of the eth interface: 169.254.x.x
              • Incorrectly stored in AirplaySpeak.ini

            • 10th attribute is a comma-separated string of more attributes:
              • 1st attribute is the eth Mac address: waMA=xx-xx-xx-xx-xx-98
                • Incorrectly stored in AirplaySpeak.ini

              • 2nd attribute is the wlan Mac address: raMA=xx-xx-xx-xx-xx-99
                • Needs to be stored in the .ini file instead.

              • The last number in both Mac addresses are one away from each other on my Airport Express.

            • I originally had firmware version 7.6.4 in the AirPort Express, so I updated to the latest: 7.6.7. No change in response to avahi-browse command.


            Hope this helps with the troubleshooting process,
            -=Randy

            Comment


              #7
              Thanks Randy. Heaps of useful info there.

              Comment


                #8
                zwolfpack thanks for the input. This appears to be an error in the way the Airport express reports it's IP address to avahi when using Linux. Even when it is using a valid address it sometimes reports a link local address.

                Comment


                  #9
                  forceip is not working

                  Spud could you please advise what is going on here:
                  I have the following lines in my AirplaySpeak.ini

                  00254B098D7C###name=Bedroom Airport Express^M
                  00254B098D7C###ipaddress=10.7.0.28^M
                  00254B098D7C###port=5000^M
                  00254B098D7C###volume=0^M
                  00254B098D7C###enabled=True^M
                  00254B098D7C###predelay=0^M
                  00254B098D7C###postdelay=0^M
                  00254B098D7C###forceip=True^M

                  and yet I'm and still plagued by this problem:
                  Aug-31 6:28:48 PM
                  AirplaySpeak INFO Resolved Service: 00254B098D7C - Bedroom Airport Express - 169.254.157.220 - 5000

                  Edit: You need debugging on to see that AirplaySpeak is actually going to address it using the altered IP. This solution hopefully will work now.

                  Comment


                    #10
                    Further to this I have a 802.11g version of the Airport Express that has been working well without any reconfiguring. It is the 802.11n Gen 1 version that has been giving me strife. Hopefully with the forceip config it will continue without issue.

                    Comment

                    Working...
                    X