2020-11-11 07:22 AM
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
2020-11-17 06:37 AM
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
2020-11-17 12:49 PM
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