Skip to content

Commit 1e2c521

Browse files
peter-pycommsariisik
authored andcommitted
ttn: fix gateway eui
fix buffer protocol error and remove wrong indentation for easy copy/paste
1 parent 05bdd34 commit 1e2c521

File tree

1 file changed

+5
-5
lines changed
  • content/gettingstarted/registration/lora

1 file changed

+5
-5
lines changed

content/gettingstarted/registration/lora/ttn.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,11 @@ Inside the TTS Console, there are two options, `Applications` and `Gateways`. Se
7070
Here, it is important we add the `Gateway ID` and `Gateway EUI`. The first can be an identifying string of characters unique to the gateway. The latter is what we'll use in the gateway configuration on the device, and exists of 16 hexadecimal characters. You can use the following to generate the `Gateway EUI`:
7171

7272
```python
73-
from network import WLAN
74-
import binascii
75-
wl = WLAN()
76-
binascii.hexlify(wl.mac())[:6] + 'FFFE' + binascii.hexlify(wl.mac())[6:]
77-
```
73+
from network import WLAN
74+
import binascii
75+
wl = WLAN()
76+
binascii.hexlify(wl.mac().sta_mac)[:6] + 'fffe' + binascii.hexlify(wl.mac().sta_mac)[6:]
77+
```
7878

7979
These are unique to each gateway, location and country specific frequency. Please verify that correct settings are selected otherwise the gateway will not connect to TTN. Further down the page, you will have to select a frequency plan. Select the one appropriate for your region and/or the one compatible with your nodes. After that, you can create the gateway.
8080

0 commit comments

Comments
 (0)