Cloud IoT Core subscription error [Solved]


#1

Hi!
I’m setting up LoraServer using GCP services as it fits with my microservice IoT platform.

I have an issue when the LoRa Gateway Bridge tries to subscribe to the device topic:

SUBSCRIBE: Failed to subscribe to topic: '/devices/gw-b827ebfffe01adba/commands/#'

Am I missing something?

Thanks in advance!


#2

Could you please provide the exact steps to reproduce this?


#3

Sorry @brocaar for my VERY late response…

I’ve followed the Quickstart guide:

  • Created the IoT Core registry
  • Generated a public-private kay pair without passphrase
  • Created a device in IoT Core with the afromentioned public key
  • Installed an configured the TOML file with the GCP options and the corresponding project info and device

These logs are both in the Gateway (a raspberry pi 3) and in the IoT Core logs

This is the full error log:

{
 insertId:  "nle8fxf5pw3tk"  
 jsonPayload: {
  eventType:  "SUBSCRIBE"   
  mqttTopic:  "/devices/gw-b827ebfffe01adba/commands/#"   
  protocol:  "MQTT"   
  resourceName:  "projects/ecosistema-gpe/locations/us-central1/registries/AU921-GATEWAYS/devices/2767769586024007"   
  serviceName:  "cloudiot.googleapis.com"   
  status: {
   code:  3    
   message:  "SUBSCRIBE: Failed to subscribe to topic: '/devices/gw-b827ebfffe01adba/commands/#'."    
  }
 }
 labels: {
  device_id:  "gw-b827eb54f8ef"   
 }
 logName:  "projects/ecosistema-gpe/logs/cloudiot.googleapis.com%2Fdevice_activity"  
 receiveTimestamp:  "2018-11-02T11:46:48.509684102Z"  
 resource: {
  labels: {
   device_num_id:  "2767769586024007"    
   device_registry_id:  "AU921-GATEWAYS"    
   location:  "us-central1"    
   project_id:  "ecosistema-gpe"    
  }
  type:  "cloudiot_device"   
 }
 severity:  "ERROR"  
 timestamp:  "2018-11-02T11:46:48.089890002Z"  
}

Thanks in advance!

PD: More data:

I’ve changed the device ID to match the packet-forwarder gw id, because there were not the same… but still nothing :frowning:


#4

Holy…
The device ID is CASE SENSITIVE!

It’s working now, thanks!!