Hide your SSID when using WiFi control at exhibitions

I have been developing a JMRI (Java Model Railway Interface) DCC (Digital Command Control) system for my exhibition layout “Die Keinnamebahn” that uses mobile smart phones as WiFi connected hand throttles connected to the JMRI software running on a Raspberry Pi Model 3B+ microcomputer set up as a WiFi access point.

JMRI running on a Raspberry Pi

A very neat VESA fitting case for the Raspberry Pi running JMRI

 

I got the system working successfully at home using two second-hand Samsung Galaxy S4 mobile smartphones running the Engine Driver app as throttles and layout controllers.

We took “Die Keinnamebahn” to the New Mills and District Railway Modellers annual show at Chapel-en-le-Frith on 24/25 February 2019 and all was working well until about 50+ exhibition visitors had entered the exhibition hall. At this point the WiFi system on Raspberry Pi shut down completely! Nothing I could do, including rebooting the Pi, would restore a stable WiFi service until all the visitors had gone home!

Subsequent online research and reading after we got back home revealed that when a mobile phone is set to automatically find a WiFi connection it ‘pings’ every WiFi access point it finds up to 10 times a second to try and connect to it, regardless of whether the access point is set to be public or requiring a password. The access point then has to process these requests regardless of their validity. It seemed to me that the Raspberry Pi’s wireless controller could not cope with large numbers of requests per second and had effectively shut down to protect the computer from this unintential DDOS (Distributed Denial Of Service) attack. There was nothing I could do at the exhibition to fix this and so I was reliant on using a keyboard controlled backup solution during the exhibition.

Once I was back home I explored the idea that if the visitors’ mobile phones could not ‘see’ my network it may prevent this happening again. By default, when you set up an access point on the Raspberry Pi you give it a name, it’s SSID (Service Set Identifier), that announces to the world that the network is there. This enables all smartphones to see the network. You can set the Pi to hide this information by editing the file /etc/hostapd.conf by following the instructions at

https://raspberrypi.stackexchange.com/questions/56327/how-to-set-pi-up-as-a-hidden-wifi-access-point

Save the file and reboot the Pi. Your access point will then have a hidden SSID and will reject all requests from any phone that does not know the SSID and the the password (which will have to be manually added to the phone’s network list to connect it to the Pi). It is also important to change the default SSID and password set up by the JMRI WiFi download from https://mstevetodd.com/rpi to one that is known only to you and operators on your layout to prevent cross-interference with anyone else using a default configuration at the exhibition.

I set my system up with a hidden SSID as above and when we took the system to Narrow Gauge North at Pudsey on 9th March 2019 it worked flawlessly all day with the ability to control the layout from over 60ft away with a full exhibition hall!

I would therefore thoroughly recommend that any layout using a WiFi enable control system at an exhibition should be set to hide their SSID to prevent it being affected by the visitors mobile phones and other layouts.