WisDM can't add gateway

Issue: Trying to add gateway to WisDM, but getting error: “The gateway is offline. Central gateway should be online for adding to the location.”

The gateway is online, connected over LTE cellular. I have setup the location network settings identical to how the wisgate is configured.

Setup:

Hostname RAK7289C
Model RAK7289C
SN 918100GJ6011203433
Gateway EUI ac1f09fffe064d51
Firmware Version 1.3.1_RAK b71
Local Time Thu Jan 27 21:13:44 2022
Uptime 0h 4m 15s
Load Average 0.40, 0.79, 0.39
GPS N.42.695384, W.70.790328, 22m

Cellular status:
Cellular Status
Interface: wwan0
Type: dhcp
MAC-Address: 0A:15:29:FA:64:BA
IPv4: 10.212.39.83/29
Gateway: 10.212.39.84
DNS: 100.127.0.53
DNS: 100.127.1.53
RX: 28.35 KB(211 Pkts.)
TX: 27.18 KB(291 Pkts.)
Connected: 0h 4m 3s

Signal level
Network AT&T FDD LTE
ICCID 8942310019001555283F
IMEI 869394030466111
IMSI 295050911065528
Phone Number

LoRa® Server:

Details: log from the Wisgate:
‘’’
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: . Seeding the random number generator…
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: . Loading the CA root certificate …
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: ok (0 skipped)
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: . Loading the client cert. and key…
Thu Jan 27 20:41:58 2022 daemon.notice netifd: Interface ‘wwan’ is now up
Thu Jan 27 20:41:58 2022 daemon.info dnsmasq[2821]: reading /tmp/resolv.conf.auto
Thu Jan 27 20:41:58 2022 daemon.info dnsmasq[2821]: using local addresses only for domain lan
Thu Jan 27 20:41:58 2022 daemon.info dnsmasq[2821]: using nameserver 100.127.0.53#53
Thu Jan 27 20:41:58 2022 daemon.info dnsmasq[2821]: using nameserver 100.127.1.53#53
Thu Jan 27 20:41:58 2022 daemon.notice netifd: wwan (3000): Warning: Executing wildcard deletion to stay compatible with old scripts.
Thu Jan 27 20:41:58 2022 daemon.notice netifd: wwan (3000): Explicitly specify the prefix length (169.254.77.81/32) to avoid this warning.
Thu Jan 27 20:41:58 2022 daemon.notice netifd: wwan (3000): This special behaviour is likely to disappear in further releases,
Thu Jan 27 20:41:58 2022 daemon.notice netifd: wwan (3000): fix your scripts!
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: ok
Thu Jan 27 20:41:58 2022 user.debug wisdm[2875]: . Connecting to as7cnaqfm7pfs-ats.iot.eu-central-1.amazonaws.com/443
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: ok
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: . Setting up the SSL/TLS structure…
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: SSL state connect : 0
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: ok
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: SSL state connect : 0
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: . Performing the SSL/TLS handshake…
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: Verify requested for (Depth 2):
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: cert. version : 3 serial number : 06:6C:9F:CF:99:BF:8C:0A:39:E2:F0:78:8A:43:E6:96:36:5B:CA issuer name : C=US, O=Amazon, CN=Amazon Root CA 1 subject name : C=US, O=Amazon, CN=Amazon Root CA 1 issued on : 2015-05-26 00:00:00 expires on : 2038-01-17 00:00:00 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=true key usage : Digital Signature, Key Cert Sign, CRL Sign
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: This certificate has no flags
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: Verify requested for (Depth 1):
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: cert. version : 3 serial number : 06:7F:94:57:85:87:E8:AC:77:DE:B2:53:32:5B:BC:99:8B:56:0D issuer name : C=US, O=Amazon, CN=Amazon Root CA 1 subject name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon issued on : 2015-10-22 00:00:00 expires on : 2025-10-19 00:00:00 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=true, max_pathlen=0 key usage : Digital Signature, Key Cert Sign, CRL Sign
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: This certificate has no flags
Thu Jan 27 20:41:59 2022 user.debug wisdm[2875]: Verify requested for (Depth 0):
Thu Jan 27 20:42:00 2022 user.debug wisdm[2875]: cert. version : 3 serial number : 06:7C:0D:B3:1F:16:E6:44:46:A0:BE:91:1A:2F:D8:8E issuer name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon subject name : CN=*.iot.eu-central-1.amazonaws.com issued on : 2021-08-24 00:00:00 expires on : 2022-07-28 23:59:59 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=false subject alt name : iot.eu-central-1.amazonaws.com, .iot.eu-central-1.amazonaws.com key usage : Digital Signature, Key Encipherment ext key usage : TLS Web Server Authentication, TLS Web Client Authentication
Thu Jan 27 20:42:00 2022 user.debug wisdm[2875]: This certificate has no flags
Thu Jan 27 20:42:01 2022 user.notice ping-watchdog: alias eth0.2 ifup
Thu Jan 27 20:42:01 2022 user.notice firewall: Reloading firewall due to ifup of alias (eth0.2)
Thu Jan 27 20:42:02 2022 daemon.info mqttEv[2300]: mqttEvRegister : Register mosquitto event [AppSrv Mqtt Client]
Thu Jan 27 20:42:02 2022 daemon.info bufwr[2300]: bufwrInit Done.
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: ok [ Protocol is TLSv1.2 ] [ Ciphersuite is TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256 ]
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: [ Record expansion is 29 ]
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: . Verifying peer X.509 certificate…
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: ok
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: . Peer certificate information …
Thu Jan 27 20:42:03 2022 user.debug wisdm[2875]: cert. version : 3 serial number : 06:7C:0D:B3:1F:16:E6:44:46:A0:BE:91:1A:2F:D8:8E issuer name : C=US, O=Amazon, OU=Server CA 1B, CN=Amazon subject name : CN=
.iot.eu-central-1.amazonaws.com issued on : 2021-08-24 00:00:00 expires on : 2022-07-28 23:59:59 signed using : RSA with SHA-256 RSA key size : 2048 bits basic constraints : CA=false subject alt name : iot.eu-central-1.amazonaws.com, *.iot.eu-central-1.amazonaws.com key usage : Digital Signature, Key Encipherment ext key usage : TLS Web Server Authentication, TLS Web Client Authentication
Thu Jan 27 20:42:03 2022 user.info wisdm[2875]: Shadow Connect Success
Thu Jan 27 20:42:05 2022 daemon.info appSrv[2300]: appMqttConnectCB: [AppSrv Mqtt Client] Connect Success …
Thu Jan 27 20:42:05 2022 daemon.info mqttEv[2300]: [AppSrv Mqtt Client] subscribe application/+/device/+/tx - QOS 0
Thu Jan 27 20:42:05 2022 daemon.info mqttEv[2300]: [AppSrv Mqtt Client] subscribe mcast_group/+/tx - QOS 0
Thu Jan 27 20:42:05 2022 daemon.info mqttEv[2300]: [AppSrv Mqtt Client] subscribe api/request - QOS 0
Thu Jan 27 20:42:05 2022 daemon.info appSrv[2300]: [AppSrv Mqtt Client]:subscribe success - mid [1] - qos_count [1] - granted_qos [0]
Thu Jan 27 20:42:05 2022 user.notice ping-watchdog: loopback lo ifup
Thu Jan 27 20:42:05 2022 daemon.info appSrv[2300]: [AppSrv Mqtt Client]:subscribe success - mid [2] - qos_count [1] - granted_qos [0]
Thu Jan 27 20:42:05 2022 daemon.info appSrv[2300]: [AppSrv Mqtt Client]:subscribe success - mid [3] - qos_count [1] - granted_qos [0]
Thu Jan 27 20:42:06 2022 user.info wisdm[2875]: Update Shadow: {“state”:{“reported”:{“company”:“rakwireless”,“gatewayEUI”:“ac1f09fffe064d51”,“model”:“RAK7289C”,“loraModuleNb”:“1”,“loraFreqBand”:“915”,“mac”:“AC:1F:09:06:4D:51”,“sn”:“918100GJ6011203433”,“LTESupport”:true,“version”:“1.3.1”,“build_no”:“b71”,“sw_sku”:“RAK”,“dev_core”:“RAK634”,“capabilities”:[“dying_gasp”,“solar_battery”],“modules”:{“dm_agent”:“1.0.1”},“encrypt_ver”:1,“registered”:false,“encrypt_en”:0}},“clientToken”:“918100GJ6011203433-0”,“thingname”:“918100GJ6011203433”,“timestamp”:1643316126}
Thu Jan 27 20:42:07 2022 user.notice mwan3: ifup interface wwan (wwan0)
Thu Jan 27 20:42:09 2022 user.info wisdm[2875]: basic_update Accepted !!
Thu Jan 27 20:42:10 2022 user.info wisdm[2875]: Action key called : {“state”: {“action”: “key”, “data”: {“key”: “7e98e399b7dd0cf594c6a9966df19781”, “iv”: “8840ed513e70256e”}}}
Thu Jan 27 20:42:11 2022 user.info wisdm[2875]: Update devconfig basic: {“state”:{“reported”:{“report”:“device”,“encrypt_en”:0}},“clientToken”:“918100GJ6011203433-1”,“thingname”:“918100GJ6011203433”,“timestamp”:1643316131}
Thu Jan 27 20:42:11 2022 user.notice ping-watchdog: wwan wwan0 ifup
Thu Jan 27 20:42:11 2022 user.notice firewall: Reloading firewall due to ifup of wwan (wwan0)
Thu Jan 27 20:42:14 2022 user.info wisdm[2875]: Update Device Config Basic Accepted !!
‘’’

Hello @ec3 Are you trying to add a central gateway or a follower? It seems you are using the built-in server work mode for your location. Once the Central gateway is added and it is online, then you can add followers. Note: once the WisDM integration is turned on in the gateway, the settings will be overridden by the ones set up in the WisDM.

I have 3 gateways that I need to deploy in the field and need to be able to access remotely to support operation over time. These gateways will be installed at 3 different industrial plants. Each gateway will have the internal LNS enabled, with the global integration genericMQTT to AWS IoT Core. Pelase advise how this should be setup, would it be 3 different locations or just 1? Would they all be a central gateway or follower (I don’t understand this concept). Also please advise if there is any documentation for WisDM that would explain all of the questions above.

You can have 1 gateway in Built-in Network Server mode as a main gateway and have the others communicate with it as secondary ones. This is why:

  • In case you need 3 gateways working in Built-in Network Server mode, those gateways need to be organized in 3 different Locations in the WisDM platform.
  • If you want to use a single Location, the central gateway should be the one running the Built-in Network Server and any other RAK Edge gateway in that Location should be set to forward all the traffic to the central gateway (via setting them as “extenders”). This way the central gateway will be handling the communication on the application server level from all gateways connected.
    WisDM FAQ - https://support.wisdm.rakwireless.com/hc/en-us
    A detailed guide will be available soon.

Thanks for the details…I am simply trying to get one GW connected with WisDM right now and it does not seem to work. The GW has been online with LTE for days, but I get the error in WisDM as listed in my previous message. Can you advise how to help debug this single GW?

Are you able to setup a GW in WisDM if it connected over LTE cellular, or does it have to be connected with Wifi or Wired Ethernet instead?

Hi @ec3 There was a bug which was solved. Now you should be able to onboard normally.

1 Like

Having the same issue now.

Keeps saying “The gateway is offline. Central gateway should be online for adding to the location.” when trying to add it with a local NS.

The gateway is actually online and connected via cellular network.

EDIT: After a lot of retries it finally got added

@gmazzantiqa can you reach me on PM to share the syslogs and more info?

Hi, I’m having same problem
I had a previous gateway on my location, I deleted it completely and trying to add a new one.
Keep saying “The gateway is offline. Central gateway should be online for adding to the location.”
The gateway has internet access as I tested using Network - Diagnostics - ping to dev.openwrt.org.
The system log shows:
Wed Jun 28 19:25:39 2023 user.info wisdm[32251]: AWS IoT SDK Version 3.0.1-
Wed Jun 28 19:25:39 2023 user.info wisdm[32251]: WisDM Agent Version 1.1.2
Wed Jun 28 19:25:39 2023 user.info wisdm[32251]: ThingName 918100GE6020913002
Wed Jun 28 19:25:40 2023 user.debug lora_pkt_fwd[5476]: gps sat : 12, gps mod : D, gps status: 2
Wed Jun 28 19:25:40 2023 user.info wisdm[32251]: Shadow Init
Wed Jun 28 19:25:40 2023 user.err wisdm[32251]: failed ! mbedtls_x509_crt_parse returned -0x2180 while parsing device cert
Wed Jun 28 19:25:40 2023 user.err wisdm[32251]: Shadow Connection Error
Wed Jun 28 19:25:40 2023 user.info wisdm[32251]: Disconnecting
Wed Jun 28 19:25:40 2023 user.err wisdm[32251]: Disconnect error -13

Could you give me some advice?
Thank you in advance

Eduardo

Hi @EduardoAA can you try to do a factory reset of the gateway and then try to add it to the WisDM.