{"id":19215576,"url":"https://github.com/lora-net/swsd001","last_synced_at":"2026-02-20T01:02:24.337Z","repository":{"id":39345726,"uuid":"421437053","full_name":"Lora-net/SWSD001","owner":"Lora-net","description":"LoRa Basics Modem SDK","archived":false,"fork":false,"pushed_at":"2024-01-10T08:16:17.000Z","size":3573,"stargazers_count":25,"open_issues_count":0,"forks_count":11,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-12T23:34:50.345Z","etag":null,"topics":["lora","lorawan","sdk","stack"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lora-net.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-10-26T13:30:39.000Z","updated_at":"2025-04-09T15:04:48.000Z","dependencies_parsed_at":"2024-01-10T09:43:13.282Z","dependency_job_id":null,"html_url":"https://github.com/Lora-net/SWSD001","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Lora-net/SWSD001","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lora-net%2FSWSD001","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lora-net%2FSWSD001/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lora-net%2FSWSD001/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lora-net%2FSWSD001/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lora-net","download_url":"https://codeload.github.com/Lora-net/SWSD001/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lora-net%2FSWSD001/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29637920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T22:32:43.237Z","status":"ssl_error","status_checked_at":"2026-02-19T22:32:38.330Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["lora","lorawan","sdk","stack"],"created_at":"2024-11-09T14:14:08.596Z","updated_at":"2026-02-20T01:02:24.301Z","avatar_url":"https://github.com/Lora-net.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n---\n---\n\n# Notice: LoRa Basics Modem SDK (SWSD001) has been retired effective 2023-12-15\n\nThe LoRa Basics Modem SDK (SWSD001) will receive no further enhancements and/or bug fixes beyond the latest version 2.1.0. Going forward, examples of how to exercise functionality of the LoRa Basics Modem (SWL2001) are bundled within the LoRa Basics Modem release v4.3.0 (and onward) development repository (http://github.com/lora-net/SWL2001/tree/v4.3.0). The  examples included in the SWL2001 repository target application use-cases instead of atomic demonstrations of functionality. The SWL2001 repository now contains multiple reference implementations targeting different MCU and RTOS architectures and as such offers more example code regarding how to port LBM to new platforms.\n\nSupport requests for earlier versions should be directed to https://semtech.my.site.com/ldp/ldp_support\n\n\n----\n----\n\n\n# LoRa Basics Modem SDK\n\nThe LoRa Basics modem SDK contains several simple examples highlighting LoRa Basic Modem features.\n\n## Examples and demonstrations\n\nThe SDK is made of two different kind of projects:\n\n* Examples, each demonstrating a specific feature of LoRa Basics Modem\n* Demonstrations, more elaborated than the examples\n\nHere is the list of the different examples available in the SDK:\n\n| Name                        | Description                                                             | Documentation                                               |\n| --------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------- |\n| Almanac update              | Perform a partial almanac update                                        | [README](apps/examples/almanac_update/README.md)            |\n| DM information              | Configure periodic DM message reports and trigger asynchronous report   | [README](apps/examples/dm_info/README.md)                   |\n| Large file upload           | Transfer a file (up to 2048 byte long) to LoRa Cloud                    | [README](apps/examples/large_file_upload/README.md)         |\n| LoRaWAN                     | Send data on a periodic basis                                           | [README](apps/examples/lorawan/README.md)                   |\n| LoRaWAN asynchronous        | React on an asynchronous event - a button press here - and send data    | [README](apps/examples/lorawan_asynchronous/README.md)      |\n| LoRaWAN Class B             | Enable Class B after joining a network                                  | [README](apps/examples/lorawan_class_b/README.md)           |\n| LoRaWAN Multicast - Class B | Enable Class B after joining a network and configure multicast sessions | [README](apps/examples/lorawan_multicast_class_b/README.md) |\n| LoRaWAN Multicast - Class C | Enable Class C after joining a network and configure multicast sessions | [README](apps/examples/lorawan_multicast_class_c/README.md) |\n| Stream                      | Send data as a stream to LoRa Cloud                                     | [README](apps/examples/stream/README.md)                    |\n| Time synchronization        | Get time from the network server or from LoRa Cloud                     | [README](apps/examples/time_sync/README.md)                 |\n| TX/RX continuous            | Generate a TX/RX continuous thanks to the test mode                     | [README](apps/examples/tx_rx_continuous/README.md)          |\n\nHere is the list of the different demonstrations available in the SDK:\n\n| Name             | Description                                                               | Documentation                                            |\n| ---------------- | ------------------------------------------------------------------------- | -------------------------------------------------------- |\n| Region switching | Switch between two different networks with different switching mechanisms | [README](apps/demonstrations/region_switching/README.md) |\n\n## Configuration\n\nEach example has its own set of parameters - see `apps/\u003cexample\u003e/main_\u003cexample\u003e.h`.\n\nThere is also [a common configuration file](apps/common/lorawan_key_config.h) where LoRaWAN parameters can be set:\n\n* DevEUI\n* JoinEUI\n* AppKey\n* Class\n* Region\n\n## Convert LoRa Basics Modem Edge application code in LoRa Basics Modem application code\n\nIn order to help a LoRa Basics Modem Edge application code conversion to a LoRa Basics Modem application code please refer to [ModemE_to_LBM](doc/ModemE_to_LBM.md).\n\n## Requirements\n\n### Supported platforms\n\nLoRa Basics Modem is platform independent and can be used with any MCU that fulfills the requirements.\n\nThis SDK is developed on the STMicroeletronics [NUCLEO-L476RG development board](https://www.st.com/en/evaluation-tools/nucleo-l476rg.html).\n\nDifferent Semtech shields can configured at compile time:\n\n* LR1110 / LR1120 / LR1121 see [README](shields/LR11XX/smtc_shield_lr11xx/README.md)\n* SX1261 / SX1262 / SX1268 [README](shields/SX126X/smtc_shield_sx126x/README.md)\n\n### Toolchain\n\nExamples can be compiled with either:\n\n* [Keil MDK ARM](https://www2.keil.com/mdk5)\n* [GNU Arm Embedded toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm)\n\nThe projects are known to compile with GCC arm-none-eabi toolchain v10.3.1.\n\n### LR1110 / LR1120 / LR1121 firmware\n\nThe LoRa Basics Modem library requires the following firmware:\n\n* LR1110 firmware version 0x0307 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1110/transceiver))\n* LR1120 firmware version 0x0101 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1120/transceiver))\n* LR1121 firmware version 0x0101 ([available here](https://github.com/Lora-net/radio_firmware_images/tree/master/lr1121/transceiver))\n\nTo update the transceiver with the desired firmware version, please use [the updater tool application](https://github.com/Lora-net/SWTL001).\n\n## Getting started\n\n### Configure\n\nBefore starting to build an example, check the parameters in [the common configuration file](apps/common/lorawan_key_config.h). Make sure that the LoRaWAN configuration is consistent with what is configured in your network server and in your LoRa Cloud account.\n\nParameters can be seen in the [debug output](#view-debug-output).\n\n### Build\n\n#### Keil MDK ARM\n\nEach example is delivered with a several Keil project files, available under `MDK-ARM` folder for each project:\n\n| Target name                                         | Transceivers             | LoRaWAN parameters | Cryptographic operations    | Notes                              |\n| --------------------------------------------------- | ------------------------ | ------------------ | --------------------------- | ---------------------------------- |\n| lbm_example_\u003cexample\u003e_LR11xx_LR_cred_crypto.uvprojx | LR1110 / LR1120 / LR1121 | LR11XX-based       | LR11xx cryptographic engine |                                    |\n| lbm_example_\u003cexample\u003e_LR11xx_LR_crypto.uvprojx      | LR1110 / LR1120 / LR1121 | User-defined       | LR11xx cryptographic engine |                                    |\n| lbm_example_\u003cexample\u003e_LR11xx_soft_crypto.uvprojx    | LR1110 / LR1120 / LR1121 | User-defined       | Software                    |                                    |\n| lbm_example_\u003cexample\u003e_SX126x_soft_crypto.uvprojx    | SX1261 / SX1262 / SX1268 | User-defined       | Software                    | Not available for `Almanac update` |\n\nEach project has different targets ([Keil manual](https://www.keil.com/support/man/docs/uv4/uv4_ca_projtargfilegr.htm)), each one selecting a specific shield.\n\nThe procedure to compile a project is then the following:\n\n1. Open Keil with the project file corresponding to the the project to use, the transceiver available on the shield and the cryptographic mode to use\n2. Select the target corresponding to the shield\n3. Click on compile button\n\n#### GNU Arm embedded toolchain\n\nEach example is delivered with a makefile, available under `makefile` folder. The output files of the build process are stored in the `build` folder with firmware binary file having the same name as the project with a .bin extension.\n\nIt is possible to choose the cryptographic mode with the `CRYPTO` variable:\n\n| CRYPTO value            | Cryptographic operations    | LoRaWAN parameters | Comments                                                   |\n| ----------------------- | --------------------------- | ------------------ | ---------------------------------------------------------- |\n| SOFT                    | Software                    | User-defined       | Compatible with all transceivers                           |\n| LR11XX                  | LR11XX cryptographic engine | User-defined       | Compatible with LR1110 / LR1120 / LR1121 transceivers only |\n| LR11XX_WITH_CREDENTIALS | LR11XX cryptographic engine | LR11XX-based       | Compatible with LR1110 / LR1120 / LR1121 transceivers only |\n\nThe default value is `LR11XX`.\n\nIt is possible to choose the shield with the `RADIO_BOARD` variable. The possible values are listed in the corresponding `README` file:\n\n* [LR11xx shields](shields/LR11XX/smtc_shield_lr11xx/README.md)\n* [SX126x shields](shields/SX126X/smtc_shield_sx126x/README.md)\n\nThe default value is `LR1110MB1DIS`.\n\nFor instance, to build the project `lorawan` on the LR1120MB1DJS platform board with the software cryptographic mode, call the following commands:\n\n```shell\n$ cd $SDK_FOLDER/apps/examples/lorawan/makefile\n$ make RADIO_BOARD=LR1120MB1DJS CRYPTO=SOFT\n```\n\n##### Note on re-build\n\nWhen re-building an example after changing a compile-time parameter that affects LoRa Basics Modem library (like *CRYPTO*, *RADIO_BOARD* or *MIDDLEWARE*), it is important to force re-build of the LoRa Basics Modem library.\n\nThis can be achieved by cleaning prior the re-build of the example with:\n\n```shell\n$ make clean_lbm\n```\n\n##### Command line configuration\n\nAdditional configuration flags can be passed from command line to compiler with `EXTRAFLAGS` argument.\nThis is dedicated to define macros that can be defined like the following:\n\n```bash\n$ make EXTRAFLAGS='-D\u003cMACRO\u003e=\u003cVALUE\u003e'\n```\n\nWhere `\u003cMACRO\u003e` is the macro name to set and `\u003cVALUE\u003e` is the value to set for this macro.\nNot all macro can be redefined through this way. Refer to the readme of examples for the list of macro that can be defined.\n\nNote that when using the configuration on command line, `make` cannot detect a change in configuration on next build.\nTherefore `make clean` must be invoked when building after a build where configuration was provided on command line.\n\n##### Note on Critical message printing\n\nThe code can produce critical messages being printed on serial port when critical situations occurs.\nThis is typically the case when setting a LoRaWAN region or LoRaWAN class fails.\n\nThe default behavior is to print the critical message and keep running.\nThis behavior can be changed so that the code freezes (until watchdog reset the device).\nTo do so, the macro `ENABLE_CRITICAL_ERROR_DEADLOOP` has to be defined, for instance by doing:\n\n```shell\n$ make EXTRAFLAGS='-DENABLE_CRITICAL_ERROR_DEADLOOP'\n```\n\n### Load\n\nAfter a project is built, it can be loaded onto a device.\n\nThere are multiple ways to do it:\n\n* Drag and drop the binary file to the USB drive listed by our OS - usually shows up as `NODE_L476RG`.\n* Load it through the Keil IDE\n\n### View debug output\n\nOn the NUCLEO-L476RG development board, the firmware prints debug information to the UART that is connected via the ST-LINK to the host computer. The configuration is 921600/8-N-1:\n\n* On Linux, this device usually shows up as `/dev/ttyACM0`\n* On Windows, the port can be obtained from the device manager\n\nFor instance, using stty on Linux:\n\n```shell\n$ stty -echo raw speed 921600 \u003c /dev/ttyACM0 \u0026\u0026 cat /dev/ttyACM0\n\nINFO: ###### ===== LoRa Basics Modem LoRaWAN Class A/C demo application ==== ######\n\nINFO: LoRaWAN version: 01.00.04.01\nINFO: LoRa Basics Modem version: 02.01.00\nINFO: ###### ===== BASICS MODEM RESET EVENT ==== ######\nReset count : 95\nINFO: Application parameters:\nINFO:   - LoRaWAN uplink Fport = 2\nINFO:   - DM report interval   = 60\nINFO:   - Confirmed uplink     = No\nINFO: LoRaWAN parameters:\nDevEUI - (8 bytes):\n 00 16 C0 00 00 00 00 00\nJoinEUI - (8 bytes):\n 00 16 C0 01 FF FE 00 01\nClass: A\nRegion: EU868\n\nINFO: ###### ===== JOINED EVENT ==== ######\n```\n\n## Validation\n\nThe examples provided in the SDK have been tested under the following configurations:\n\n- shields (not all shields have been used on every regions):\n  - LR1110MB1DJS\n  - LR1110MB1GJS\n  - LR1120MB1DJS\n  - LR1120MB1GJS\n  - SX1261MB1BAS\n  - SX1261MB1CAS\n  - SX1262MB1CAS\n  - SX1262MB1DAS\n  - SX1268MB1GAS\n- LoRaWAN Network Server: The Things Network (v3.22.0)\n- Application Server: the Node-Red based one provided in [`apps/examples/application_server`](apps/examples/application_server/README.md)\n\n\n| Regions | Validation executed |  Comment |\n| -- | :--: | -- |\n| SMTC_MODEM_REGION_AS_923_GRP1 | :white_check_mark: | |\n| SMTC_MODEM_REGION_AS_923_GRP2 | :white_check_mark: | |\n| SMTC_MODEM_REGION_AS_923_GRP3 | :white_check_mark: | |\n| SMTC_MODEM_REGION_AU_915 | :white_check_mark: | |\n| SMTC_MODEM_REGION_CN_470 | :x: | Validation has not been executed on this region |\n| SMTC_MODEM_REGION_CN_470_RP_1_0 | :white_check_mark: | |\n| SMTC_MODEM_REGION_EU_868 | :white_check_mark: | |\n| SMTC_MODEM_REGION_IN_865 | :white_check_mark: | |\n| SMTC_MODEM_REGION_KR_920 | :white_check_mark: | |\n| SMTC_MODEM_REGION_RU_864 | :white_check_mark: | |\n| SMTC_MODEM_REGION_US_915 | :white_check_mark: | |\n| SMTC_MODEM_REGION_WW2G4 | :white_check_mark: | Validation has been executed on examples as only LoRaWAN class A is supported for this region: \u003cbr\u003e - time_sync \u003cbr\u003e - stream \u003cbr\u003e - lorawan_asynchronous \u003cbr\u003e - almanac_update \u003cbr\u003e - dm_info \u003cbr\u003e - lorawan (`SMTC_MODEM_CLASS_A`) \u003cbr\u003e - large_file_upload |\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flora-net%2Fswsd001","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flora-net%2Fswsd001","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flora-net%2Fswsd001/lists"}