Hi.
I'm trying to create socket client on QCA4020 device,
the steps I follow:
- enable Wlan
- connect to router
- get IP from DHCP server
then after dhcp callback called, my attempt to call -> qapi_socket(AF_INET, SOCK_STREAM, 0)
returns -1, so I cannot create a socket.
Is there anything that I missed to initialize before creating socket?
Thanks.
Can you provide us your console log to verify the issue ?
Also, can you confirm if the same behaviour is seen with QCLI_demo when following the above mentioned steps ?
wlan enable
wlan setdevice 1
wlan SetWpaPassphrase password
wlan SetWpaParameters WPA2 CCMP CCMP
wlan connect SSID
net dhcpv4c wlan1
net benchrx tcp 2390
Thank you for reply.
I have corrected my code so it works without issues.
I will post a part of code later, maybe it will be useful for others.
I am also seeing the same problem where qapi_socket returns -1. I am connected to an AP and have acquired an IP Address. My project is not based on the QCLI_demo code. It is a project that I spun up based on the Hello_World demo to eliminate all of the unnecessary code in the demo project. Any info would be greatly appreciated.
Thanks,
Dr. Wolfe
This seems to be a bug in sdk v3.4. Code that works in v3.3 does not work in v3.4.
Regards,
Glenn