Azure IoT SDK - C (Running on TI CC3235SF gateway)

Y MRUDULA 41 Reputation points
2022-09-19T17:44:36.853+00:00

242580-image.png

When I call Prov_Device_LL_Register_Device() function is returning error code 10 = PROV_DEVICE_RESULT_ERROR. Unable to understand what it means and what should be checked.

       CLIENT_SAMPLE_INFO user_ctx;  
        memset(&user_ctx, 0, sizeof(CLIENT_SAMPLE_INFO));  
  
        g_prov_transport = Prov_Device_HTTP_Protocol;  
      
        // Set ini  
        user_ctx.registration_complete = 0;  
        user_ctx.sleep_time = 10;  
  
        PROV_DEVICE_LL_HANDLE handle;  
        if ((handle = Prov_Device_LL_Create(global_prov_uri, id_scope, g_prov_transport)) == NULL)  
        {  
            UART_PRINT("failed calling Prov_Device_LL_Create\r\n");  
        }  
        else  
        {  
           UART_PRINT("Prov_Device_LL_Create success!\r\n");  
  
            Prov_Device_LL_SetOption(handle, "logtrace", &g_trace_on);  
  
            PROV_DEVICE_RESULT x = Prov_Device_LL_Register_Device(handle, register_device_callback, &user_ctx, registation_status_callback, &user_ctx);  

Any help will be appreciated.

Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
222 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.