diff --git a/README.md b/README.md index 939a12b..637c8d3 100644 --- a/README.md +++ b/README.md @@ -65,14 +65,10 @@ So far, this is a project and not a finished product. The current prototype is o 1. Put in any slot (slot 7 preferred as it is the first to boot) 2. Turn on your Apple II 3. Wait for the RPi to start up (will show ... until it connects) -4. After ProDOS boots, type `-SHELL` -5. Type `sudo vim /etc/wpa_supplicant/wpa_supplicant.conf` -6. Use `h j k l` keys to navigate, `i` to insert text and `ESC` to go back to navigation more -7. Enter your wifi information -8. Press `ESC:wq` to save and quit -9. Type `sudo reboot` -10. Restart Apple II -11. Star and Watch this repo on GitHub for the latest updates +4. After ProDOS boots, type `-RPI.COMMAND` +5. Type `RPI a2wifi list` +6. Type `RPI a2wifi select YOUR_SSID YOUR_WIFI_PASSWORD YOUR_TWO_LETTER_COUNTRY_CODE` +7. Star and Watch this repo on GitHub for the latest updates ## Update 1. Restart Apple II diff --git a/RaspberryPi/apple2driver/handlers/exec.go b/RaspberryPi/apple2driver/handlers/exec.go index 66c1692..ab8e8c5 100644 --- a/RaspberryPi/apple2driver/handlers/exec.go +++ b/RaspberryPi/apple2driver/handlers/exec.go @@ -200,7 +200,7 @@ func a2lower(enable bool) { func a2wifi() { comm.WriteString("\r" + "Usage: a2wifi list\r" + - " a2wifi select SSID PASSWORD\r" + + " a2wifi select SSID PASSWORD REGION\r" + "\r") } @@ -210,14 +210,16 @@ func a2wifiList() string { func a2wifiSelect(linuxCommand string) (string, error) { params := strings.Fields(linuxCommand) - if len(params) != 4 { - comm.WriteString("\rIncorrect number of parameters. Usage: a2wifi select SSID PASSWORD\r\r") - return "", errors.New("Incorrect number of parameters. Usage: a2wifi select SSID PASSWORD") + if len(params) != 5 { + comm.WriteString("\rIncorrect number of parameters. Usage: a2wifi select SSID PASSWORD REGION\r\r") + return "", errors.New("Incorrect number of parameters. Usage: a2wifi select SSID PASSWORD REGION") } ssid := params[2] psk := params[3] - linuxCommand = "printf \"country=ca\\nupdate_config=1\\nctrl_interface=/var/run/wpa_supplicant\\n\\nnetwork={\\n scan_ssid=1\\n ssid=\\\"%s\\\"\n psk=\\\"%s\\\"\\n}\\n\" " + - ssid + " " + + region := params[4] + linuxCommand = "printf \"country=%s\\nupdate_config=1\\nctrl_interface=/var/run/wpa_supplicant\\n\\nnetwork={\\n scan_ssid=1\\n ssid=\\\"%s\\\"\n psk=\\\"%s\\\"\\n}\\n\" " + + region + " " + + ssid + " " + psk + " " + " > /tmp/wpa_supplicant.conf; " + "sudo mv /tmp/wpa_supplicant.conf /etc/wpa_supplicant/; " +