AZ3166 MXChip DevKit Azure IoT Hub error: Connection Not Accepted: 0x5: Not Authorized - azure-iot-hub

I carefully followed (repeated twice) all the prerequisites and successfully connected to Azure IoT Hub. Uploaded Device Code for Get-Started Example (send the IoT DevKit sensor data to the IoT Hub). and I'm getting the following error in the final step.
[Starting] Opening the serial port - COM4
[Info] Opened the serial port - COM4
2019-02-09 06:31:12 INFO: >>>IoTHubClient_LL_SendEventAsync accepted message for transmission to IoT Hub.
2019-02-09 06:31:17 ERROR: File:C:\Users\v-zuhu\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.0\cores\arduino\azure-iot-sdk-c\iothub_client\src\iothubtransport_mqtt_common.c Func:mqtt_operation_complete_callback Line:1724, Connection Not Accepted: 0x5: Not Authorized
[Done] Closed the serial port
I attempted recreating the example from scratch and noted multiple errors of the following type during DevKitDPS.ino upload:
..\AppData\Local\Arduino15\packages\AZ3166\hardware\stm32f4\1.6.1\system/platform/toolchain.h:23:2: warning: #warning toolchain.h has been replaced by mbed_toolchain.h, please update to mbed_toolchain.h [since mbed-os-5.3] [-Wcpp]
#warning toolchain.h has been replaced by mbed_toolchain.h, please update to mbed_toolchain.h [since mbed-os-5.3]
..\examples\devkit_dps\Device\DevKitDPS.ino:12:32: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
char* Global_Device_Endpoint = "global.azure-devices-provisioning.net";
Researched this issue and found following links:
https://github.com/ARMmbed/mbed-os/issues/3876
toolchain.h has been replaced by mbed_toolchain.h
I don't how to proceed with this and any guidance will be much appreciated.

Related

How to run pipeline with GStreamer binded by Qt?

I want to run 'qmlplayer' example from Qt GStreamer binder on my embedded system. My camera rtsp address uri is:
rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp
rtsp path is correct because I can run stream in VLS Player and run example with working camera view on my Ubuntu18 system. When I want run example on my embedded system I got error:
"Could not get/set settings from/on resource."
I checked in terminal:
[root#comp ~]# gst-launch-1.0 uridecodebin uri='rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp'
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://admin:1234#192.168.2.106:554/ipcam_mjpeg.sdp
Progress: (open) Retrieving server options
Progress: (open) Retrieving media info
ERROR: from element /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source: Could not get/set settings from/on resource.
Additional debug info:
gstrtspsrc.c(6441): gst_rtspsrc_setup_streams (): /GstPipeline:pipeline0/GstURIDecodeBin:uridecodebin0/GstRTSPSrc:source:
Could not setup transport.
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
What could be the reason? Missing linux driver? Ping is ok, iptables are droped

401002 CA certificate not found - SDK - Microsoft.Azure.Devices.Provisioning.Client

OS - Windows 10
.net Environment - .net core 2.1
SDK - Microsoft.Azure.Devices.Client - 1.21.0
Microsoft.Azure.Devices.Provisioning.Client - 1.4.0
Microsoft.Azure.Devices.Provisioning.Transport.Amqp - 1.1.9
Microsoft.Azure.Devices.Provisioning.Transport.Http - 1.1.6
Microsoft.Azure.Devices.Provisioning.Transport.Mqtt - 1.1.8
Description of the issue
I'm trying to connect a simulated device (.net core console app) to IOT hub via azure Device Provisioning Service. This is based on x.509 cetificates (root+ intermediate certificate).
I created the enrolment group ok, then uploaded the root certificate and completed verification.
After that generated the device certificate from root certificate and tried to connect to IOT hub using sample code from below link:
https://github.com/Azure-Samples/azure-iot-samples-csharp/tree/master/provisioning/Samples/device/X509Sample
After having all setup when I tried to connect to IOT bub I'm getting below error, tried all protocol - Amqp,Http,Mqtt...
Microsoft.Azure.Devices.Provisioning.Client.ProvisioningTransportException
HResult=0x80131500
Message={"errorCode":401002,"trackingId":"408d5ad7-aa7c-45a1-b19a-e4af41ccf54b","message":"CA certificate not found.","timestampUtc":"2019-08-23T09:17:53.762099Z"}
Source=<Cannot evaluate the exception source>
StackTrace:
<Cannot evaluate the exception stack trace>
Below is the input to device client along with certificate:
private static string s_idScope = "0ne00074417";
private const string GlobalDeviceEndpoint = "global.azure-devices-provisioning.net";
private static string s_certificateFileName = "simulateddevicecert.pfx";
Is there anything missing in the setup that is causing this error? Also is there any REST API exposed by azure DPS to register device? (instead of using Azure Devices/Client SDK)
As shown here,
please include the intermediate certificate as well in the certificate chain presented by the device.
The REST API docs for registering a device to DPS can be found here.
In my case error 401002 was caused by mismatched deviceId and CN field in certificate which device used to authenticate.
In my case, I used the wrong connection string.
I used the device connection string instead of the service connection string when trying to call a direct invoke method.
I'm posting this here, because this is among the first search results for the 401002 error, and there's no info on this check on the Azure doc websites.

Cumulocity IoT warning for bricklet ID #2131 (Illuminance bricklet)

I have a few TinkerForge sensors connected to a Raspberry Pi. I have humidity and barometer bricklets and almost everything is working fine. The only exception is for a single sensor: the Illuminance bricklet. For this there is no data sent to Cumulocity. The TinkerForge demo application works perfectly and displays luminosity values, so the sensor is producing data properly. But the Agent is not recognizing this sensor, or this type of sensor. The log contains the following warning:
Jun 17 15:12:51 raspberrypi root: 15:12:51.719 [Callback-Processor] WARN c8y.tinkerforge.Discoverer - Unsuported device identifier: 2131
Please advise.
Short answer: Some bricklets are just not supported.
I downloaded the source code for the Cumulocity Agent (written in Java) and I browsed through it and I found out that the Illuminance bricklet is not listed.
Until Cumulocity updates their agent, it just won't work.
If and when this happens, I will update this answer.

Kamailio+rtpengine+SIP.js Failed to set remote answer sdp: Called with SDP without DTLS fingerprint

I just install Kamailio 4.4.5 + RTPEngine on Ubuntu Server 16.04
all config copy from https://github.com/whisk/WEBRTC-to-SIP
And using SIP.js latest version to make call between 2 chrome browser.
SIP user register successfully and can using text chat
But when User Invite another user any his Accept call, get this error
Failed to set remote answer sdp: Called with SDP without DTLS fingerprint.
How to solve this issue???
Use sdp_with_transport_like(...) instead of sdp_with_transport(...), because the transport string is UDP/TLS/RTP/SAVPF and the second function is doing an exact match, but the parameter in referred example is only RTP/SAVPF.

unknown SSL error -12218 (SSL_ENCRYPTION_FAILURE) while launching upwork application on debian stretch

Recently I've been installing upwork application on my debian system.It has installed fine.But when I try to launch it from cli typing: upwork
a bunch of errors happen.
[1008/213534:ERROR:browser_main_loop.cc(173)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[1008/213535:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213542:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213542:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[1008/213542:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 2147483648, remote ID 2)
[1008/213542:ERROR:channel.cc(300)] RawChannel read error (connection broken)
[1008/213542:ERROR:renderer_main.cc(200)] Running without renderer sandbox
[1008/213543:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[1008/213543:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/213600:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/213600:WARNING:nss_ssl_util.cc(370)] Unknown SSL error -12218 (SSL_ERROR_ENCRYPTION_FAILURE) mapped to net::ERR_SSL_PROTOCOL_ERROR
[1008/214550:WARNING:channel.cc(549)] Failed to send message to ack remove remote endpoint (local ID 1, remote ID 1)
[
How to overcome this errors?
After online searching the decision was found on upwork site forum
unknown ssl error
The problem was how to use the 2 versions of libnss3 packet simultaneously.Libnss3 goes as a security related packet so instead of downgrading it on the system you can simply download the old version of libnss3 compatible with upwork app and then dynamically add a path to this old version to the linker when you need to use upwork app, while the system will have the newest one.