Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    XDK Disconnect and Connect from WLAN with PowerControl

    hasalp
    Member

    XDK Disconnect and Connect from WLAN with PowerControl

    Hi, I want to control power of my wifi module. So firstly I disconnect from wifi because I will set power control to hibernate:

    retcode = WlanNetworkConnect_Disconnect();
    if(retcode == RETCODE_OK){
    printf("Wlan Disconnected\n\r");
    WlanNetworkConnect_PowerControl(WLANNWCT_PWRCTRL_HIBERNATE, NULL);
    }

    This code is from my appControllerFire and I get disconnected message. After that code keeps running and when I detect sensor I want to send it with wifi therefore I change powerControl to wakeUp and connect to it again.

     

    Edit: I investigated problem further more and I found that line in documentation In this mode, memory is not retained, and wake up requires a cold boot initialization But unfortunately couldn't find anything about cold boot initialization. Can you enlighten me what is cold boot initialization ? or share documentation with me.

    WlanNetworkConnect_PowerControl(WLANNWCT_PWRCTRL_WAKEUP, NULL);
    printf("Wifi in Wakeup Mode\n\r");
    WLAN_Reconnect();

    and there is my problem:

    INFO | XDK DEVICE 1: Wifi in Wakeup Mode
    INFO | XDK DEVICE 1: Network Connection is active

    I get these outputs and then device freezes. What I am doing wrong ?

    1 REPLY 1
    Shanmathi
    Established Member

    Re: XDK Disconnect and Connect from WLAN with PowerControl

    Hello hasalp,

    As per the TI documentation  for Power State #Hibernate_State,  yes the chip requires a cold boot.
     
     
     
     
    sl_Start initiates the cold boot initialization process as mentioned in Application report # 6 Networking Sub-system Mode Switching 
     
    Could you try calling WLAN_Enable API, which internally calls sl_start ?                                                                                                                                                              
     
     
     
     
     
    BR, Shanmathi P
    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist