# Fully Standalone Gateway Operation

**URL:** <https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879>\
**Category:** WebThings\
**Created:** [September 10, 2019, 7:13pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879 "2019-09-10T19:13:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![gary.ebersole](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gary.ebersole](https://discourse.mozilla.org/u/gary.ebersole)\
**Post date:** [September 10, 2019, 7:13pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879/1 "2019-09-10T19:13:52Z")

</div>

In my planned use case, I want to be able to operate a WebThings Gateway in a remote location without WiFi. Configuring the gateway in my office using one of my development routers works fine on an RPi 3 B+. My target system consists of several Z-Wave devices and appropriate rules connected via a UZB stick. When I power down the WiFi router used to configure the gateway and re-boot to simulate remote operation, the Pi 3 configuration comes up albeit slowly because of all the network retries during the WiFi setup. The system works as intended but I am unable to access the gateway dashboard to check the status of the devices (e.g. battery level of the motion sensors). If I bring the router back up, the gateway reconnects and the dashboard can be reached as it was during setup.

Am I doing something wrong in my setup or this the expected behavior? From I can discern from the code, it doesn’t appear that the gateway dashboard is meant to be reached via the gateway-configured AP but I may be missing something. It does seem to me that operating the system as a fully self-contained router and gateway controller is a good idea. The Turris Omnia OpenWrt approach probably solves this problem but it’s far too expensive for my use case and apparently not yet available in the U.S… A Raspberry Pi Gateway/OpenWrt configuration seems an ideal path to a fully standalone gateway.

Thanks. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![gary.ebersole](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gary.ebersole](https://discourse.mozilla.org/u/gary.ebersole)\
**Post date:** [September 10, 2019, 7:42pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879/2 "2019-09-10T19:42:52Z")

</div>

Another option would be to pre-configure an AP on the Pi and have the gateway code use that IP address as the configured WiFi. As best as I can tell from the code, it might work as long as ‘wifiskip’ isn’t set. I know the comments specifically state to not to enable hostapd but I haven’t drilled down into the router setup code too much to see where the impact is. Thoughts?

---

<div class="post-metadata">

**Author:** ![kgiori](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/kgiori/32/23949_2.png) [@kgiori](https://discourse.mozilla.org/u/kgiori)\
**Post date:** [September 10, 2019, 9:24pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879/3 "2019-09-10T21:24:31Z")

</div>

Hi Gary,

It’s possible to create an OpenWrt build for the RPi, so that it can act like an access point. Or you can buy a cheap travel router, since my experience is that they normally work better than an RPi (in terms of serving Wi-Fi clients). GL.inet has cheap and easy-to-config travel routers. Do you plan to connect to the RPi wirelessly? If it is not connected to any other LAN/WLAN, then it will indeed need to host its own local network.

---

<div class="post-metadata">

**Author:** ![gary.ebersole](https://avatars.discourse-cdn.com/v4/letter/g/b5e925/32.png) [@gary.ebersole](https://discourse.mozilla.org/u/gary.ebersole)\
**Post date:** [September 10, 2019, 10:29pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879/4 "2019-09-10T22:29:04Z")

</div>

Thanks, Kathy. A good idea. My development router is actually a GL.inet AR150. It’s an interesting alternative. It adds to the cost but it would enable me to use a Pi Zero W for the Gateway in conjunction with the GL.inet router. I doubt if OpenWrt would work well on a Pi Zero. The minimum for that Gateway+OpenWrt is probably a Pi 3 B+.

Any thoughts about my idea of pre-configuring an AP with _hostapd_ on the RPi that starts before the Gateway might work? I don’t need all the functionality of Open/Wrt and this would basically create a network that should show up on the list as a Wi-Fi alternative for configuration. I have been digging through the code a bit and it almost seems that it should work but I am no doubt missing something important. Lots of code to parse. It might be an interesting experiment for tomorrow.

---

<div class="post-metadata">

**Author:** ![kgiori](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/kgiori/32/23949_2.png) [@kgiori](https://discourse.mozilla.org/u/kgiori)\
**Post date:** [October 2, 2019, 10:48pm UTC](https://discourse.mozilla.org/t/fully-standalone-gateway-operation/44879/5 "2019-10-02T22:48:06Z")

</div>

We had built an OpenWrt image for the RPi, but we decided that the provisioning process was cumbersome and might confuse people. And the RPi doesn’t provide good quality Wi-Fi connectivity, and only supports a limited number of clients. ☹  
@dhylands may be able to provide pointers if you want to make an image for RPi that acts like an AP/router. But in my experience, the cheap AP/router + RPi IoT hub is a more stable and useful solution. But of course that’s for my needs…
