{"id":19399176,"url":"https://github.com/craigpeacock/zephyr_lorawan","last_synced_at":"2025-04-24T06:31:40.817Z","repository":{"id":121719873,"uuid":"584718573","full_name":"craigpeacock/Zephyr_LoRaWAN","owner":"craigpeacock","description":"An example LoRaWAN Application on the Zephyr RTOS","archived":false,"fork":false,"pushed_at":"2023-10-19T06:24:15.000Z","size":50,"stargazers_count":17,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T00:32:19.168Z","etag":null,"topics":["lemon-iot","lora","loramac-node","lorawan","nrf52832","nrf52840","nrf9160","rak3172","rfm95w","rfm96w","stm32wl","sx1276","sx1278","zephyr"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/craigpeacock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-03T10:39:11.000Z","updated_at":"2025-02-26T08:13:26.000Z","dependencies_parsed_at":"2024-03-04T09:45:57.838Z","dependency_job_id":null,"html_url":"https://github.com/craigpeacock/Zephyr_LoRaWAN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigpeacock%2FZephyr_LoRaWAN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigpeacock%2FZephyr_LoRaWAN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigpeacock%2FZephyr_LoRaWAN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigpeacock%2FZephyr_LoRaWAN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craigpeacock","download_url":"https://codeload.github.com/craigpeacock/Zephyr_LoRaWAN/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250578159,"owners_count":21453254,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["lemon-iot","lora","loramac-node","lorawan","nrf52832","nrf52840","nrf9160","rak3172","rfm95w","rfm96w","stm32wl","sx1276","sx1278","zephyr"],"created_at":"2024-11-10T11:08:22.277Z","updated_at":"2025-04-24T06:31:40.562Z","avatar_url":"https://github.com/craigpeacock.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zephyr LoRaWAN \u0026 LoRa Examples\n\nAn example LoRa Point to Point and LoRaWAN Network Application for the Zephyr RTOS.\n\nTested with the following targets:\n\n* [Lemon IoT LoRa RAK3172](https://lemon-iot.com/index.php/product/lemon-iot-lorawan-rak3172-board/) (based on the STM32WL5ECC)\n* [Lemon IoT BLE nRF52832](https://lemon-iot.com/index.php/product/lemon-iot-ble-nrf52832/) + RFM95W (SX1276) \n* [Nordic nRF52840 Dongle](https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle) + RFM95W (SX1276) \n* [Lemon IoT LTE nRF9160](https://lemon-iot.com/index.php/product/lemon-iot-lte-cat-m1-nb-iot-nrf9160-board/) + RFM95W (SX1276) \n\n# LoRaWAN\n\nThe LoRaWAN folder contains example code to connect to [The Things Network](https://www.thethingsnetwork.org) and transmit temperature and humidity values from a Sensirion SHTC3.\n\nLoRaWAN Device EUI, Join EUI and Application Key should be entered into the lorawan.h file prior to compiling. \n\nThe prj.conf file includes statements to enable your region (Frequency):\n\n```\n#LORAMAC_REGION_AS923=y\nLORAMAC_REGION_AU915=y\n#LORAMAC_REGION_CN470=y\n#LORAMAC_REGION_CN779=y\n#LORAMAC_REGION_EU433=y\n#LORAMAC_REGION_EU868=y\n#LORAMAC_REGION_KR920=y\n#LORAMAC_REGION_IN865=y\n#LORAMAC_REGION_US915=y\n#LORAMAC_REGION_RU864=y\n```\n\nThe I2C SHTC3 sensor can be connected to the I2C pins allocated in the relevent [board](https://github.com/craigpeacock/Zephyr_LoRaWAN/tree/main/LoRaWAN/boards) file for your target. \n\nThe example stores the DevNonce in NVS (Non-volatile Storage) as per LoRaWAN 1.0.4 Specifications.\n\n## Work in progress\n\nThe STM32WL5E has an IEEE 64-bit EUI stored at 0x1FFF7580. We can read this and use it as the Device EUI. Currently the LoRaWAN Device EUI is hard-coded.\n\n## Example output\n\n```\n*** Booting Zephyr OS build zephyr-v3.2.0-3920-g5787c69b9ce5 ***\nZephyr LoRaWAN Node Example\nBoard: lemon_iot_lora_rak3172\nNVS: ID 1, DevNonce: 8\nStarting LoRaWAN stack.\nJoining network using OTAA, dev nonce 8, attempt 1: Timed-out waiting for response.\nJoining network using OTAA, dev nonce 9, attempt 2: Join successful.\nSending Temp 27.77 RH 50.1\nSending Temp 27.47 RH 51.2\n```\n\n# LoRa\n\nThe LoRa folder contains example code to allow testing of LoRa radios (point to point communications). This is useful for validating your LoRa radio is working correctly before trying to connect to LoRaWAN networks.\n\nWhen started, the app will listen for packets on the selected frequency/channel. When SW1 is pressed, will transmit a packet ('Hello') in ASCII. \n\nPlease check the frequency/channel configuration prior to use and ensure you are transmitting on a permitted band for your country. \n\n```\n*** Booting Zephyr OS build zephyr-v3.2.0-3920-g5787c69b9ce5 ***\nLoRa Point to Point Communications Example\nLoRa Device Configured\nXMIT 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00\nXMIT 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00\nXMIT 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00\nXMIT 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00\nXMIT 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -75dBm, SNR = 8dBm\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -75dBm, SNR = 8dBm\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -75dBm, SNR = 9dBm\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -74dBm, SNR = 9dBm\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -74dBm, SNR = 9dBm\nRECV 6 bytes: 0x48 0x65 0x6c 0x6c 0x6f 0x00 RSSI = -74dBm, SNR = 8dBm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigpeacock%2Fzephyr_lorawan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigpeacock%2Fzephyr_lorawan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigpeacock%2Fzephyr_lorawan/lists"}