Closed TjazVracko closed 4 years ago
Output over UART is more or less as expected, but the device is unable to connect to the MQTT broker, giving
error -95
, which is defined asEOPNOTSUPP 95 /* Operation not supported on transport endpoint */
. It does however connect to the network and is issued an IP.
I am not sure that this is the right error name for the code, at least looking at the source code I don't see it used in conjunction with the cloud backend.
I think you mean ENOTSUP
, which is used here?
It looks like the backend is not properly included in your custom firmware.
I have a working build evironment and have the whole stack (FW + AWS) working on nrf9160DK and Thingy91.
Are you building the firmware for those (which seems to be working) the same way? If yes, what is the diff then between those projects and the project for the custom PCB?
Yes, I meant ENOTSUP
, but following the definition it is defined as EOPNOTSUPP
.
I am building the firmware like this, both for the dev-kit and for our custom board:
west build -p -b nrf9160_pca10090ns -d build10090ns
nrfjprog -f nrf91 --program ./build10090ns/zephyr/merged.hex --sectoranduicrerase -r
The code/project is exactly the same (unmodified cat-tracker-fw). I am doing the building and flashing from the same directory. Do I need to pass different build flags for the SICA chip?
So, just to confirm, that firmware build works on the 91DK but not on your custom PCB. You should be able to use exactly the same FW for both.
Have you updated the modem firmware on your custom PCB's SIP?
This documentation entry hints that it might be the certificates, although the way you provision the certificates look good.
Have you tried to use the LinkMonitor to write the certificates?
I managed to recreate this erroneous behavior by intentionally using the wrong certificates for my TLS connection. Please make sure that your certificates are flashed correctly, and that the correct certificates are used.
Just for reference, the errorcode 95
is neither defined in NCS nor in Zephyr and we believe that it's a pass-through from the modem.
Thanks. How can I make sure the certificates are flashed correctly? How can I access the certificate strings from FW code to be able to print them?
How can I make sure the certificates are flashed correctly?
Use the nRF Connect for Desktop LinkMonitor to flash them, as described in the handbook.
How can I access the certificate strings from FW code to be able to print them?
This is not possible, because the certificate is store in a secure location which is not readable from the application (otherwise an attacker could read out the private key and impersonate a device).
Greetings,
my colleague managed to flash the certificates correctly using LTE Link Monitor on his Windows machine. I still can't flash them correctly on Ubuntu - don't know why, but this might need investigating. We can close the issue.
Hello, I have a working build evironment and have the whole stack (FW + AWS) working on nrf9160DK and Thingy91. We have manufactured out own prototype board with the nrf9160 SICA B0 1924 AH chip and I am now trying to get it to connect to AWS.
I connect our board to the nrf9160DK via the JLink cable and can build and flash the same way as for the nrf9160DK
First, I flashed the AT client and uploaded generated certificates:
Te above commands are the same as LTE link monitor uses when uploading certificates over the GUI.
Listing the certificates gets me this output:
Then I flash the cat-tracker-fw
Output over UART is more or less as expected, but the device is unable to connect to the MQTT broker, giving
error -95
, which is defined asEOPNOTSUPP 95 /* Operation not supported on transport endpoint */
. It does however connect to the network and is issued an IP.See output bellow. I have bolded the relevant parts:
I have looked through the code and can see that the error print happens in the
cloud_poll(void)
function in main.c, which is run in a separate thread. That function checks whether the cloud backend is null, but I was unable to determine which part of the struct is null and how thiscloud_backend
is even created/initialized.Looking at the begining of main:
Neither of the
cloud_get_binding
orcloud_init
return an error.At this point I am a little lost. Can you give me some pointers in where I should look next to determine why this error happens. Is there a way for me to check if the program reads the certificates right? Or is there some other cause for this. Thank you for the continued help.