J/MRI WiThrottle - Simple Secure Setup

Setup a dedicated WiFi network for WiThrottle

WiThrottle

Using WiThrottle with J/MRI allows you to easily add wireless throttles using any phone and an app. Adding a dedicated network for your train layout isn't too difficult and will improve the security of your home network. The popular WRT54G is widely available, easy to configure, and - importantly - available for an extremely budget-friendly price! As of early 2024, these were found on eBay for between $15 and $45. Of course, any WiFi router will have similar capabilities, and you may consider a newer device to support faster speeds, but that isn't much of an advantage for WiThrottle.

Benefits

The use of an additional network router provides several benefits:

  • Isolation from the primary (home) network to improve performance and security. Many of us have sensitive information on our computers and having a separate network for your train throttles isolates your data from the throttle users. The separate network also keeps the throttle communication separate from the traffic in your home, avoiding any possible conflicts and performance issues.
  • Provides DHCP automatic addressing to your train network. Each computer needs an Internet Protocol (IP) Address. Routers provide a DHCP service that allows devices to request an available network address from a pool of available addresses. 
  • Optionally allows access to the Internet via your home or guest network. This can be controlled by adding a cable between your home router and the train room router and connecting it when necessary or connecting it to a "guest" network in your home router.

Get Started!

WiThrottle DiagramWhile I have suggested using a WRT54G, you can use any wireless router and I will describe the configurations using generic terms that can apply to any brand and model. You need to be sure that the device you use is a "wireless router" and not a "wireless access point"! A router is the primary device in the network and A) is used to connect two networks together (usually your home and the Internet) and B) provides critical network management services such as DHCP and DNS. An "access point" physically looks similar, but lacks these essential features and is generally used to extend the WiFi coverage over a larger area. This diagram shows what the network will look like when configured.

Basic Requirements

The router should be located near the center of the room for optimal coverage. It needs to be near an electrical outlet, and you need to run at least one network cable between the router and the J/MRI PC. You can connect the PC wirelessly, but since all traffic between the throttles has to connect to the PC, it's much better to use a wired connection to the PC! You usually do need to connect via a wired connection to perform any configuration tasks, so this is a good idea.

Network Address -You need to know the IP addresses of your home network so you can setup a different network for your trains. The most common IP addresses for home networks begin with "192.168.1". The IP address assigned to a device is made up from 4 numbers, separated with periods. Each number is in the range of 1 through 254 (to keep it simple). The first 3 numbers are the same and represent the network, and the last number is unique to each device. The easiest way to find your home network address range is to use your phone - go to Settings, About my phone, and the network address your phone is using should be displayed on that page. Write down the first 3 sets of numbers and note it as your "Home" network. Now define your Train network by changing the third set of numbers to something else - it doesn't much matter as long as it is between 1 and 254 and isn't the same as your home network.

Router Setup - Make sure that your J/MRI computer is plugged into one of the LAN ports on the router and that the network interface is configured to use DHCP. This is usually the default for most computers. Power on the router, wait a minute or so, then start up the J/MRI computer. The computer should receive an IP address from the router, and this will likely be the same as your home network - don't worry - this is what we'll set up next! Navigate to the router setup page. It will ask for the following information. There may be more options, but these are the essentials for this configuration. Be sure to follow the settings in the setup guide for your specific router brand and model!

  • WAN Address - Set to use Automatic Configuration / DHCP (may also be called "Internet Connection")
  • Local Address - Enter the address you decided to use, such as 192.168.24.1. The router is usually device #1, so the last digit should be "1". The "Subnet Mask" tells the router how many devices are in the network - select (or enter) "255.255.255.0" to select the default size of 256 addresses.
  • DHCP Setup - This tells the router which addresses it should hand out when devices request them. There are usually 3 parameters that need to be configured here:
    • Enable/Disable DHCP - set this to "Enable"
    • Starting Address - Often only the last digit is entered here. Enter "16", which will be the first address that the router hands out to throttles. This also allows you to later assign a static (fixed) address to the J/MRI computer.
    • Number of Addresses - Enter a multiple of either 8 or 16 up to a maximum of 224. Set this number based on how many wireless throttles you expect to use plus a little extra. Setting too high a value here has no benefit and could affect performance in some older routers.
    • Lease Time - specifies how long a device can use an assigned address. For throttles, this should be 4 hours - a typical operating session period. For this application, a short time is better because it allows an address to be returned to the pool for use by other devices. If your operating session runs long, the devices will automatically renew their "lease" without interruption or delay.
    • Router Time - you may be asked to set the router's time zone. If you do connect to the Internet, you can also allow automatic time setting if available.
  • Wireless Setup - This is the last part of the setup and the part that lets you personalize your network! There are a few settings to make here and these may vary based on the age and model of the router. For the WRT54G, there are 4 settings:
    • Network Mode - this defines the operating frequency of the wireless signals. All modern phones support 54Mbps "G", so you can select the "802.11g only" option which disables the slower radio. For newer routers that support A or N frequency rates, select "all" or "mixed" mode to enable all common fast communication modes.
    • Wireless Channel - Generally only needed for B/G routers and for this implementation it would not make any difference. This is important only if you have a large network with multiple access points! Select channel 1, 6, or 11 and move on. 
    • SSID - This is the "name" of the wireless network and identifies it when your device searches for available networks. It is Case Sensitive and allows up to 32-characters. This can be simply "Railway" or "WiThrottle". Be sure to select the option to "Broadcast the SSID" so it can easily be found by your throttles.
    • WPA Security - This places a password on your network! Select the option "WPA Pre-shared key" which will allow you to define a password. If available, select "AES" encryption as it is a bit more secure than "TKIP". Don't worry if your router doesn't support this since you are configuring the network for dedicated throttle access. Enter the Pre-Shared Key as 8-32 characters. This might be a good place to use your railway name!
      You will want to post a sign in the train room with both the SSID and Password so guests can use their phones to connect to the throttle network.

Save all of your settings, then restart your router (this may happen automatically when you save!) and then restart your J/MRI computer. If you are comfortable with your PC, you can open a command prompt and run "IPCONFIG RELEASE" then "IPCONFIG RENEW" instead to update the network settings. Check the settings of the J/MRI computer and verify that it is connected to the correct network. The first 3 numbers of the address should match what you set into the router's Local Address. 

Set the J/MRI Computer Address

Set the IP Address configuration of the J/MRI computer to use a static address for best performance. The network address consists of 3 values:

  • IP Address - use a device address of "4", which is below the DHCP starting address of 16. If your router local address is 192.168.24.1, the J/MRI computer's address should be 192.168.24.4.
  • Subnet Mask - Use the same mask that you set in the router - "255.255.255.0".
  • Gateway - Enter the address of the router - 192.168.24.1 in our example configuration. This will only be used if you make a connection to the Internet and can be left blank if this will be a dedicated throttle-only network.
  • DNS - Enter the address of the router - 192.168.24.1 in our example configuration. This will only be used if you make a connection to the Internet and can be left blank if this will be a dedicated throttle-only network. 

NOTE: You MUST enable both IPV4 and IPV6 on your J/MRI computer for WiThrottle to initialize properly! I usually disable unused network protocols and spent a few hours troubleshooting why WiThrottle would not initialize on the J/MRI system. 

Optional Internet Connection

The WiThrottle does not need an Internet connection to function, but you may want to provide Internet access. It is also handy to have Internet access on the J/MRI computer for documentation and other needs, including J/MRI software updates. Also note that some phones will complain about connecting to a network without Internet. You should always choose "connect anyway" since Internet isn't required for throttle operation.

The diagram above shows an optional connection from the WAN port of the throttle router to your home router. If your home router has a connection for a "guest" network, connect your throttle router to that port as this will allow Internet access without access to your home network devices. If your home router doesn't have a guest port, you can connect to one of the available LAN ports, but be aware that this exposes your home devices to the throttles and the J/MRI computer. You can simply unplug the WAN connection during operating sessions to improve security and connect it when working alone.

What About the "Guest" Network?

Many newer home routers support a "guest" network port or wireless SSID and there have been attempts to connect the J/MRI and WiThrottle via the Guest network. This will generally not work as expected as this network has security settings that allow a device to connect to the Internet via the router but prevent the devices from being able to communicate with each other. This is why a dedicated WiThrottle network and WiFi router is recommended. 

 

 

Comments