HTTPs requests in http_get on NXP FRDM-MCXN947 #86373
-
I have been trying to perform HTTPs requests from the FRDM MCX947 board. I added a board configuration as follows:
I then enabled DHCPV4 in the sample to get an IP address: static struct net_mgmt_event_callback ipv4_cb;
static K_SEM_DEFINE(ipv4_address_obtained, 0, 1);
static void ipv4_mgmt_event_handler(
struct net_mgmt_event_callback *event_cb, uint32_t mgmt_event, struct net_if *iface)
{
switch (mgmt_event) {
case NET_EVENT_IPV4_ADDR_ADD:
k_sem_give(&ipv4_address_obtained);
break;
case NET_EVENT_IPV4_ADDR_DEL:
k_sem_take(&ipv4_address_obtained, K_NO_WAIT);
break;
}
}
int main(void)
{
...
net_mgmt_init_event_callback(&ipv4_cb, ipv4_mgmt_event_handler,
NET_EVENT_IPV4_ADDR_ADD | NET_EVENT_IPV4_ADDR_DEL);
net_mgmt_add_event_callback(&ipv4_cb);
struct net_if *iface = net_if_get_default();
while (net_if_oper_state(iface) != NET_IF_OPER_UP) {
k_sleep(K_MSEC(200));
}
net_dhcpv4_start(iface);
while (k_sem_count_get(&ipv4_address_obtained) == 0) {
k_sleep(K_MSEC(200));
}
... I tested the same configuration on the ---- Opened the serial port /dev/ttyACM1 ----
[00:00:00.605,000] <inf> phy_mii: PHY (0) ID 80008000
*** Booting Zephyr OS build v4.1.0-rc2-86-g384fe7a05d7d ***
[00:00:00.606,000] <wrn> net_sock_tls: No entropy device on the system, TLS communication is insecure!
[00:00:05.108,000] <wrn> net_dhcpv4: DHCP server provided more DNS servers than can be saved
[00:00:05.109,000] <inf> net_dhcpv4: Received: 10.5.1.157
[00:00:05.208,000] <inf> http_get: Preparing HTTP GET request for http://google.com:443/
[00:00:05.209,000] <inf> http_get: getaddrinfo status: 0
[00:00:05.209,000] <inf> http_get: addrinfo @0x300247a8: ai_family=1, ai_socktype=1, ai_protocol=6, sa_family=1, sin_port=1bb
[00:00:05.209,000] <inf> http_get: sock = 5
[00:00:05.209,000] <inf> http_get: Connecting to server...
[00:00:08.217,000] <err> net_sock_tls: TLS handshake error: -0x7200
[00:00:08.218,000] <err> http_get: Error: -1
exit Note that HTTP requests without TLS work fine on both boards. Anyone has experience with this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello @sorru94, We have been able to reproduce your issue on our side. We are getting one additional error though: [00:00:10.429,000] net_sock_tls: TLS handshake error: -0x7300 Those errors refer to : An internal issue has been raised, and we will investigate further on this. Regards, |
Beta Was this translation helpful? Give feedback.
-
Created an Issue to track this at #86435 @sorru94 , thank you for reporting this. |
Beta Was this translation helpful? Give feedback.
Created an Issue to track this at #86435
@sorru94 , thank you for reporting this.