Developer Portal Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    WiFi-Connection - strange anomaly

    Fein38
    New Poster

    WiFi-Connection - strange anomaly

    Hi,

    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 0.0.0.0 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: C
     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: MAC 31.1.2.0.2
     INFO | XDK DEVICE 1: PHY 1.0.3.23
     INFO | XDK DEVICE 1: NWP 2.2.0.1
     INFO | XDK DEVICE 1: ROM 0x3333
     INFO | XDK DEVICE 1: HOST 1.0.1.11
     INFO | XDK DEVICE 1: Connected to WPA network successfully
     INFO | XDK DEVICE 1: IP address of device  192.168.227.83
     INFO | XDK DEVICE 1:               Mask    255.255.254.0
     INFO | XDK DEVICE 1:               Gateway 192.168.226.1
     INFO | XDK DEVICE 1:               DNS     9.9.9.9
     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(PureJavaSerialPort.java:721)	at com.bosch.cds.xdk.io.serial.impl.DelegatingSerialEventListener.serialEventReceived(DelegatingSerialEventListener.java:27)	at com.bosch.cds.xdk.io.serial.AbstractDelegatingSerialEventListener.serialEvent(AbstractDelegatingSerialEventListener.java:42)	at purejavacomm.PureJavaSerialPort.sendDataEvents(PureJavaSerialPort.java:92)	at purejavacomm.PureJavaSerialPort.access$28(PureJavaSerialPort.java:89)	at purejavacomm.PureJavaSerialPort$3.run(PureJavaSerialPort.java:1241)	at java.lang.Thread.run(Thread.java:748)

     

    1 REPLY 1
    Mahalingam
    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.

    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