1

Is it possible to let my rPi connect to a Wifi with a given SSID without a monitor, keyboard, mouse and LAN? Let's say I brought my Pi with me and want to access a public Wifi and I only have a Mac with no ethernet port.

1
  • It depends. If you have a Linux computer and use Raspbian (not NOOBS) it is possible, but it is easier if you can borrow hardware for setup.
    – Milliways
    Apr 15 '16 at 6:46
1

Ok, I'll post my own solution. I used a Mac and an Android phone (probably optional).

  1. Setup your Android Phone for tethering.
  2. Before bringing your rPi to the wild, at home plug it in a monitor and update /etc/wpa_supplicant/wpa_supplicant.conf to include the information for your Android private network SSID.

$ sudo vim /etc/wpa_supplicant/wpa_supplicant.conf

I appended my Android Private Network to the end

  ...

  network={
     ssid="AtHome"
     psk="aSecurePassphrase"
     key_mgmt=WPA_PSK
  }

  network={
     ssid="myAndroidNetwork"
     psk="aMoreSecurePassphrase"
     key_mgmt=WPA_PSK
  }
  1. Outside your home, turn on tethering in Android and turn on rPi.
  2. In your Mac execute ssh pi@raspberrypi.local
  3. Then perform step 2 again appending the new public wifi SSID

It should look something like this

  ...

  network={
     ssid="AtHome"
     psk="aSecurePassphrase"
     key_mgmt=WPA_PSK
  }

  network={
     ssid="myAndroidNetwork"
     psk="aMoreSecurePassphrase"
     key_mgmt=WPA_PSK
  }

  network={
     ssid="newPublicWifiSSID"
     psk="theMostSecurePassphrase"
     key_mgmt=WPA_PSK
  }
  1. Turn off tethering in Android phone and reboot rPi.

NOTE I am guessing that the Android phone is not necessary if you can make your Mac an access point.

1
  • 1
    There are also Android SSH clients that could give you terminal access to the pi once it is tethered. I don't know know if that will make it easier or harder in this context. Using a console on a phone is pretty tedious and the app probably needs to provide things like a ctrl key to make it useful for quick editing of text files.
    – goldilocks
    Apr 15 '16 at 11:57
0

Yes. It's possible.

You can mount sd card on your Mac. Edit file /etc/wpa_supplicant/wpa_supplicant.conf on root partition according to this tutorial.

If Mac cannot read ext4 partitions use 3rd party software to mount and edit files. Also if there isn't any software, try to use Linux LiveCD(for ex. Ubuntu).

1
  • The Mac cannot access ext4 partitions.
    – Milliways
    Apr 15 '16 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.