# Can't register Gateway - EUI is still in use

**URL:** <https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952>\
**Category:** Gateways\
**Created:** [August 14, 2017, 11:16am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952 "2017-08-14T11:16:22Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 1, 2018, 10:40am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/25 "2018-09-01T10:40:27Z")

</div>

Thank you for the lesson, borroz.  
But that was my problem and why i deleted my account.  
I had a few applications, which i could not delete and i deleted my gateway before i delete my account. 😓

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [September 1, 2018, 10:44am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/26 "2018-09-01T10:44:40Z")

</div>

> [@arjanvanb](#):
>
> or you could register a human-readable GatewayID and use an MQTT forwarder to connect to TTN.

uhhhhhhhhhhhhh … 🕶

so how do you change (spoof) your mac adress in a RPI ?  
[https://www.raspberrypi.org/forums/viewtopic.php?t=171534](https://www.raspberrypi.org/forums/viewtopic.php?t=171534)

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [September 1, 2018, 10:48am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/27 "2018-09-01T10:48:22Z")

</div>

yes I understand your problem… very normal, really hope they can help you soon.

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 1, 2018, 1:15pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/28 "2018-09-01T13:15:32Z")

</div>

thank you for your help arjanvanb.

Sounds good, but where can i change the configuration of my gateway/the gateway’s code?

I installed the gateway with this tutorial -\> [http://www.technoblogy.com/show?1XKI](http://www.technoblogy.com/show?1XKI)  
Last time i registered my gateway in the console on ttn it works with this tutorial, but now the problem with the already existing eui-id.

So how can i change now the gateway’s code?

Sorry, i’m a completely newbie and that’s why so much questions…

best regards

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [September 1, 2018, 1:27pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/29 "2018-09-01T13:27:40Z")

</div>

So you’re using [https://github.com/ttn-zh/ic880a-gateway](https://github.com/ttn-zh/ic880a-gateway) for which `install.sh` generates the gateway’s EUI only once, [using](https://github.com/ttn-zh/ic880a-gateway/blob/master/install.sh#L47-L50):

```bash
GATEWAY_EUI=$(ip link show $GATEWAY_EUI_NIC | awk '/ether/ {print $2}' | awk -F\: '{print $1$2$3"FFFE"$4$5$6}')
GATEWAY_EUI=${GATEWAY_EUI^^} # toupper

echo "Detected EUI $GATEWAY_EUI from $GATEWAY_EUI_NIC"

```

…and then when selecting “N” for `Do you want to use remote settings file?` will write it to the local configuration file, defined in `$LOCAL_CONFIG_FILE`, [using](https://github.com/ttn-zh/ic880a-gateway/blob/master/install.sh#L181-L183):

```bash
echo -e "{\n\t\"gateway_conf\": {\n\t\t\"gateway_ID\": \"$GATEWAY_EUI\",\n\t\t\"servers\": [{ \"server_address\": \"router.eu.thethings.network\", \"serv_port_up\": 1700, \"serv_port_down\": 1700, \"serv_enabled\": true }],\n\t\t\"ref_latitude\": $GATEWAY_LAT,\n\t\t\"ref_longitude\": $GATEWAY_LON,\n\t\t\"ref_altitude\": $GATEWAY_ALT,\n\t\t\"contact_email\": \"$GATEWAY_EMAIL\",\n\t\t\"description\": \"$GATEWAY_NAME\" \n\t}\n}" >$LOCAL_CONFIG_FILE

```

The config file is defined as:

```bash
# Install LoRaWAN packet forwarder repositories
INSTALL_DIR="/opt/ttn-gateway"
...
LOCAL_CONFIG_FILE=$INSTALL_DIR/bin/local_conf.json

```

So, I’d say **you can edit `/opt/ttn-gateway/bin/local_conf.json` to change `gateway_ID`** :

```bash
sudo nano /opt/ttn-gateway/bin/local_conf.json

```

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 1, 2018, 1:38pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/30 "2018-09-01T13:38:19Z")

</div>

thank you so much, but now i have the problem:

“…no such file or directory”

-\> So, I’d say you can edit /opt/ttn-gateway/bin/local\_conf.json to change gateway\_ID.

Do i have to do it on the gateway/pi per ssh? or put the stick in my notebook and search the file with explorer?

You see, i’m really new in this…

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [September 1, 2018, 1:44pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/31 "2018-09-01T13:44:33Z")

</div>

Yes, it’s a file on your gateway’s Pi, so using SSH, and then use an command line editor such as `nano /opt/ttn-gateway/bin/local_conf.json`, might be easiest. What command do you use to start the gateway? That should be in `/opt/ttn-gateway` too.

You might need to be `root` to edit the file: `sudo nano /opt/ttn-gateway/bin/local_conf.json`.

By the way, to create a random EUI using @terrillmoore’s little tool:

```bash
git clone https://github.com/things-nyc/random-eui64.git
cd random-eui64/
make random-eui64

```

I ignored a warning on a Mac, `warning: format specifies type 'size_t' (aka 'unsigned long') but the argument has type 'unsigned int'`. Next, run:

```bash
./random-eui64

```

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 1, 2018, 1:48pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/32 "2018-09-01T13:48:36Z")

</div>

Great! I’m getting closer, thank you so much! 🙂

“make random-eui64” - this command before i install the complete gateway with the tutorial from gonzalo/ttn-zh or after everything is ready?

---

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [September 1, 2018, 1:51pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/33 "2018-09-01T13:51:15Z")

</div>

The tool to generate random EUIs is only needed before you edit the config file. Running it will give you a new EUI every time you need one, from which you remove the dashes and then copy it into the configuration file.

```bash
./random-eui64
D6-B6-80-D1-D5-1B-E3-1D

```

…or to remove the dashes on the fly, use `./random-eui64 | tr -d '-'`:

```bash
./random-eui64 | tr -d '-'
36D06C66546116EE
./random-eui64 | tr -d '-'
56C14B98C630E178
./random-eui64 | tr -d '-'
123E454624E1B7C1
./random-eui64 | tr -d '-'
3A04F9A32A0B532F

```

I am not using the above EUIs myself 😉

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 1, 2018, 6:27pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/39 "2018-09-01T18:27:08Z")

</div>

arjanvanb - thank you so much!  
i’ve found the problem.

now its working!

thank you so much!

the problem was, when i tried to change the local\_conf.json file, i was still as ttn registered, then i disconnect the connection to the raspberry and logged in as lgw.

then it works with ./random-eui64 and changing the eui in the local\_conf.json file.

you made my day! thank you so much!

---

<div class="post-metadata">

**Author:** ![terrillmoore](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/terrillmoore/32/47115_2.png) [@terrillmoore](https://www.thethingsnetwork.org/forum/u/terrillmoore)\
**Post date:** [September 1, 2018, 9:02pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/40 "2018-09-01T21:02:51Z")

</div>

Thanks @arjanvanb for pointing out the compile warning. I don’t happen to use a Mac very often and I had not tested. It turned out to be a common problem on systems with 64-bit `size_t`; Ubuntu 64-bit and macOS in particular. It’s a path that is never taken unless `read()` from `/dev/random` fails, which isn’t supposed to happen. But it needed fixing, and it’s now fixed. ([https://github.com/things-nyc/random-eui64/issues/1](https://github.com/things-nyc/random-eui64/issues/1)).

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 20, 2018, 8:18am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/41 "2018-09-20T08:18:13Z")

</div>

@arjanvanb @BoRRoZ @gonzalo  
Please can someone help me with deleting my gateway out from TTN?  
I’m going crazy with it.

It worked with the ./random-eui64 - the help from arjanvanb, but i have a new gateway and the old gave someone. He can’t register the gateway, because the EUI B827EBFFFE870380 is still registered from TTN side.

I had so much issues and problems with my account and deleting of applications, devices and gateway.  
When i deleted a device, application or gateway it wasn’t possible and if it was possible, there was still a a counted device.

Sometime i lost my patience and deleted my account.

So that is the problem now, beause somewhere in the TTN or backend of TTN my device with the EUI B827EBFFFE870380 is still registered.

Is there a contact from TTN or support, which can help me with my problem?

Thank you and greets  
Albert

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [September 20, 2018, 8:30am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/42 "2018-09-20T08:30:57Z")

</div>

> [@albertrgashi](#):
>
> Is there a contact from TTN

I notified the Community Manager about your problem

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [September 25, 2018, 7:29am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/43 "2018-09-25T07:29:19Z")

</div>

> [@albertrgashi](#):
>
> contact from TTN or support, which can help me with my problem?

just to check… how’s the current situation ?

@rish1

---

<div class="post-metadata">

**Author:** ![albertrgashi](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/albertrgashi/32/38954_2.png) [@albertrgashi](https://www.thethingsnetwork.org/forum/u/albertrgashi)\
**Post date:** [September 25, 2018, 8:11am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/44 "2018-09-25T08:11:53Z")

</div>

Hi BoRRoZ

If this question is for me: Nothing happens til today

---

<div class="post-metadata">

**Author:** ![BoRRoZ](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/borroz/32/44234_2.png) [@BoRRoZ](https://www.thethingsnetwork.org/forum/u/BoRRoZ)\
**Post date:** [September 25, 2018, 8:21am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/45 "2018-09-25T08:21:07Z")

</div>

I contacted @Rish again just now and asked him about the status of this.

---

<div class="post-metadata">

**Author:** ![zone11](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/zone11/32/38631_2.png) [@zone11](https://www.thethingsnetwork.org/forum/u/zone11)\
**Post date:** [October 9, 2018, 6:58am UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/46 "2018-10-09T06:58:22Z")

</div>

Hi and sorry for coming late to the party!

I purchased the hardware from @albertrgashi and tried to register the gateway with its official MAC.  
Thats the reason why he is asking for support deleting the old record, most likely still associated with his delete account.

The gateway _b827ebfffe870380_ is still registered in the database with its original position:

```nohighlight
{
   "timestamp":"2018-09-01T10:03:01.520929179Z",
   "uplink":"303776",
   "downlink":"164",
   "location":{
      "latitude":47.30533,
      "longitude":9.081753,
      "altitude":610,
      "source":"REGISTRY"
   },
   "platform":"IMST + Rpi",
   "gps":{
      "latitude":47.30533,
      "longitude":9.081753,
      "altitude":610,
      "source":"REGISTRY"
   },
   "time":"1535796181520929179",
   "rx_ok":303776,
   "tx_in":164
}

```

Is there any chance to give have access again to this gateway for me @zone11 or its previews owner @albertrgashi ?  
Manually generated EUI break my workflow and the hardware would remain unusable for me.

TNX!

---

<div class="post-metadata">

**Author:** ![bensimmo](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@bensimmo](https://www.thethingsnetwork.org/forum/u/bensimmo)\
**Post date:** [November 24, 2018, 2:57pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/47 "2018-11-24T14:57:51Z")

</div>

Trying to setup an account using legacy (after failed standard method) I’m new to all this, So deleted the old and trying legacy as that’s what I probably have.  
I have 000000FFFF000000 and it already registered, a look in the link above through the list and it is there, look like it could be me. has my name from running my script to connect… to get the address.  
How do I register if it already sees it and there now is no account?  
Or is it something else?

---

<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:** [November 24, 2018, 3:47pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/48 "2018-11-24T15:47:19Z")

</div>

> [@bensimmo](#):
>
> 000000FFFF000000

That is not a valid EUI. You are probably using a device without eth0 network and need to adapt the script to generate a EUI based on the correct name. Use the command ‘ip address’ to list the network adapters available and use the one with a valid IP address listed. Search in the script for eth0 and replace it with the name you found.

---

<div class="post-metadata">

**Author:** ![bensimmo](https://www.thethingsnetwork.org/forum/letter_avatar_proxy/v4/letter/b/c57346/32.png) [@bensimmo](https://www.thethingsnetwork.org/forum/u/bensimmo)\
**Post date:** [November 24, 2018, 3:53pm UTC](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952/49 "2018-11-24T15:53:31Z")

</div>

just been doing that eventually found it and hadcoded one, it’s in C and I’m not a C person. It’s a PiZero so no eth0. Seem silly rather than just having it as a config setting, but guess that’s the program used.  
Still seems daft they don’t get removed from TTN.

Anyway it was valid as it’s now in that server list as 000000ffff000000. 😉  
At some point I should figure out this new version as it’s better. But finding how to do it in python of just some make script for a Pi is not easy. I cannot afford a full blown gateway and there are none near me (yet!)

Many Thanks

[Previous page](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952.md?page=1)

[Next page](https://www.thethingsnetwork.org/forum/t/cant-register-gateway-eui-is-still-in-use/8952.md?page=3)
