Sat May 28, 2016 9:54 am
At my desk I have a mac mini with OSX 10.11 and I connect over wifi to a Pi 3 which is setup in AP mode. The 2 machines are next to each other, the wifi connection is very robust, lasting days. Throughput is good too. I rarely use the Pi as a wifi client, but it doesn't seem to have issues connecting to my Airport Express AP either. So I don't think there is anything special with the Pi 3's wifi. Except than having built-in wifi and Bluetooth is great.
Your messages doesn't give any detail about your setup, so helping out is about impossible.
- You can get "broken pipe" during your session if the Pi changes IP address, or changes to another wifi network or loses contact with the AP, or if the sshd daemon suddenly dies (quite unlikely), etc.
- You can get connection refused if your are not knocking at the right door (IP address or login), if sshd is not (re)started, if a firewall is active on the Pi, etc.
- Or perhaps it is your mac that hops from network to network, or something like that. No the Pi.
What I would do (in this order):
1 - Discard the (faint) possibility the Mac is misbehaving. This one is easy enough, if you can use another machine and get the same issues when connecting to the Pi. Or, observe the console log on the Mac, your wifi router's log, your wifi connection before and after the connexion breaks up. You'll see if the Mac has an active part or not in the connection breakup.
2 - Make sure the Pi runs a clean operating system and see if the problem is still there.
3 - Connect the Pi to a monitor, run it with wifi networking, and observe messages in the system log and also messages in the wifi router.
That should give you clues as to why or when your connection over wifi breaks, and you'll be able to post details about the system's behavior.
"S'il n'y a pas de solution, c'est qu'il n'y a pas de problème." Les Shadoks, J. Rouxel