Skip to main content
Visitor II
November 11, 2020
Question

Why do I get : curl: (7) Failed to connect .... Error 443

  • November 11, 2020
  • 2 replies
  • 892 views

Hello I am trying to curl from a server using this command from my STM32MP157C-DK2

curl -i -k -X POST -H "Content-Type: application/json" --data '{ "id":"2","timestamp":"200","data":"100"}' https://dv7knsjzph.execute-api.eu-central-1.amazonaws.com/prod/boxtronic-devices/2/data/

but I am getting

curl: (7) Failed to connect to dv7knsjzph.execute-api.eu-central-1.amazonaws.com port 443: No route to host

vi 

/etc/hosts/ gives me:

127.0.0.1 localhost
 
127.0.1.1 buildroot

How can I do that. Thank you

    This topic has been closed for replies.

    2 replies

    Technical Moderator
    November 17, 2020

    Hi @SigmaPrime​ ,

    Did you first check you have a valid Ethernet connection to the web ?

    https://wiki.st.com/stm32mpu/wiki/How_to_configure_ethernet_interface

    Are you able to ping www.google.com or similar ?

    Thx

    Olivier

    Technical Moderator
    November 17, 2020

    Hi @SigmaPrime (Community Member)​ ,

    No issues from my side with an OpenSTLinux V2.0.0 image and DK2 board. Can you double check your network settings?. To configure the wifi setup with your DK2 board your can refer to this:

    https://wiki.st.com/stm32mpu/wiki/How_to_setup_wifi_connection

    root@stm32mp1:~# curl -i -k -X POST -H "Content-Type: application/json" --data '

    { "id":"2","timestamp":"200","data":"100"}' https://dv7knsjzph.execute-api.eu-ce

    ntral-1.amazonaws.com/prod/boxtronic-devices/2/data/                           

    HTTP/1.1 200 OK                                                                

    Date: Tue, 17 Nov 2020 20:35:59 GMT                                            

    Content-Type: application/json                                                 

    Content-Length: 2                                                              

    Connection: keep-alive                                                         

    x-amzn-RequestId: a192e930-69e3-486d-8cbe-480db49e3448                         

    Access-Control-Allow-Origin: *                                                 

    x-amz-apigw-id: WK0XLGtYliAFQqQ=                                               

    X-Amzn-Trace-Id: Root=1-5fb4342d-7fbd3f7d5d4c3592069bf1c1;Sampled=0 

    vi /etc/hosts/ :

    127.0.0.1      localhost.localdomain          localhost

    # The following lines are desirable for IPv6 capable hosts

    ::1    localhost ip6-localhost ip6-loopback

    fe00::0 ip6-localnet

    ff00::0 ip6-mcastprefix

    ff02::1 ip6-allnodes

    ff02::2 ip6-allrouters

    127.0.1.1 stm32mp1