cancel
Showing results for 
Search instead for 
Did you mean: 

Wi-Fi Combo

Anonymous
Not applicable

Hi,

I hit a strange wiced_tcp_create_socket hang up,

to make sure it's not the problem of my application.

I modify apps/snip/ping_powersave/ping_powersave.c to test this issue:

Add below lines to application_start(), just before the while loop to call send_ping().

WPRINT_APP_INFO(("create socket begin\r\n"));

wiced_tcp_socket_t socket;

wiced_tcp_create_socket(&socket, WICED_STA_INTERFACE);

wiced_tcp_delete_socket(&socket);

WPRINT_APP_INFO(("create socket end\r\n"));

It then hangup after print "create socket begin".

Started FreeRTOS v7.5.2

Initialising LwIP v1.4.0.rc1

WWD SoC/4390 interface initialised

WLAN MAC Address : 02:0A:F7:E3:A2:10

WLAN Firmware    : wl0: Sep  1 2014 12:37:04 version 6.38.15 (TOB) (r496949)

Joining : phoenix

Successfully joined : phoenix

Obtaining IP address via DHCP

Network ready IP: 192.168.0.101

create socket begin

Can someone explain what's wrong here?

Thanks.

6 Replies
GregG_16
Employee

I confirmed this with FreeRTOS-LwIP, but it works with NETx/ThreadX do you agree?

11:04:58.357: Starting WICED v3.1.0

11:04:58.357: Platform BCM943362WCD4 initialised

11:04:58.357: Started ThreadX v5.6

11:04:58.357: Initialising NetX v5.7_sp1

11:04:58.357: Creating Packet pools

11:04:58.357: WWD SDIO interface initialised

11:04:58.789: WLAN MAC Address : 40:2C:F4:AF:32:F9

11:04:58.789: WLAN Firmware    : wl0: Aug 11 2014 17:20:49 version 5.90.195 (TOB) FWID 01-3507525f

11:04:58.805: Joining : BRCMGUEST

11:04:58.805: Successfully joined : BRCMGUEST

11:04:59.397: Obtaining IPv4 address via DHCP

11:04:59.413: Setting IPv6 link-local address

11:04:59.413: IPv4 network ready IP: 10.16.101.6

11:04:59.509: create socket begin

11:04:59.525: create socket end

11:04:59.525:

0 Likes
Anonymous
Not applicable

Hi Gangi,

Thanks for your quick response!

I just test against NetX and NetX_duo now.

Yes, the hangup only happens on FreeRTOS+LwIP.

I have no idea about this issue, it's very basic thing.

We are using FreeRTOS+LwIP so we need bug fix for this hangup issue.

Thanks.

0 Likes
GregG_16
Employee

Yes. But at least we have some additional details now to help us debug. Thanks.

0 Likes
Anonymous
Not applicable

Hi Gangi,

I found if I make the socket to be as static variable, it won't hangup on LwIP.

        static wiced_tcp_socket_t socket;

Just FYI, maybe it's useful information for debug this issue.

Anonymous
Not applicable

Hi Gangi,

Confirm this issue is fixed in sdk-3.1.1.

Thanks.

0 Likes
CaWo_1798781
New Contributor II

wiced_tcp_create_socket in WICED 2.4.1 calls malloc for you (line 151), but no longer does so in 3.1.x, so you must allocate memory in your application.

That explains why it doesn't fail when you declare the variable as static.

What's weird is you said it's fixed in 3.1.1, but I just tested it (and it failed for the same reasons above).

0 Likes