Enhancing your RPi-JMRI

Here are a few enhancements that people have asked for to personalize their image. Most of them require command line access, which can be attained two ways:

1) Putty connection from another computer.

2) Terminal window from the RPi desktop. The desktop can be reached by:
2a) VNC Connection from another computer
2b) connect a monitor, mouse and keyboard to the HDMI and USB ports of the RPi

Change the WiFi name (ssid) and/or password:

Run the following command:

sudo nano /etc/hostapd/hostapd.conf

Then edit the following lines to change your network name (ssid), your network password or the wifi channel to use:


Note: password is case-sensitive, must be 8-63 chars, and there are some special characters to avoid.

Save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X].
You can test your changes by running "sudo hostapd /etc/hostapd/hostapd.conf"

Restart your RPi and verify you can connect using the new network name and password.

Change the pi user, vnc and samba passwords:

Run the following commands, and follow the prompts for each:

sudo vncpasswd -service
sudo smbpasswd -a pi

Disable Access Point and Enable Wifi Client 

The RPi wifi adapter cannot be used as an access point and a wifi client to another network at the same time. Here are the steps to change the wifi to be a client only:

Disable the access point functionality by removing hostapd using: 

sudo apt-get remove hostapd

then remove the related config by modifying your /etc/dhcpcd.conf file:

sudo nano /etc/dhcpcd.conf

to comment-out (add a leading # to) the last three lines in the file, as such:

#interface wlan0
#static ip_address=
#nohook wpa_supplicant

Then save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X], and then reboot your RPi.
at this point, you'll need to have access to your RPi desktop via monitor, keyboard, mouse or connect to Ethernet and use a VNC client.
Use the wifi icon in the top bar to select your wifi network, set the password, etc.
reboot again with ethernet cable disconnected (if it was connected).
you should now be able to ping and connect to "RPi-JMRI.local" from devices on your wifi network.

Re-enable Bluetooth

I disabled the Bluetooth capability on the RPi to support use with the PiSPROG, which uses the same UART. To re-enable the Bluetooth feature, run:

sudo nano /boot/config.txt

and comment-out (add a leading # to) the last two lines in the file, as such:


Then save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X], and then reboot your RPi.

Change the hostname:

Run the following commands:

sudo nano /etc/hostname
sudo nano /etc/hosts

In both files, replace "RPi-JMRI" with your desired hostname. Then save and exit by pressing [Ctrl-O], then [Enter], then [Ctrl-X].

Restart your RPi, then verify your new hostname with the "hostname" command.

Update JMRI: 

Extract JMRI example

Note: This assumes you have desktop access to your RPi, either by VNC client or monitor+mouse+keyboard

Exit JMRI, then run the following command to delete the old JMRI folder (your user files and profiles are not affected):

rm -rf /home/pi/JMRI

Then download the desired Linux version of JMRI to your RPi, using the RPi web browser, or copy from another computer using the network or a USB drive.

If using the web browser, the file will open in xArchiver automatically. If not, you will need to locate the file and double-click on it.

Once open in xArchiver, click the Extract icon. In the resulting "Extract files" dialog box, change the "Extract To:" to "/home/pi" and press "Extract". See screenshot. Once complete you can close all windows and double-click the PanelPro icon or simply reboot.