IoTEdge module gives timeout - azure-iot-hub

I have an IoTEdge module which runs a deep learning model on a Raspberry Pi 3 and runs well but then somehow returns this error:
Error: Time:Mon Jan 28 22:45:21 2019 File:/usr/sdk/src/c/iothub_client/src/iothubtransport_mqtt_common.c Func:InitializeConnection Line:2230 mqtt_client timed out waiting for CONNACK
Is this a network connection issue? It seems afterwards, this error disappears. Not sure why this is the case. I thought there might be a communication error between this IoTEdge module and the IoTHub, so I even restarted the IoTEdge module and rebooted the Raspberry Pi device.
How can this be resolved? Does it have to deal with a time.sleep(1) code in Python?

You are using the original version of the Azure IoT Python SDK. This is a wrapper around the C SDK and the message you are encountering is a known bug in the C SDK. This has been fixed in the C SDK but was never propagated into the Python v1 reposiotry.
I suggest that you rebuild your Edge module using the new Python v2 SDK (https://github.com/Azure/azure-iot-sdk-python). By default, this is the version now used by the Visual Studio Cloud Azure Edge extension.

Related

Vulkan support on Windows Sandbox / Hyper-V Windows 11

The latest Windows 11 has Vulkan support to Windows Sandbox and maybe Hyper-V so when the sandbox loads Windows, it has vulkaninfo available and running. and in device manager there is the actual GPU not just an emulated one.
So I tried running Vulkan application such as vkcube, and my own application. But it is missing VK_KHR_swapchain extention. Is there a way to make it work? If I try vkcube I get that VK_KHR_swapchain is missing vkCreateInstance:
failure vkEnumatedDeviceExtensionProperties failed to find the VK_KHR_swapchain extention
Do you have a compatible Vulkan installable client driver (ICD) installed?
So why does vulkaninfo show long list of available information but missing this? What is the meaning of Vulkan support if this basic part is missing?
Is there a workaround?
Tried configuring sandbox with vGpu enabled but this removed the vulkaninfo. Any suggestions?
Thanks
link to vulkan info output on the sandbox virtual machine

Getting IoT Edge Agent error trying to run a Linux container on Windows host: "image operating system "linux" cannot be used on this platform"

I am trying to create an Azure IoT Edge device on a Windows host, but running a module built as a Linux container. In a previous experiment, I was able to successfully create an Azure IoT Edge device on a Linux host, and successfully running this same Linux container module.
However, when I deploy the module onto the Windows host, the module shows that it is not running, and when I view the module's log using "iotedge logs camera-capture" I get the following error:
<6> 2019-12-02 13:32:56.016 -08:00 [INF] - Executing command: "Create module camera-capture"
<3> 2019-12-02 13:33:11.674 -08:00 [ERR] - Executing command for operation ["create"] failed.
Microsoft.Azure.Devices.Edge.Agent.Edgelet.EdgeletCommunicationException- Message:Error calling Create module camera-capture: Could not create module camera-capture
caused by: Could not pull image localhost:5000/camera-capture-opencv:1.1.128-amd64
caused by: image operating system "linux" cannot be used on this platform, StatusCode:500, at: at Microsoft.Azure.Devices.Edge.Agent.Edgelet.Version_2019_01_30.ModuleManagementHttpClient.HandleException(Exception exception, String operation) in C:\agent\_work\4\s\edge-agent\src\Microsoft.Azure.Devices.Edge.Agent.Edgelet\version_2019_01_30\ModuleManagementHttpClient.cs:line 194
I have found no results online, or through Microsoft forums, regarding this particular error that was able to resolve my problem. For the record, I have ensured:
I am running a compatible Windows 10 host (17763)
I have Hyper-V and Containers installed
I have VT enabled in the BIOS
I have configured my deployment.template.json to build as "amd64" platform
I have configured my Docker Desktop to run using Linux Containers (and also enabled Experimental mode)
I have tested the basic "hello-world" ubuntu example online, and it works when I run it from Powershell, which proves that a Linux container will run on my Windows host
Any help would be greatly appreciated!
After spending a few days stuck on this issue, I finally found the solution. The problem was with the IoT Edge runtimes on Windows were not configured to handle Linux containers!
As of this writing, the solution is documented here by Microsoft: https://learn.microsoft.com/en-us/azure/iot-edge/how-to-install-iot-edge-windows-with-linux
But in case of a future dead link, you basically have to add additional flags when you install your Azure IoT Edge runtimes to handle linux containers.
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Deploy-IoTEdge -ContainerOs Linux
. {Invoke-WebRequest -useb aka.ms/iotedge-win} | Invoke-Expression; `
Initialize-IoTEdge -ContainerOs Linux
I changed Docker Desktop to Linux container mode and compiled in VSCode. It worked like magic.

STLINK cannot detect my STM32VL discovery

I'm working on a debian 6.0 installed on virtualbox 4 hosted by Windows7, and I'm trying to get my STM32VL work using STLINK project that allows programming and debugging STM32 on Linux.
I followed their tutorial and installed all needed dependancies.
But when I run the program ./​​st-util -1, I get the following error:
tbarry#darkstar:~/stlink$ ./st-util -1
2014-03-20T10:18:48 WARN src/stlink-sg.c: Failed to find an stlink v1 by VID:PID
Error: could not open stlink device
Error: could not open stlink device
I underline that I have already installed Virtualbox extensions, and usb 2.0 is well handled.
Does anyone have an idea of ​​what is blocking me?
I'd same problem. It was driver problem. Windows detected my st-link as mass storage device, so st-util didn't see it. I've used zadig utility in order to change the driver.
Not having found a solution to my problem, I tried with VMware player and it worked nice.
Conclusion: Whatever the problem I had, it was coming from VirtualBox.

Simple-OpenNI for Processing fatal errors with the Kinect

I have been using SimpleOpenNI, a wrapper for Processing, all summer now. I use it for the Kinect to make games and demos. Last week, I have been getting a fatal error in my processing window and none of the SimpleOpenNI projects will work. Here is the error:
SimpleOpenNI Version 0.20
A fatal error has been detected by the Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x72e8f955, pid=4596, tid=4624
JRE version: 6.0_24-b07
Java VM: Java HotSpot(TM) Client VM (19.1-b02 mixed mode windows-x86 )
Problematic frame:
C [OpenNI.dll+0xf955]
An error report file with more information is saved as:
C:\Users\mss042\Desktop\processing-1.5.1\hs_err_pid4596.log
If you would like to submit a bug report, please visit:
http://java.sun.com/webapps/bugreport/crash.jsp
The crash happened outside the Java Virtual Machine in native code.
See problematic frame for where to report the bug.
It appears as if the new OpenNI/NITE/SensorKinect drivers do not work with the SimpleOpenNI wrapper. I have tried it with people using the old drivers and everything still works. Problem is, you cannot download the old drivers off of the websites so I cannot test if it's that or not. You can see everything I've downloaded from the simpleopenni site: http://code.google.com/p/simple-openni/
Any help with this error would be appreciated. Thanks.
Mike
It looks like there's a problem with OpenNI.dll. Make sure that:
You have the dll (It should be in Program Files where you've installed OpenNI)
Make sure you've got the Environment Variables for the Open NI paths and that the paths are correct, otherwise, you might have the .dll file, but the .jnilib wouldn't know where it is.
Had a Kinect Workshop in Uni, and my colleagues using Windows all had issues with the drivers,
so I'm just passing on what they did:
Even though they had 64-bit versions of Windows they used the 32-bit version, and used Brekel OpenNI Kinect Auto Installer - Developer Edition v1.3.2.3.exe(direct link via developkinect.com) after reading this message:
Comment 4 by tijmenva...#gmail.com, Oct 21, 2011 Hey all I have Solved
the unsatisfied link dll error on windows 7 64 bits by installing java
runtime (jre-7u1-windows-i586.exe)and (Brekel OpenNI Kinect Auto
Installer - Developer Edition v1.3.2.3.exe) I uninstalled everything
and than it worked :)
hope this helpes
in Issue#17 on the SimpleOpenNI project issues page.
Another colleague used Synapse and OSC in Processing instead of SimpleOpenNI, but she had loads of errors with the drivers (basically spent a few good hours uninstalling/installing different versions). In her case, uninstalling any previous partial or complete drivers from the machine and deleting any registry entries related to PrimeSense(Sensor, Nite) and OpenNI, then using the installers from the links on the Synapse page, worked for her.
HTH
This is a long shot, but that exact error is also given if the Kinect USB and/or power supply simply becomes unplugged. Thought it was worth mentioning as it is not obvious from the error message itself and it may help someone out if they kicked their power supply and started searching for the above exception :)

Compact Framework Remote Performance Monitor Error connecting to a device

I am trying to do a memory profile on a .Net CF app. It was originally compiled in 2.0, but I converted it to 3.5 so I can use the 3.5 CF PowerToys Remote Perf Mon. I am getting the following error message when trying to connect:
ActiveSync device: transport incompatible.
I am connecting via DMA through ActiveSync, should I be doing something differently?
For whatever reason RPM doesn't work with the emulator before CF 3.5 SP1, so if you're targeting the emulator (which is seems you are) make sure you have the latest version of RPM and have manually deployed the RPM bits to the emulator.