MSW Wifi connection for XDK
Antwort
27.06.18 06:03
Hello there, may i ask whether XDK can connect to MSW network of Bosch and upload the data to cloud as normal? If yes, how to configure the "config.txt" while the MSW account require the username/password credential (not only SSID and password as instructed in the Wifi Guide)?
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
27.06.18 16:00 als Antwort auf Nhan Nguyen.
Hello Nhan,

I assume that you are referring to the BoschXdkCloudConnectivity example .

Please note that the Bosch network is an enterprise network.
Unfortunately, this example does not provide a simple setup for an Enterprise WiFi, hence there are no configuration items for Enterprise WiFi.

If you intend to use the XDK example within an Enterprise WiFi network, you can feel free to implement it yourself. An example implementation for Enterprise WiFi can be found in this thread .

If you simply wish to try out the example, you could create a hotspot using a smartphone (or anything else capable of hosting a WiFi access point) and connect to the resulting WiFi network.

Please tell me if this was helpful, and do not hesitate to ask further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
19.07.18 05:45 als Antwort auf Franjo Stjepandic.

Hello Franjo,

Following the thread but I have a problem when defining security type in EnterpriseWifi.h.This is my enterprise wifi information:

  • SSID: MSW_Access
  • EAP Method: PEAP
  • Phase 2 authentication: MSCHAPV2

I read wlan.h but I was confused.Could you pls help me define the line #define SEC_TYPE ? Thanks !

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
19.07.18 14:49 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

I can gladly assist you with that. The parameter SEC_TYPE describes the type of network you try to connect to.

In your case, it is a WPA2 Enterprise network. As such, a five would need to be passed into the struct secParams to represent the configuration for WPA2 Enterprise. Alternatively, you could also pass the define SL_SEC_TYPE_WPA_ENT into it which is equal to five and is provided by the simplelink interface wlan.h .

You can find the interface by navigating to the following folder in the SDK of the XDK:

SDK > xdk110 > Libraries > WiFi > 3rd-party > TI > simplelink > include

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
20.07.18 06:17 als Antwort auf Franjo Stjepandic.

Hi Franjo,

Thanks for your helping ! I passed 0x05 into SEC_TYPE and flashed the program but it didn't work.XDK console stopped after the line " XDK DEVICE 2: Set IP setting to DHCP succeeded" there was no IP address or MAC address.Any ideas ?

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
20.07.18 13:28 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

the behavior you observed indicates that the XDK got stuck during the connecting process to your Enterprise network. I assume that there might be a configuration missing. On that behalf, did you flash the WiFiHostProgramming XDK project before you before you tried out the Enterprise project?

If this is not the case, I would recommend flashing first the WiFiHostProgramming XDK project to the XDK, since it updates the firmware of the XDKs WiFi chip to be able to connect to WPA2 Enterprise networks.

Otherwise, if you receive no further output in the XDK-Workbench console, I would recommend checking your Enterprise network with a scanning tool such as the Advanced IP Scanner to ensure that the XDK really got stuck during the connection process.

Please let me know if that was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
31.07.18 11:04 als Antwort auf Franjo Stjepandic.

Hallo Franjo,

ich habe einen neueren XDK bei dem zu Beginn keine neuen Treiber draufgeflasht werden müssen, zumindest laut meinem Kollgen. Leider kann ich ihn nicht mit unserem Enterprise Wlan (Bosch) verbinden. Der XDK befindet sich in der Endlosschleife innerhalb der WlanConnect-Funktion. Woran könnte es liegen? Die EapMethod habe ich schon verändert, da die CI auf Nachfrage einen anderen Typ(SL_ENT_EAP_METHOD_PEAP1_MSCHAPv2)  vorgeschlagen hat. Mit dem älteren XDK meines Kollegen hat meine Anwendung funktioniert.

Ich habe es jetzt nochmal probiert die neue Firmware daraufzuflashen (WifiHostProgramming-Projekt) . Ich habe die Version für die Workbench 3.0.1 sowie  die Version für die Workbench 2.0.1. versucht auf den XDK zu flashen. Beide natürlich mit der entsprechenden Workbench Version. Beide mal wurde mir nur Invalid application angezeigt.

Kann man den neuern XDK nicht mehr mit einem Enterprise Network verbinden? Wenn doch wo findet man dazu eine funktionierende Anleitung mit entsprechendem Code

Vielen Dank für die Hilfe.

Simon

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
31.07.18 14:25 als Antwort auf Simon Frank.
Hallo Simon,

Ich vermute du probierts im Moment lediglich das EnterpriseWiFi Demo Projekt auf dem XDK aus? Könntest du das bitte kurz bestätigen. Bezüglich der anderen EAP Methode sollte es dennoch möglich sein eine Verbindung zum Bosch Enterprise Wi-Fi aufzubauen. Bitte bedenke hier, sofern das XDK in einer Endlosschleife hängen bleibt, dass es daran liegt, dass keine Verbindung zu Stande kommt, da die Funktion dafür keinen Timeout implementiert.

Im Bezug auf die Invalid Application Meldung müsstest du lediglich das WiFiHostProgramming Projekt rechts klingen und zu Configure scrollen und dann add XDK Nature klicken. Danach sollte das Projekt korrekt auf dem XDK ausführbar sein.

Um auf die letzte Frage zu antworten, es sollte generell nach wie vor möglich sein auch mit neueren XDKs eine Verbindung zu Enterprise Wi-Fi Netzwerken aufzubauen. Generell müssen hier lediglich die richtigen Einstellungen für die Verbindung vorgenommen werden, bzw. muss das XDK auch als Client in diesem Netzwerk akzeptiert werden.

Bitte lass mich wissen, ob dir das weiterhilft und zögere nicht, falls du weitere Fragen hast.

Mit freundlichen Grüßen,
Franjo




Hello XDK community,

Simon has an issue regarding the connection between the XDK and his companies Wi-Fi Enterprise network. His XDK is getting stuck during the connection establishing to the Enterprise network. Now he is asking what the reason could be for that and if the changing of the EAP method could be the reason.

Additionally, he encounters the error Invalid Application , when he tries to flash the WiFiHostProgramming example to the XDK with the XDK-Workbench 3.0.1 and 2.0.1.

In regards to the Enterprise Wi-Fi connection I asked him if he is currently using the EnterpriseWiFi demo and if he could confirm that. Furthermore, I told him that his XDK should be able to connect to his companies Enterprise Wi-Fi network even with another EAP method. Additionally, I told him if an ongoing connection could not be established the complete application would hang in the connection since it does not cover the implementation of a timeout.

In regards to the Invalid Application error, I recommended to right-click the WiFiHostProgramming project and browsing down to Configure and to click add XDK Nature . That should solve the issue and the application starts correctly on the XDK.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
01.08.18 13:16 als Antwort auf Franjo Stjepandic.

Hello Franjo,

yes it works now.

Is there a way to change the Wifi hostname of the XDK? I can't find a field in one of the structs, used during the connection procedure!

Best regards,

Simon

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
02.08.18 14:53 als Antwort auf Simon Frank.
Hello Simon,

The current high-level API does not contain the functionality to change the displayed hostname the XDK takes when connecting to a Wi-Fi hotspot.

This would only be possible if the XDKs Wi-Fi chip is using peer to peer (P2P) to connect to another device via Wi-Fi. Otherwise, in default the XDK is in station mode, where the MAC address only is displayed as hostname, when connection to a Wi-Fi hotspot.

Nevertheless, if you are willing to use P2P, then you could configure that with the function sl_NetCfgSet() from the interface netcfg.h from the low-level simplelink API. You can find the interface by navigating to it over the following folder path:

SDK > xdk110 > Libraries > WiFi > 3rd-party > TI > simplelink > include

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
14.08.18 05:59 als Antwort auf Franjo Stjepandic.

Hi Franjo,

Thanks for helping me ! I couldn't connect to my Enterprise wifi because my XDK workbench was 3.4, I downgraded to 3.0.1 and it worked but my point is keep using BoschXDKCloudConnectivity example and connect with cloud via Enterprise wifi instead of my wifi hotspot to get data.Is it possible or could you recommend me a few ways to get data from XDK ? Thank you !

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
14.08.18 17:09 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

Could you please go more into detail about the downgrade you took from XDK-Workbench 3.4.0 to 3.0.1?

As far as I can analyze it, the BoschXDKCloudConnectivity example does not contain any implementation to connect the XDK to an Enterprise WiFi network.

Did you try to connect the XDK to a mobile hotspot using WPA encryption instead, which occured in errors with the BoschXDKCloudConnectivity example on the latest XDK-Workbench 3.4.0?

In regards to connect the XDK to an Enterprise network using the current BoschXDKCloudConnectivity example, this functionality is not completely implemented in the example. This would need to be implemented on your own. Please note, a big anmount of effort is required here, to assure a stable implementation.

To step into a different direction some calculating factors get involved:
For example, it depends on where you want your data send to and which kind of interfaces are supported and available. If you plan, for example, to get your data onto a cloud, it would depend on the availability of the protocol interface (e.g. Lwm2m, MQTT, CoAP, HTTP etc.).

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
15.08.18 06:20 als Antwort auf Franjo Stjepandic.

Hi Franjo,

The BoschXDKCloudConnectivity example worked well with XDK-Workbench 3.4 using my mobile hotspot but following my posts above I just had problems with implementation Enterprise Wi-Fi demo (Enterprise-Wifi 3.0) using XDK-Workbench 3.4.So I decided to reinstall Workbench 3.1 version and it worked.

Our plan is using wireless connections of IoT devices to collect data, monitor and visualize.I had implemented BoschXDKCloudConnectivity example to collect data with Python and HTTP API method successfully.That's would be great if I could connect the XDK to an Enterprise network using the current BoschXDKCloudConnectivity example but as you said I need a big amount of effort to implement by myself.Maybe I will try with BLE to collect XDK sensor data.

First I just want to collect and store data to my local database and next step I will think about how to push data onto cloud or our server.

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
15.08.18 15:32 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

Thank you for providing further information.

In case of sending data to the cloud, are you depending here on sending the data to the Bosch IoT cloud or would it be possible to send to another cloud too?

In case of sending it to another cloud, it might be worthwhile trying out Eclipse Mita to send the sensor data over MQTT or HTTP. That would come in very handy because you would only need a few lines of code to build your application.

For more information about Eclipse Mita, I recommend taking a look at the official website or the XDK Knowledgebase .

Otherwise, if you rely on the Bosch IoT cloud, I can only recommend going the step and integrate the Enterprise Wi-Fi functionality into the BoschXDKCloudConnectivity example.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
16.08.18 01:42 als Antwort auf Franjo Stjepandic.

Hi Franjo,

Integrating the Enterprise Wi-Fi functionality into the BoschXDKCloudConnectivity example is really hard for me so I choose option 1 - sending data to another cloud.But first, how could I get temperature and humidity sensor data from XDK and store it into my local database? Because I am not good at C/C++ I am only able to implement XDK examples until now.

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
16.08.18 14:39 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

For a beginner, I strongly recommend to start with the guides in the Learning section of the XDK community. Especially the First Steps guide to get familiar with programming the XDK. If you like an even more gentle start with the XDK and C, you can also take a look at these guides .

In regards to transfer data from the XDK to your own cloud, I suggest to begin with reading out the sensor data first, followed by printing it to the XDK-Workbench console.
The Sensor guide in the Learning section will teach you with basic knowledge about the environmental sensor and how to implement and also trigger it.

Afterwards, for transferring the data into your cloud, it is necessary to decide, which transfer protocol you use.
Even deeper informations about different protocols like HTTP/S, CoAP, LwM2M, MQTT, etcetera can be found within guides from the Learning section , too.

I wish you the most fun and success learning C with the XDK and also the best progress with your project.
If you follow these guides, you will be able to reach your project's goal and transfer the data into your cloud.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
21.08.18 08:34 als Antwort auf Franjo Stjepandic.

Hi Franjo,

I spent one day to research on these guides.Now I can send environment sensors data to my laptop.I made a listener with Python and I had a problem with message data received.Was there something wrong with my Python listener or XDK code ? 

0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
21.08.18 14:56 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

I am glad to hear that you are making process in regards to read out sensor data from the XDK and print it to the console of the XDK-Workbench.

Unfortunately, I cannot pinpoint the point of failure from the first glance.

As such, it would be nice if you could provide an outline of the format you are sending the sensor data over printf() function calls to the XDK-Workbench console. Otherwise, it would also be helpful if you could provide the relevant code snippet of your python script where you are gathering the incoming sensor data.

Kind regards,
Franjo
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
22.08.18 03:06 als Antwort auf Franjo Stjepandic.
Here is my reading sensor data and print it to XDK Workbech console function, it worked well.But in python server I had a problem as my post above.I also tried with SendAccelDataOverBleUdp and had a same result.
0 (0 Stimmen)
RE: MSW Wifi connection for XDK
Antwort
22.08.18 15:02 als Antwort auf Nhan Tran Dinh.
Hello Nhan,

Thank you for going more into detail about your python implementation and how you are sending the data from the XDK. Please note that you need to specify a format you are sending the data to be able to decode them on the receiving side (e.g. the UDP server, the USB receiver ).

You could use, for example, the .csv format with delimiters for the certain values, such as in the example below:

"temperature, humidity, pressure"

There the comma acts as separator for the certain sensor values and the only thing you need to take into account on the receiving side is the order of send sensor data. Additionally, a JSON format could also become handy as shown below, where you have an additional identifier in the send string.

{"Temperature": temperatureValue, "Pressure": pressureValue, "Humidity": humidityValue}

Otherwise, please take into account, when you are programming the receivers in python, that you display the incoming data correctly since you are getting everything send over USB, for example, as string.

On the other hand, when you are using the SendAccelerometerDataOverUdpAndBle example, the data is directly sent as raw integer value. In both cases, you need to display both correctly in your python receiver, either as string or as raw integer.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Stimmen)