Developer Portal Community

    Showing results for 
    Search instead for 
    Did you mean: 

    WiFi-Connection - strange anomaly

    New Poster

    WiFi-Connection - strange anomaly


    We are testing the XDK at our Company. As we had connecting issues and trust issues on written code, we checked the codes build at first. This includes documentation of XDK-C, XDK-FreeRTOS, API-Documentation, Sensorprograms, Wifi-Connection-Codes, Manuals for Wifi-build up, Dev-Portal-Forum-threads.


    As we didn't have any success with the company router, we checked the builds with a private one just by entering SSID and PW in the header-files. Private Wifi-Access worked fine using DHCP with and without callback. Also success with private wifi and static IP. So we took it back to the institute. We are not using enterprise WPA2, we are generating a keyphrase and using one SSID, some IoT-Network-blabla. Now sometimes we get an IP from router, sometimes we don't. (Using DHCP option 1 and 2 - with or without your callback). The Scan for networks is fine and connects. The IP from router is most of the time and it cannot keep a stable connection even without callback. 
    Now the one time it worked this was the output: It can be the MQTT wasn't sending data so subscribing wouldn't give an output. Still. The XDK keeps reconnecting - killing the wifi connection from itself. This source code here shows the most successful and only time it got that far - jumping back to AppController Fire to tell me the MQTT-Credentials won't work which we checked again with Mosquitto.

     INFO | XDK DEVICE 1: Ready
     INFO | XDK DEVICE 1: _
     INFO | XDK DEVICE 1: XMODEM Download Success
     INFO | XDK DEVICE 1:  CRC of application area
     INFO | Application checksum 'd34f' successfully verified.
     INFO | Transmission successfully completed!
     INFO | Booting application...
     INFO | XDK DEVICE 1:  Jumping to application
     INFO | Port 'COM4' has been disconnected
     INFO | Connecting to XDK device 'XDK Device 1' in port 'COM4'...
     INFO | Connection to port 'COM4' established
     INFO | XDK DEVICE 1: This is a CC3100R device
     INFO | XDK DEVICE 1: CHIP 0x4000000
     INFO | XDK DEVICE 1: ROM 0x3333
     INFO | XDK DEVICE 1: Connected to WPA network successfully
     INFO | XDK DEVICE 1: IP address of device
     INFO | XDK DEVICE 1:               Mask
     INFO | XDK DEVICE 1:               Gateway
     INFO | XDK DEVICE 1:               DNS
     INFO | XDK DEVICE 1: WLANPersonalWPA2Connect : Connected to WPA network successfully. 
     INFO | XDK DEVICE 1: AppControllerFire : MQTT connection to the broker failed 
     INFO | XDK DEVICE 1: Error in WLAN package.
     INFO | XDK DEVICE 1: 	Package ID: 10
     INFO | XDK DEVICE 1: 	Module ID: 3
     INFO | XDK DEVICE 1: 	Severity code: 2
     INFO | XDK DEVICE 1: 	Error code: 1
     INFO | XDK DEVICE 1: Router connection was lost. Resetting the device. Check if network is available. Node will do a soft reset now.
    ERROR | Exception occured: null
    	at purejavacomm.PureJavaSerialPort$2.available(	at	at	at purejavacomm.PureJavaSerialPort.sendDataEvents(	at purejavacomm.PureJavaSerialPort.access$28(	at purejavacomm.PureJavaSerialPort$	at


    1 REPLY 1
    Occasional Contributor

    Re: WiFi-Connection - strange anomaly

    Hello  Fein38,

    If you are able to connect XDK with your private network and get proper IP address all the time successfully, Then the problem is not with XDK.

    The problem might be in Wifi network setup. Generally Companies will be having Enterprise wifi network setup.First please make sure whether your company is using enterprise wifi network setup or personal wifi network setup. If your company uses enterprise wifi network setup, then you must enable enterprise option  and provide proper values for the below parameters in header file:

    • SSID
    • Username
    • Password

    Let me know which template application are you using or else if possible can you share your code, so that I will check from my end.