HOWTO: Enable Wi-Fi and SFTP access to transfer your ROMs via a Windows PC using WinSCP!
Posted: Thu Feb 22, 2018 11:29 am
The following guide will instruct you on how to configure your RPi's Wi-Fi on the stock ARpiCADE OS release, and also root SFTP enabling it so you can use any Windows PC on your network to transfer your ROMs to the SD card using the brilliant SFTP client WinSCP...
Prepare yourself a ARpiCADE 3.811 SD card using the IMG download found in dee2eR's first post here... https://arpicade.com/forums/viewtopic.php?f=12&t=369
If you need assistance in preparing the SD card and also growing the BOOT partition to utilize all the space available on your SD card, be sure to check out FrizzleFried's HOWTO post & informative link within here... https://arpicade.com/forums/viewtopic.php?f=5&t=452
Place the newly prepared ARpiCADE 3.811 SD card in your Raspberry Pi (mounted on your RaspberryJAMMA, interfacing your cabinet's JAMMA harness).
Plug in a USB keyboard to your Raspberry Pi before powering up your cabinet!!!
Now power your cabinet and wait until your are presented with the pac-man themed Attract-Mode menu which obviously loads an empty game list for now.
Press the ESC key, and select Yes to exit the Attract-Mode menu.
As per the stock /boot/run.sh shell script, ARpiCADE now loads AdvMENU. Press the ESC key again to exit to the terminal shell.
We need to give ourselves root access to ARpiCADE using sudo.
We also need to set a root password using the command passwd. Enter your new password and retype it again as prompted. I use the password arpicade myself (don't tell anyone!)
Lets also give your ARpiCADE OS a unique hostname instead of the default name set of raspberrypi. In the example below I use arpicade1
Verify that worked using cat! #meow
Wi-Fi is now enabled by default since the release of ARpiCADE 3.8. If you are following this guide using 3.7 you can enable Wi-Fi as per the instructions at https://arpicade.com/faq/
As also described in the FAQ, we need to set your Wi-FI SSID name passphase. This can be done using the wpa_passphrase command after we change into the correct folder.
Verify you have entered the correct SSID name and passphrase using cat! #meow
Now create the required blank file named "ssh" in the /boot folder using touch and verify it's creation with cat. #meow
Everything should be now configured for Wi-Fi success. Now let's enable root access via ssh/sftp using nano.
Scroll down using your arrow keys until you find the # Authentication: section. Set PermitRootLogin to yes. You can comment out the default value of without-password and place it on the line below.
To save your changes, press [Ctrl+X], followed by [Y] and [ENTER] to save the change.
IMPORTANT NOTE: The general recommended linux practice is to not enable password authentication for the root account. Lucky I haven't told you my password is arpicade. Even if I had though, I'm not concerned myself, my cabinet isn't on all the time. You can assess the risk yourself. Odds are you won't forward port 22 from your router to your ARpiCADE OS for the outside world to access. There is no need! So the risk lives within your own network. I may care to update the instructions later on how to create an authorized key and use it instead. Graduate past this tutorial first, and pester me for that later!
Ok, now let's reboot ARpiCADE OS. Enter reboot.
Once back at the Attract-Mode menu, press ESC to quit it and also AdvMENU after it to return back to the terminal shell. You should notice the user@host now reflects your new hostname of pi@arpicade1.
Now let's confirm you have successfully connected to your Wi-Fi network using ifconfig wlan0 and also make note of the allocated IP address. In the example below you'll notice my RPi's Wi-Fi IP address is 192.168.1.101.
Now head over to your networked Windows based PC. You can auto-install the SFTP client WinSCP by downloading and running the following link... https://ninite.com/winscp/. Be sure to check out all the auto-installers (and updater if you run the same download again at a later time) available at https://ninite.com.
Alternatively, the official site for WinSCP can be found at https://winscp.net/.
Once done, launch WinSCP and create yourself a profile. You will need to logon as root to transfer ROMs into the /boot/roms folders. If you like you can also clone the profile and define the other to logon as pi if you wish to make changes to anything within or under the /home/pi parent folder. The only benefit of this is the files will retain the correct ownership permissions for the pi user account, and not inherit roots. Refer to the attachment screen below for an example. If your hostname fails to resolve (e.g. arpicade1), use the IP address you noted before! You know the root password you set. I won't tell you mine, just in case you hack my network and disable free-play on my cabinet!
Once all done connect to your running cabinet's ARpiCADE OS and transfer away using copy and paste, drag and drap or right-click upload and download functionality. Reboot whenever you want to re-scan your newly added ROMs.
Happy wireless transferring!
wboy.
Prepare yourself a ARpiCADE 3.811 SD card using the IMG download found in dee2eR's first post here... https://arpicade.com/forums/viewtopic.php?f=12&t=369
If you need assistance in preparing the SD card and also growing the BOOT partition to utilize all the space available on your SD card, be sure to check out FrizzleFried's HOWTO post & informative link within here... https://arpicade.com/forums/viewtopic.php?f=5&t=452
Place the newly prepared ARpiCADE 3.811 SD card in your Raspberry Pi (mounted on your RaspberryJAMMA, interfacing your cabinet's JAMMA harness).
Plug in a USB keyboard to your Raspberry Pi before powering up your cabinet!!!
Now power your cabinet and wait until your are presented with the pac-man themed Attract-Mode menu which obviously loads an empty game list for now.
Press the ESC key, and select Yes to exit the Attract-Mode menu.
As per the stock /boot/run.sh shell script, ARpiCADE now loads AdvMENU. Press the ESC key again to exit to the terminal shell.
We need to give ourselves root access to ARpiCADE using sudo.
Code: Select all
pi@raspberrypi:~ $ sudo -s
Code: Select all
root@raspberrypi:/home/pi# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Code: Select all
root@raspberrypi:/home/pi# echo "arpicade1">/etc/hostname
Code: Select all
root@raspberrypi:/home/pi# cat /etc/hostname
arpicade1
As also described in the FAQ, we need to set your Wi-FI SSID name passphase. This can be done using the wpa_passphrase command after we change into the correct folder.
Code: Select all
root@raspberrypi:/home/pi# cd /etc/wpa_supplicant
root@raspberrypi:/etc/wpa_supplicant# wpa_passphrase "Your Wi-Fi SSID Name" "Your Wi-Fi passphrase">wpa_supplicant.conf
Code: Select all
root@raspberrypi:/etc/wpa_supplicant/# cat wpa_supplicant.conf
network={
ssid="Your Wi-Fi SSID Name"
#psk="Your Wi-Fi passphrase"
psk=477024ffa3fc26c7334ce1d01c54ec332a15a602ca47d1173c1379bb0e210ae8
}
Code: Select all
root@raspberrypi:/etc/wpa_supplicant# cd /boot
root@raspberrypi:/boot# touch ssh
root@raspberrypi:/boot# ls -al ssh
-rwxr-xr-x 1 root root 0 Feb 10 01:31 ssh
Code: Select all
root@raspberrypi:/etc/wpa_supplicant# cd /etc/ssh
root@raspberrypi:/etc/ssh# nano sshd_config
Code: Select all
# Authentication:
LoginGraceTime 120
PermitRootLogin yes
#without-password
StrictModes yes
IMPORTANT NOTE: The general recommended linux practice is to not enable password authentication for the root account. Lucky I haven't told you my password is arpicade. Even if I had though, I'm not concerned myself, my cabinet isn't on all the time. You can assess the risk yourself. Odds are you won't forward port 22 from your router to your ARpiCADE OS for the outside world to access. There is no need! So the risk lives within your own network. I may care to update the instructions later on how to create an authorized key and use it instead. Graduate past this tutorial first, and pester me for that later!
Ok, now let's reboot ARpiCADE OS. Enter reboot.
Code: Select all
root@raspberrypi:/etc/ssh# reboot
Now let's confirm you have successfully connected to your Wi-Fi network using ifconfig wlan0 and also make note of the allocated IP address. In the example below you'll notice my RPi's Wi-Fi IP address is 192.168.1.101.
Code: Select all
pi@arpicade1:~ $ ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.1.101 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: ff00::ff00:ff00:ff00:ff00/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:234 errors:0 dropped:96 overruns:0 frame:0
TX packets:155 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:18274 (17.8 KiB) TX bytes:22510 (21.9 KiB)
Alternatively, the official site for WinSCP can be found at https://winscp.net/.
Once done, launch WinSCP and create yourself a profile. You will need to logon as root to transfer ROMs into the /boot/roms folders. If you like you can also clone the profile and define the other to logon as pi if you wish to make changes to anything within or under the /home/pi parent folder. The only benefit of this is the files will retain the correct ownership permissions for the pi user account, and not inherit roots. Refer to the attachment screen below for an example. If your hostname fails to resolve (e.g. arpicade1), use the IP address you noted before! You know the root password you set. I won't tell you mine, just in case you hack my network and disable free-play on my cabinet!
Once all done connect to your running cabinet's ARpiCADE OS and transfer away using copy and paste, drag and drap or right-click upload and download functionality. Reboot whenever you want to re-scan your newly added ROMs.
Happy wireless transferring!
wboy.