Regarding HTTPS client implementation

I wanted to integrate https client in my code, for that I referred the sample code https_client and also the code available on Wifi Fundamentals course.
When I executed the course for example.com it got connected to the server but the hostname on the browser shows that it is non secure. Similarly when I tried using it for google.com by generating a separate certificate for it it was giving me 

"Software caused connection abort" error. I actually wanted to use https for google cloud storage to upload the files, for that I created a separate private bucket to upload the same but it was also giving me the same error 
I am not able to understand exactly that where the actual issue is is it related to the certificate or maybe something else 

I am providing the code for reference 

Updated_home_without_wifi 2.zip
Parents
  • Hi,

    Do you have logs from the device?

    I will take a look at your code and come back to you early next week.

    Best regards,
    Marte

  • *** Booting nRF Connect SDK 3758bcbfa5cd ***
    1112[00:00:12.700,469] <inf> home_demo: ==================
    [00:00:12.700,531] <inf> home_demo: State: COMPLETED
    [00:00:12.700,531] <inf> home_demo: Interface Mode: STATION
    [00:00:12.700,561] <inf> home_demo: Link Mode: WIFI 4 (802.11n/HT)
    [00:00:12.700,592] <inf> home_demo: SSID: Rakshita Hotspot                
    [00:00:12.700,592] <inf> home_demo: BSSID: €« aú
    [00:00:12.700,622] <inf> home_demo: Band: 2.4GHz
    [00:00:12.700,622] <inf> home_demo: Channel: 11
    [00:00:12.700,653] <inf> home_demo: Security: WPA2-PSK
    [00:00:12.700,653] <inf> home_demo: MFP: Optional
    [00:00:12.700,683] <inf> home_demo: RSSI: -90
    [00:00:13.893,737] <inf> home_demo: Buffer is released
    --- 67 messages dropped ---
    [00:00:13.893,768] <inf> home_demo: UART_RX_DISABLED
    [00:00:13.893,829] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:13.893,890] <inf> home_demo: New buffer set successfully
    [00:00:13.898,468] <err> home_demo: UART RX stopped, reason: 4
    [00:00:13.900,543] <err> home_demo: UART RX stopped, reason: 4
    [00:00:13.901,580] <err> home_demo: UART RX stopped, reason: 4
    [00:00:13.904,571] <inf> home_demo: UART_RX_RDY
    [00:00:13.904,815] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:13.904,876] <inf> home_demo: Buffer is released
    [00:00:13.904,876] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:13.904,968] <inf> home_demo: Buffer is released
    [00:00:13.904,998] <inf> home_demo: UART_RX_DISABLED
    [00:00:13.905,090] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:13.905,151] <inf> home_demo: New buffer set successfully
    [00:00:13.906,127] <err> home_demo: UART RX stopped, reason: 4
    [00:00:13.994,476] <inf> home_demo: UART_RX_RDY
    [00:00:13.994,720] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:13.994,781] <inf> home_demo: Buffer is released
    [00:00:13.994,812] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:13.994,873] <inf> home_demo: Buffer is released
    [00:00:13.994,934] <inf> home_demo: UART_RX_DISABLED
    [00:00:13.994,995] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:13.995,056] <inf> home_demo: New buffer set successfully
    [00:00:14.081,756] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.087,829] <inf> home_demo: UART_RX_RDY
    [00:00:14.088,714] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.088,775] <inf> home_demo: Buffer is released
    [00:00:14.088,806] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.088,867] <inf> home_demo: Buffer is released
    [00:00:14.088,897] <inf> home_demo: UART_RX_DISABLED
    [00:00:14.088,989] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:14.089,050] <inf> home_demo: New buffer set successfully
    [00:00:14.093,597] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.094,635] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.095,886] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.097,961] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.098,937] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.099,700] <inf> home_demo: UART_RX_RDY
    [00:00:14.099,914] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.099,975] <inf> home_demo: Buffer is released
    [00:00:14.100,006] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.100,067] <inf> home_demo: Buffer is released
    [00:00:14.100,128] <inf> home_demo: UART_RX_DISABLED
    [00:00:14.100,189] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:14.100,250] <inf> home_demo: New buffer set successfully
    [00:00:14.101,226] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.102,355] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.103,485] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.107,269] <inf> home_demo: UART_RX_RDY
    [00:00:14.107,513] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.107,543] <inf> home_demo: Buffer is released
    [00:00:14.107,574] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.107,635] <inf> home_demo: Buffer is released
    [00:00:14.107,696] <inf> home_demo: UART_RX_DISABLED
    [00:00:14.107,757] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:14.107,818] <inf> home_demo: New buffer set successfully
    [00:00:14.284,698] <inf> home_demo: UART_RX_RDY
    [00:00:14.371,643] <inf> home_demo: UART_RX_RDY
    [00:00:14.371,704] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.371,734] <inf> home_demo: Buffer is released
    [00:00:14.371,765] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.371,856] <inf> home_demo: Buffer is released
    [00:00:14.371,887] <inf> home_demo: UART_RX_DISABLED
    [00:00:14.371,978] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:14.372,039] <inf> home_demo: New buffer set successfully
    [00:00:14.373,992] <err> home_demo: UART RX stopped, reason: 4
    [00:00:14.462,921] <inf> home_demo: UART_RX_RDY
    [00:00:14.463,195] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.463,256] <inf> home_demo: Buffer is released
    [00:00:14.463,287] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:14.463,348] <inf> home_demo: Buffer is released
    [00:00:14.463,409] <inf> home_demo: UART_RX_DISABLED
    [00:00:14.463,470] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:14.463,531] <inf> home_demo: New buffer set successfully
    11122[00:00:17.368,652] <err> home_demo: Connecting to server failed, err: 113, Software caused connection abort
    [00:00:17.368,682] <err> home_demo: Failed to initialize client
    [00:00:20.303,802] <inf> home_demo: UART_RX_RDY
    [00:00:20.307,220] <inf> home_demo: The data from prodo is: {"Timestamp": 20,"Hcho-mg/m3": 0.00,"Co-PPM": 0,"Co2-PPM": 1119,"Pm1.0-umg/m3": 124,"Pm10-umg/m3": 175,"Pm25-umg/m3": 145,"Voc-mg/m3": 0,"Temp-F": 74,"Hum-": 77,"Noi-DB": 37,"UVA-mw/cm2": 0.07,"UVB-mw/cm2": 0.00,"UVC-mw/cm2": 0.00,"RED": 4,"GREEN": 32,"BLUE": 22,"IR": 5}
    
    [00:00:20.313,385] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:20.313,415] <inf> home_demo: Buffer is released
    [00:00:20.313,415] <inf> home_demo: UART_RX_BUF_RELEASED
    
    [00:00:20.313,446] <inf> home_demo: Buffer is released
    [00:00:20.313,476] <inf> home_demo: UART_RX_DISABLED
    [00:00:20.313,507] <inf> home_demo: UART_RX_BUF_REQUEST
    [00:00:20.313,537] <inf> home_demo: New buffer set successfully

  • Hi,

    Have you tested the devacademy exercise with example.com, google.com and storage.googleapis.com as hosts, to verify whether the issue is with the certificates or your code?

    Best regards,
    Marte

Reply Children
Related