Table of Contents:

1. Delete devices from built-in TTS

Method 1:

1.1 Upgrade LPS8v2's TTS to HTTPS

1). Download the upgrade script

wget http://repo.dragino.com/release/tool/ttnstack/upgrade_to_https.sh && chmod +x upgrade_to_https.sh

1690793819929-828.png

2). Run the upgrade script

./upgrade_to_https.sh <step> <Local Ip Address>

1690793801312-653.png

Note that:

parameter 1 tells the script which steps it should start from.

parameter 2 is the configured local IP address.

3). Check the TTS running status

1690793877462-490.png

1.2 Install ttn-lw-cli

1.2.1 Download ttn-lw-cli

https://www.thethingsindustries.com/docs/the-things-stack/interact/cli/installing-cli/#installing-using-pre-built-binaries

1690794001186-556.png

Login the lps8v2's tts via ttn-lw-cli

1690794013040-498.png

Node:

You need to configure a ca certificate for the cli, The ca certificate is inside the gateway and the directory path is : /usr/lib/ttn-stack/ca.pem

Manually modify the ttn-lw-cli configuration file .ttn-lw-cli.yml:

image-20231106140006-2.png

ttn-lw-cli directory tree structure:

image-20231106135912-1.png

1.2.2 Delete End node

1690794073644-821.png

Method 2:Delete devices through the API

1.1 Generate API Keys

image-20231120163713-1.png

image-20231120163955-2.png

image-20231120164209-3.png

1.2 Delete End node

image-20231120164944-4.png

For example, to delete the devices eui-5ce8824bad98531d in the applications 11111:

Users need to access the Linux console of the gateway through SSH, and then enter the following command

curl --location \
  --header "Authorization: Bearer NNSXS.XXXXXXXXX" \
  --request DELETE \
  'https://built-in_ttn_IP_Address:8080/api/v3/applications/{Application_ID}/devices/{device_id}'

image-20231120165357-5.png

When the command succeeds, the output {} is displayed.

2. Delete devices from built-in ChirpStack

Users need to access the Linux console of the gateway through SSH, and then enter the following command to clear the built-in ChirpStack:

cd /usr/local/chirpstack/

systemctl stop chirpstack

docker-compose down

image-20231106094833-2.png

docker volume rm chirpstack_postgresqldata

docker volume rm chirpstack-redisdata

image-20231106095035-3.png

Re-run ChirpStack

systemctl start chirpstack

 

Tags:
    
Copyright ©2010-2024 Dragino Technology Co., LTD. All rights reserved
Dragino Wiki v2.0