Regarding scripting of certification to cloud

Hi everyone!

In preparations of getting our custom nRF9160 HW, I'm making use of the fantastic scripts to generate credentials and provision our devices with nRFCloud.

I have successfully generate our CA as such:

python create_ca_cert.py -c NO -o "Copmany AS" -cn Company -e [email protected] -p absolute/path/to/output/folder -f company-

Then I installed the credentials as such:

python device_credentials_installer.py -A -d --ca absolute/path/to/...efd212_ca.pem --ca_key absolute/path/to/...efd212_prv.pem --csv provision.csv --rtt --devinfo devinfo.csv --devinfo_append --mosh_rtt_hex absolute/path/to/merged.hex

Finally I provisioned them as such:

python nrf_cloud_provision.py --apikey $APIKEY --csv provision.csv --devinfo devinfo.csv --name_prefix Company- --name_imei

All the scripts run without error.

However, after installing my own app on the device again, and attempting to connect to the cloud, I get 

<dbg> app: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_CONNECTING
<err> nrf_cloud_transport: MQTT input error: -128
<err> nrf_cloud_transport: Error disconnecting from cloud: -128
<dbg> app: cloud_event_handler: NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED

Q1: I guess I've missed a step somewhere? A new device shows up in the web portal. Can you please guide me? Is there something I've done wrong or missed?

Q2: The device in the web portal has a long and unreadable name. How can I chose my own name of the devices? I would like them to be more readable. I tried using devinfo with --name_prefix and --name_imei, but alas, to no avail. I guess I've misunderstood the meaning of the devinfo here? Are there any ways to chose my own name during this process?

Thank you all for all and any help!

Kind regards,

Torje

Related