{"id":46922371,"url":"https://github.com/golioth/pouch-gateway","last_synced_at":"2026-03-11T03:01:51.274Z","repository":{"id":311933861,"uuid":"921714315","full_name":"golioth/pouch-gateway","owner":"golioth","description":"Bluetooth gateway reference implementation for devices using Pouch.","archived":false,"fork":false,"pushed_at":"2026-03-10T19:38:21.000Z","size":310,"stargazers_count":9,"open_issues_count":9,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-11T01:17:18.455Z","etag":null,"topics":["ble","bluetooth","golioth","iot","zephyr-rtos"],"latest_commit_sha":null,"homepage":"https://docs.golioth.io/connectivity/networks/gateways","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golioth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-01-24T13:29:42.000Z","updated_at":"2026-03-10T16:26:14.000Z","dependencies_parsed_at":"2025-12-17T17:02:54.256Z","dependency_job_id":null,"html_url":"https://github.com/golioth/pouch-gateway","commit_stats":null,"previous_names":["golioth/bluetooth-gateway","golioth/pouch-gateway"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/golioth/pouch-gateway","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golioth%2Fpouch-gateway","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golioth%2Fpouch-gateway/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golioth%2Fpouch-gateway/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golioth%2Fpouch-gateway/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golioth","download_url":"https://codeload.github.com/golioth/pouch-gateway/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golioth%2Fpouch-gateway/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30368540,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ble","bluetooth","golioth","iot","zephyr-rtos"],"created_at":"2026-03-11T03:01:50.434Z","updated_at":"2026-03-11T03:01:51.262Z","avatar_url":"https://github.com/golioth.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golioth Pouch Gateway\n\nGolioth Pouch Gateway is a device capable of connecting to Golioth\ncloud and serving as proxy for Bluetooth-only devices (nodes). All\ncommunication between Bluetooth nodes and cloud is end-to-end encrypted\nand authenticated. This means that gateway serves as untrusted two-way\nchannel between Bluetooth devices and Golioth cloud.\n\n## Getting Started\n\n### Supported Hardware\n\nThis application should work on any board with support in Zephyr or nRF Connect\nSDK that has Bluetooth and Internet capability, though some custom\nconfiguration is likely required. The easiest way to get started is to use one\nof the following targets that are already configured for this application:\n\n- NXP FRDM-RW612\n- Nordic Thingy:91 X\n- Nordic nRF9160DK\n- Sentrius MG100 Gateway\n\n### Release Binaries\n\nPre-built firmware binaries for the above hardware are available in\n[GitHub](https://github.com/golioth/pouch-gateway/releases/latest). We\nrecommend using these binaries as the fastest way to get started.\n\n\u003cdetails\u003e\n\n\u003csummary\u003eFlashing the FRDM-RW612\u003c/summary\u003e\n\n1. Install\n[JLink Commander](https://www.segger.com/products/debug-probes/j-link/tools/j-link-commander/).\n2. Program the FRDM-RW612 Gateway Firmware.\n\n    a. Connect to the device with JLink Commander\n    ```\n    \u003cJLink Commander Executable\u003e -device rw612 -if swd -speed 4000 -autoconnect 1\n    ```\n    where `\u003cJLink Commander Executable\u003e` is `JLink.exe` on Windows and `JLinkExe`\n    on Linux and MacOS.\n\n    b. Issue the following commands in JLink Commander\n\n    If using Ethernet:\n    ```\n    loadfile frdm_rw612-ethernet.hex\n    reset\n    exit\n    ```\n\n    If using WiFi:\n    ```\n    loadfile frdm_rw612-wifi.hex\n    reset\n    exit\n    ```\n\n3. (WiFi Only) Store WiFi AP credentials\n\n    a. Open a serial connection to the rw612\n\n    b. Store your credentials\n    ```\n    wifi cred add -s \u003cyour-wifi-ssid\u003e -p \u003cyour-wifi-password\u003e -k 1\n    wifi cred auto_connect\n    ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eFlashing the Thingy:91 X\u003c/summary\u003e\n\n1. Install the\n[`nrfutil`](https://www.nordicsemi.com/Products/Development-tools/nRF-Util)\nCLI tool.\n2. Program the nRF5340 Bluetooth Controller Firmware\n\n    a. Position the SWD selection switch (`SW2`) to `nRF53`\n\n    b. Issue the following command to program the `app` core:\n    ```\n    nrfutil device program --firmware thingy91x_nrf5340_cpuapp.hex --x-family nrf53 --core application\n    ```\n    c. Issue the following command to program the `net` core:\n    ```\n    nrfutil device program --firmware thingy91x_nrf5340_cpunet.hex --x-family nrf53 --core network\n3. Program the nRF9151 Gateway Firmware\n\n    a. Power cycle the device and position the SWD selection switch (`SW2`) to\n    `nRF91`\n\n    b. Issue the following command:\n    ```\n    nrfutil device program --firmware thingy91x_nrf9151.hex --x-family nrf91\n    ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eFlashing the nRF9160DK\u003c/summary\u003e\n\n1. Install the\n[`nrfutil`](https://www.nordicsemi.com/Products/Development-tools/nRF-Util)\nCLI tool.\n2. Program the nRF52840 Bluetooth Controller Firmware\n\n    a. Position the SWD selection switch (`SW10`) to `nRF52`\n\n    b. Issue the following command:\n    ```\n    nrfutil device program --firmware nrf9160dk_nrf52840.hex --x-family nrf52\n    ```\n3. Program the nRF9160 Gateway Firmware\n\n    a. Power cycle the device and position the SWD selection switch (`SW10`) to\n    `nRF91`\n\n    b. Issue the following command:\n    ```\n    nrfutil device program --firmware nrf9160dk_nrf9160.hex --x-family nrf91\n    ```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\n\u003csummary\u003eFlashing the MG100\u003c/summary\u003e\n\n1. Install the\n[`nrfutil`](https://www.nordicsemi.com/Products/Development-tools/nRF-Util)\nCLI tool.\n2. Program the nRF52840 Gateway Firmware\n\n    a. Connect the Tag-Connect adapter and Segger debugger to J5 on the\n    PCBA\n\n    b. Issue the following command:\n    ```\n    nrfutil device program --firmware mg100.hex --x-family nrf52\n    ```\n    c. Power cycle the device\n\n\u003c/details\u003e\n\n\n### Provisioning\n\nTo use the Gateway, it needs to be provisioned with credentials for Golioth.\nFor demonstration purposes, the Gateway firmware uses Pre-Shared Keys (PSK). In\nproduction settings, Golioth recommends using certificates issued from customer\nowned Public Key Infrastructure (PKI).\n\n1. [Create a Device](https://docs.golioth.io/getting-started/console/register#creating-a-new-device)\nin your Golioth Project.\n2. Connect to your Gateway over serial and issue the following commands:\n```\nsettings set golioth/psk-id \u003cpsk-id\u003e\nsettings set golioth/psk \u003cpsk\u003e\n```\nwhere `\u003cpsk-id\u003e` and `\u003cpsk\u003e` are the device credentials you created in step 1.\n\n## Building from Source\n\n### Setup\n\nSetup repo with NCS:\n\n```\nwest init -m https://github.com/golioth/pouch-gateway.git --mf west-ncs.yml\nwest update\nwest patch apply\n```\n\n### Build and run\n\n#### Thingy:91 X\n\nController on nRF5340 NET core does not work yet with newest NCS\nversion (for unknown reason yet), so it is required to use older version\nof NCS which is specified in `west-thingy91x-controller.yml`. In order\nto checkout proper revision and apply required patches type:\n\n```\nwest config manifest.file west-thingy91x-controller.yml \u0026\u0026 west update\nwest forall zephyr -c \"git am $(west topdir)/pouch-gateway/zephyr/patches/thingy91x-controller/zephyr/*.patch\"\n```\n\nBluetooth controller is running on the nRF5340 NET core. This means that proper\nfirmware needs to be flashed (HCI controller over UART) in order to\naccess Bluetooth from nRF9151 chip.\n\nThis is done by by changing `SWD` switch (`SW2`) from `nRF91` to `nRF53`\non Thingy, then building and flashing firmware with:\n\n```\nwest build -p -b thingy91x/nrf5340/cpunet pouch-gateway/controller --sysbuild -- -DSB_CONF_FILE=sysbuild/nrf5340_cpuapp.conf\nwest flash\n```\n\nGateway firmware runs on nRF9151 chip. There is direct access to LTE\nmodem and also Bluetooth Host stack, which communicates with Bluetooth\nController over UART. Build and flash it with:\n\n```\nwest build -p -b thingy91x/nrf9151/ns pouch-gateway/gateway --sysbuild\nwest flash\n```\n\n#### nRF9160 DK\n\nBluetooth controller is running on nRF52840. This means that proper\nfirmware needs to be flashed (HCI controller over UART) in order to\naccess Bluetooth from nRF9160 chip.\n\nThis is done by by changing `SWD` switch (`SW10`) from `nRF91` to\n`nRF52` on development kit, then building and flashing firmware with:\n\n```\nwest build -p -b nrf9160dk/nrf52840 pouch-gateway/controller\nwest flash\n```\n\nGateway firmware runs on nRF9160 chip. There is direct access to LTE\nmodem and also Bluetooth Host stack, which communicats with Bluetooth\nController over UART. Build and flash it with:\n\n```\nwest build -p -b nrf9160dk/nrf9160/ns pouch-gateway/gateway --sysbuild\nwest flash\n```\n\n#### MG100\n\nSetup repo with Zephyr:\n\n```\nwest init -m https://github.com/golioth/pouch-gateway.git --mf west-zephyr.yml\nwest update\nwest zephyr-export\npip install -r zephyr/scripts/requirements.txt\n```\n\nGateway firmware runs on nRF52840 chip. There is direct access to LTE\nmodem and also Bluetooth Host stack. Build and flash it with:\n\n```\nwest build -p -b mg100 pouch-gateway/gateway --sysbuild\nwest flash\n```\n\n### Useful options for debugging and development\n\n#### Running gateway with simulator or USB dongle\n\nSee [Running Pouch Gateway with\nsimulator](doc/simulator_or_usb_dongle.md).\n\n#### `CONFIG_POUCH_GATEWAY_CLOUD`\n\nIt is possible to disable communication with cloud, so that only\nBluetooth part is tested. In context of `nrf52_bsim` this allows to run\nwithout BabbleSim handbrake, which normally slows down simulation to\nrespect communication timeouts enforced in SDK. In case of cellular\nconnected platforms (nRF91) there is no latency because of cellular\nnetwork infrastructure.\n\n`CONFIG_POUCH_GATEWAY_CLOUD` is available both on the gateway applicaton level\n(`pouch-gateway/gateway`) as well as in sysbuild (mainly for ease of\nuse) as `SB_CONFIG_POUCH_GATEWAY_CLOUD`.\n\nRunning `nrf52_bsim` simulaton without cloud communication can be done\nwith:\n\n```\nwest build -p -b nrf52_bsim pouch-gateway/gateway --sysbuild -- \\\n  -DSB_CONFIG_POUCH_GATEWAY_CLOUD=n\nwest flash\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolioth%2Fpouch-gateway","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolioth%2Fpouch-gateway","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolioth%2Fpouch-gateway/lists"}