# Unable to connect Wio-E5-dev kit to TTN using STM32CubeIDE

**URL:** <https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909>\
**Category:** End Devices (Nodes)\
**Tags:** end-devices\
**Created:** [November 29, 2024, 6:02am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909 "2024-11-29T06:02:43Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [November 29, 2024, 6:02am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/1 "2024-11-29T06:02:44Z")

</div>

**Summary**  
We tested LoRa wio e-5 using AT factory firmware initially and it worked fine.Now after erasing AT firmware and using STM32CubeIDE we are trying to connect wio-e5 dev kit to the things network LNS with our sensecap m2 gateway which is also connected to TTN and sending data, but our wio-e5 is not connecting to TTN application server. We followed the seeed studio’s github documentation for this. We have set our dev eui, join eui, and appkey in the macros of se-identity.h file in STM32CubeIDE according to our generated TTN application server details.  
**LoRa wio-e5 configuration:**  
**STM32 configuration:**

Package: Lorawan\_endnode\_main (with HAL for STM32WLE)  
Mode: OTAA  
Region: EU868  
Low power mode: disabled

**TTN end device configuration** :

Frequency plan: Europe 863-870 MHz (SF9 for RX2 - recommended)  
LoRaWAN version: LoRaWAN Specification 1.0.2  
Regional Parameters version: RP001 Regional Parameters 1.0.2 revision B

We didn’t modify anything in the se-identity.h other than the above mentioned EUI id’s.

**Logs**  
Wio e-5 is not joining the TTN network even after correctly following all the steps mentioned in the seeed studio’s github documentation

```auto
14:34:37.496 → APP_VERSION: V1.1.0
14:34:37.496 → MW_LORAWAN_VERSION: V2.3.0
14:34:37.496 → MW_RADIO_VERSION: V1.1.0
14:34:48.480 → ###### OTAA ######
14:34:48.782 → ###### AppKey: E1:5E:40:34:76:81:F5:16:07:60:00:CC:37:00:35:10
14:34:48.782 → ###### NwkKey: E1:5E:40:34:76:81:F5:16:07:60:00:CC:37:00:35:10
14:34:48.782 → ###### ABP ######
14:34:48.782 → ###### AppSKey: 21:7E:15:16:28:41:D7:A6:74:F7:E1:88:01:CF:4F:3C
14:34:48.782 → ###### NwkSKey: 21:7E:15:16:28:41:D7:A6:74:F7:E1:88:01:CF:4F:3C
14:34:59.915 → ###### DevEui: 2C:F1:F5:20:41:20:AB:8C
14:35:00.226 → ###### AppEui: 52:51:20:69:2E:54:48:26
14:35:00.226 → ###### DevAddr: 15:F9:45:F1
14:35:10.379 → 32s894:TX on freq 868100000 Hz at DR 0
14:35:32.175 → 54s676:MAC txTimeOut
14:35:33.910 →
14:35:33.910 → ###### = JOIN FAILED
14:35:58.169 → 80s677:temp= 27
14:35:58.169 → 80s677:VDDA= 254
14:36:04.850 → 87s350:TX on freq 868500000 Hz at DR 0
14:36:26.633 → 109s140:MAC txTimeOut
14:36:28.341 →
14:36:28.341 → ###### = JOIN FAILED
14:36:28.385 → 110s892:temp= 26
14:36:28.385 → 110s892:VDDA= 254
14:36:35.036 → 117s564:TX on freq 868100000 Hz at DR 0
14:36:56.816 → 139s346:MAC txTimeOut
14:36:58.567 →
14:36:58.567 → ###### = JOIN FAILED
14:36:58.567 → 141s098:temp= 26
14:36:58.567 → 141s098:VDDA= 254
14:37:05.236 → 147s769:TX on freq 868500000 Hz at DR 0
14:37:27.040 → 169s564:MAC txTimeOut
14:37:28.759 →
14:37:28.759 → ###### = JOIN FAILED
14:37:28.759 → 171s316:temp= 27
14:37:28.759 → 171s316:VDDA= 254
14:37:35.472 → 177s988:TX on freq 868500000 Hz at DR 0
14:37:57.225 → 199s786:MAC txTimeOut

```

**Hardware**  
Seeed studio’s LoRa Wio E-5 dev board with STM32WLE5J, Seeed studio’s Sensecap m2 gateway.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [November 29, 2024, 10:11am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/2 "2024-11-29T10:11:51Z")

</div>

Which .ioc did you use to generate the files - or if you used some pre-made files, where did you get them from?

Please format all logs / serial output with the \</\> tool, you can edit your post to do so.

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [November 29, 2024, 10:42am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/3 "2024-11-29T10:42:05Z")

</div>

I didn’t use cubemx to configure the device but directly changed the macros in the se-identity.h and lora\_app.h files. I got the package from the official [seeed studio lorawan node](https://github.com/Seeed-Studio/LoRaWan-E5-Node/tree/qian) repository.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [November 29, 2024, 2:33pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/4 "2024-11-29T14:33:04Z")

</div>

The LW version needs to be 1.0.3 - you can edit the device setup in Settings → Network layer.

Does the device Join Request appear in the gateway console?

How close to the gateway is the device - forum search will reveal much about having them too close!

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [November 29, 2024, 3:16pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/6 "2024-11-29T15:16:59Z")

</div>

I’ve tried every possible combination of configurations for the end device which includes having 1.0.3 LoRa version, nothing worked. And I can’t see anything in the gateway console too related to the end device’s join request. They are kept apart just less than 1 metre. I mean it did work with factory AT when they were kept the same distance apart.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [November 29, 2024, 4:51pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/7 "2024-11-29T16:51:28Z")

</div>

> [@ram\_chockalingam](#):
>
> They are kept apart just less than 1 metre.

Please search the forum about spacing & join requests & shouting at the gateway & overloading the RF and and and … 😉

TL;DR: **Lo** ng **Ra** nge needs 10m & a brick wall away.

The version set & even the EUI’s / Keys don’t matter until you’ve got the gateway hearing the Join Request.

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [December 2, 2024, 5:46am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/8 "2024-12-02T05:46:30Z")

</div>

Hi, after you said I had tried connecting it at more than 10m distance with a wall in between, but it still doesn’t join the network, and I also can’t see any join requests showing up in the gateway live data in TTN.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [December 2, 2024, 4:54pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/9 "2024-12-02T16:54:21Z")

</div>

> [@ram\_chockalingam](#):
>
> I also can’t see any join requests showing up in the gateway live data in TTN.

Does the log on the gateway show it hearing the device, even if its not then relayed up to TTN?

Note, this is NOT the TTN console - its the log on the gateway.

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [December 3, 2024, 2:00am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/10 "2024-12-03T02:00:44Z")

</div>

No, even on the Sensecap local gateway console I am unable to see any join requests or anything related to the end device.

---

<div class="post-metadata">

**Author:** ![kersing](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/kersing/32/44777_2.png) [@kersing](https://www.thethingsnetwork.org/forum/u/kersing)\
**Post date:** [December 3, 2024, 8:52am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/11 "2024-12-03T08:52:20Z")

</div>

Is the device transmitting on the right frequencies? Looking at the join attempts it is using EU868. Is your gateway set to EU868 as well? (Setup at the gateway, not the TTN console)

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [December 3, 2024, 9:59am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/12 "2024-12-03T09:59:31Z")

</div>

As well as the wisdom of @kersing, I see you’ve linked to a branch of the Seeed code rather than main.

They provide the AT command project as well, so you can, in theory, return the Wio-E5 to it’s original state, log the serial output and share it here so we can do a compare & contrast.

---

<div class="post-metadata">

**Author:** ![mluis1](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/mluis1/32/44669_2.png) [@mluis1](https://www.thethingsnetwork.org/forum/u/mluis1)\
**Post date:** [December 3, 2024, 10:15am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/13 "2024-12-03T10:15:23Z")

</div>

From the provided log It looks like that the end-device is not properly transmitting.

> [@ram\_chockalingam](#):
>
> ```auto
> 14:35:33.910 → ###### = JOIN FAILED
> 14:35:58.169 → 80s677:temp= 27
> 14:35:58.169 → 80s677:VDDA= 254
> 14:36:04.850 → 87s350:TX on freq 868500000 Hz at DR 0
> 14:36:26.633 → 109s140:MAC txTimeOut
> 
> ```

The end-device stack indicates that a Tx timeout occurred.  
Such timeout is triggered if the radio TxDone interrupt does not fire within specified time.

Most of time such issue is due to improper definition of the GPIOs controlling the radio device.

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [December 3, 2024, 11:08am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/14 "2024-12-03T11:08:38Z")

</div>

Probably best to use this:

> **[GitHub - danak6jq/Seeed-LoRa-E5: LoRaWAN end node built from scratch using...](https://github.com/danak6jq/Seeed-LoRa-E5)**
>
> LoRaWAN end node built from scratch using CubeMX for WLE5x in the LoRa-E5 - danak6jq/Seeed-LoRa-E5

I do, used it all day yesterday, used it for three years since release - its still based on ST’s variant of LoRaMac-node so you can’t just hack on it like it was Arduino so no escaping the wonders of learning CubeIDE / ST HAL etc

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [December 4, 2024, 8:12am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/15 "2024-12-04T08:12:30Z")

</div>

Have you come across the AT command project? If so can you send me the repository link?

---

<div class="post-metadata">

**Author:** ![descartes](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/descartes/32/47220_2.png) [@descartes](https://www.thethingsnetwork.org/forum/u/descartes)\
**Post date:** [December 4, 2024, 9:41am UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/16 "2024-12-04T09:41:26Z")

</div>

It’s in the Seeed repro you’ve linked to, just use Main and not the branch

---

<div class="post-metadata">

**Author:** ![ram\_chockalingam](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/r/e480ec/32.png) [@ram\_chockalingam](https://www.thethingsnetwork.org/forum/u/ram_chockalingam)\
**Post date:** [December 10, 2024, 2:49pm UTC](https://www.thethingsnetwork.org/forum/t/unable-to-connect-wio-e5-dev-kit-to-ttn-using-stm32cubeide/69909/17 "2024-12-10T14:49:50Z")

</div>

Sorry for the delay, even after trying with the main repo files we got the same results. Anyways we got it successfully working with LoRa E5 AT command library in arduino ide using ESP32 for our application.
