Code Blog

Displaying 1-2 of 2 results.
2016/09/05 MacOSX,Network,iOS

 

PortTCP or UDPService or Protocol NameRFCService NameUsed by / Additional information
192 UDP OSU Network Monitoring System - osu-nms AirPort Base Station PPP status or discovery (certain configurations), AirPort Admin Utility, AirPort Express Assistant

500
UDP Wi-Fi Calling 5996 IKEv2 Wi-Fi Calling
           
515 TCP Line Printer (LPR), Line Printer Daemon (LPD) - printer Used for printing to a network printer, Printer Sharing in Mac OS X
554 TCP/UDP Real Time Streaming Protocol (RTSP) 2326 rtsp QuickTime Streaming Server (QTSS), streaming media players, AirPlay
631 TCP Internet Printing Protocol (IPP) 2910 ipp Mac OS X Printer Sharing, Printing to many common printers
1900 UDP SSDP - ssdp Bonjour, Back to My Mac
3689 TCP Digital Audio Access Protocol (DAAP) - daap iTunes Music Sharing, AirPlay

 

Bonjour 

Bonjour is Apple's implementation of zero-configuration networking (zeroconf), a group of technologies that includes service discovery, address assignment, and hostname resolution. Bonjour locates devices such as printers, other computers, and the services that those devices offer on a local network using multicast Domain Name System (mDNS) service records.

AirDrop

AirDrop is a handy method of sharing data with any Mac equipped with OS X Lion (or later) and a Wi-Fi connection that supports PAN (Personal Area Networking). PAN is a somewhat recent standard that has been added to the Wi-Fi alphabet soup of capabilities. The idea of PAN is that two or more devices that come within range of each other can communicate using a peer-to-peer connection method. Apple's implementation of AirDrop relies on WiFi chipsets that have built-in PAN support. This reliance on hardware-based PAN capabilities in WiFi chipsets has the unfortunate consequences of limiting the use of AirDrop to Macs from late 2008 or later.

AirDrop uses Apple's Bonjour technology to listen in on a WiFi connection for another Mac to announce AirDrop capabilities. It seems AirDrop will announce itself over any available network connection, but when AirDrop listens, it only pays attention to Wi-Fi connections, even if AirDrop announcements are present on other network interfaces.

defaults write com.apple.NetworkBrowser BrowseAllInterfaces 1

// Enable AirDrop Over Any Network Connection

To use AirDrop, both Bluetooth and Wi-Fi must be turned on. AirDrop uses Bluetooth to locate other AirDrop-enabled devices nearby and uses the faster Wi-Fi network to transfer the files. Because AirDrop uses Bluetooth, it adheres to a common Bluetooth range, which requires devices to be within 33 feet/10 meters of each other.

When AirDrop is enabled, it triggers Bluetooth to look for other AirDrop-enabled iOS devices that are in the area. This process is similar to pairing your iPhone with your car’s Bluetooth system. The devices “advertise” that they are open for business, and if they are within range of each other, then they start the connection process. Once the connection is made, a simple device-to-device Wi-Fi link, called Wi-Fi Direct, is created between the two. The Wi-Fi Direct link can be created even if you are in the middle of nowhere, without a Wi-Fi network. So, you get the fast file transfer speed of Wi-Fi without a router or an internet connection.

To limit who can see your device to only the people in your Contacts, you’ll need to sign in to iCloud with your Apple ID.

Only some Apple iOS devices have both Bluetooth 4.0 and Wi-Fi Direct capabilities: i.e. iPhone 5 (and later) iPad (4th generation and later). iOS 8 and OS X Yosemite (10.10) allowed the use of AirDrop between Macs and iOS devices.

I had some problems to get the iphone/macbook AirDrop connection to work. I think the main reason is that I turned on "contact only" on the Macbook. When I use a router with VPN it works good, but not with another router. As the connection is setup via an independent PAN network, the router shouldn't be a factor at all. But maybe for getting the contacts list from iCloud it is?

Some other tips I found online for troubleshooting AirDrop (and Handoff)

  1. Turn off Bluetooth on your Mac
  2. Delete /Library/Preferences/com.apple.Bluetooth.plist
  3. Turn Bluetooth back on 

 In your WiFi router, change it from Wireless Encryption WPA2 (Mixed) to Wireless Encryption WPA2(AES).

 

AirDrop information from: http://www.peachpit.com/articles/article.aspx?p=2231456&seqNum=2

See full port numbers listing at https://support.apple.com/en-gb/HT202944

 

 

2016/08/11 MacOSX,iOS

I've got a lot of trouble accessing Apple's servers from work/home here in Shanghai. Maybe the servers are too busy, but in any case, most of the time the iTunes update operation (downloading the file) disconnects before it's completed. The same happens often with XCode simulator downloads btw.

So a better way is to download the firmware first and then install it via iTunes. You need to first check which firmware file to download for the iPhone, it is either GSM or GLOBAL (CDMA + GSM) version. You can check the model number at the back of the phone and just google it to find out which type you have got.

In my case it is: iPhone 5s Model A1533 (GSM)
iPhone 5s is encoded as model nr 6 for the IPSW filename, where 6.1 is for GSM and 6.2 is for GLOBAL.

Next step is to download the IPSW file, for example:
http://appldnld.apple.com/ios9.3.2/031-62564-20160516-7F3CEE38-13A9-11E6-ADCF-CED9400DF7EB/iPhone6,1_9.3.2_13F69_Restore.ipsw

9.3.4 is a jailbreak security patch, so I rather just install 9.3.2.

Install IPSW on iPhone

Always make a backup before upgrading iOS.

  1. Connect your iPhone to your computer
  2. Select the device in iTunes
  3. Hold down the "Option" key and click on "Update" ("Shift" key on Windows)
  4. Select the IPSW file you downloaded
  5. iOS installation runs as normal

You can also click on "Restore" and select an IPSW file but this will lose all existing files and settings on the iPhone.