wiced_network_up on ethernet interface, malloc error

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
vtunr
Level 4
Level 4
10 likes received 5 sign-ins First like received

Hi,

I'm using SDK 5.1.0 and BMUSI23 platform. I'm using ethernet.

I had issues using ethernet because some of wiced method are set to use WICED_STA_INTERFACE, but i modified it, i'll propose a patch once everything is working, but if WICED is supposed to managed STA, and ethernet, it should be built in.

Now, i have issues when trying using the wiced_network_up on ethernet :

if(wiced_network_up(wifi_manager->interface,WICED_USE_EXTERNAL_DHCP_SERVER,NULL) == WICED_SUCCESS){          
     wiced_rtos_set_semaphore(wifi_manager->sem_link_up);          
     wifi_manager->status = ABL_WIFI_OK;
}

Where the wifi_manager->interface is WICED_ETHERNET_INTERFACE.

Then since it can't set it up (no ethernet cable plugged, so no IP), we end in this part of wiced_network_up :

#ifdef WICED_USE_ETHERNET_INTERFACE        
     else if ( interface == WICED_ETHERNET_INTERFACE )       
     {           
               platform_ethernet_deinit( );       
     }
#endif

And i have a malloc error (malloc_error( "Free arg not in malloc list", m );):

pastedImage_0.png

When setting up the interface, the platform_ethernet_init is returning a WICED_SUCCESS, meaning that the etc_attach() worked, so the detach should be ok too.

Let me know if you need more information

Tony

0 Likes
1 Solution
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

I tested snip.ping_ethernet on platform BCM943907AEVAL1F with the macro WICED_USE_ETHERNET_INTERFACE enabled and ran the project in debug mode. I did not connect ethernet cable to the platform. I saw that it entered platform_ethernet_deinit( ) but I did not see this malloc error. The function platform_ethernet_deinit() returned 0. How did you reproduce this malloc error? Did you place breakpoint somewhere in the code? Also which Wi-Fi chip does BCMUSI23 contain?

View solution in original post

8 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Adding jone_yi_1844281​ from USI

0 Likes

mifo wrote:

Adding jone_yi_1844281 from USI

vtunr

I'm curious you mark this as CORRECT.

Did you get any fix from USI?

0 Likes
AxLi_1746341
Level 7
Level 7
10 comments on KBA 5 comments on KBA First comment on KBA

vtunr wrote:

Hi,

I'm using SDK 5.1.0 and BMUSI23 platform. I'm using ethernet.

I had issues using ethernet because some of wiced method are set to use WICED_STA_INTERFACE, but i modified it, i'll propose a patch once everything is working, but if WICED is supposed to managed STA, and ethernet, it should be built in.

Now, i have issues when trying using the wiced_network_up on ethernet :

if(wiced_network_up(wifi_manager->interface,WICED_USE_EXTERNAL_DHCP_SERVER,NULL) == WICED_SUCCESS){          
     wiced_rtos_set_semaphore(wifi_manager->sem_link_up);         
     wifi_manager->status = ABL_WIFI_OK;
}

Where the wifi_manager->interface is WICED_ETHERNET_INTERFACE.

Then since it can't set it up (no ethernet cable plugged, so no IP), we end in this part of wiced_network_up :

Does it work if you have cable plugged before boot the device?

0 Likes

Yes it does work when i have a cable plugged and internet available.

I have the same issue using wiced_network_down.

My work around is to comment out the platform_ethernet_deinit, but it's not a long term solution.

0 Likes

vtunr wrote:

Yes it does work when i have a cable plugged and internet available.     I have the same issue using wiced_network_down.    My work around is to comment out the platform_ethernet_deinit, but it's not…

Then it is nothing to do with USI.

It is sdk bug.

mifo

0 Likes
mattl_01
Employee
Employee
100 replies posted 50 replies posted 25 replies posted

What is the status of this issue?

0 Likes
GauravS_31
Moderator
Moderator
Moderator
10 questions asked 250 solutions authored 250 sign-ins

I tested snip.ping_ethernet on platform BCM943907AEVAL1F with the macro WICED_USE_ETHERNET_INTERFACE enabled and ran the project in debug mode. I did not connect ethernet cable to the platform. I saw that it entered platform_ethernet_deinit( ) but I did not see this malloc error. The function platform_ethernet_deinit() returned 0. How did you reproduce this malloc error? Did you place breakpoint somewhere in the code? Also which Wi-Fi chip does BCMUSI23 contain?

Can you reproduce this issue on CYW943907AEVAL1F or any other 43907 based eval board?