Bug in gateway-config with password containing ampersand


While configuring my new RAK7246 using gateway-config, I set a new password for AP mode (using option 3: “Modify SSID and pwd for AP Mode”). After saving the new password, which contained an ampersand character (like: “mypass&word”), an error showed up in the console:

parse error: Invalid string: control characters from U+0000 through U+001F must be escaped at line 17, column 20

Also, the “Configure wifi” menu didn’t show anymore.
After doing some digging, I found that the key/value pair for “ap_pwd” had been incorrectly written to the file /usr/local/rak/gateway-config-info.json. Line 17 in that file appeared like so:

"ap_pwd":"mypass          "ap_pwd":"rakwireless"word"

Obviously, the password string had been somehow split where the ampersand character was. I manually edited line 17 (this time using no ampersand), like so:


After saving and rebooting the gateway, I could access it again and all menu items were back.

Please fix, thanks : )


mypass "ap_pwd":"rakwireless"word
When you set the password, you may add “” and cause the program to run incorrectly.

Hm, incorrectly? – I would say this is a workaround, not a fix…


Thank you for your mind!

We will fix this bug in the future!