Remote Procedure Call through Internet with SOAP in XMC4000

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

cross mob
Not applicable
Hi! I'm Roberto Barrado. Last summer (2014) I worked in Infineon (München) for my final project: Porting SOAP to XMC4400 and 4500 microcontrollers.


Introduction
SOAP allows working with RPC (Remote Procedure Calls) through Internet easily. For this task I used gSOAP, it is a C and C++ software development toolkit for SOAP and REST XML Web services and generic C/C++ XML data bindings. ATENTION: gSOAP and (the plugin is under GPLv2 license.)

Using the plugin that I did, it's possible to create a SOAP/REST server or client with a few clicks.

1512.attach





To install it into DAVE, you only need to download and extract the zip file, and select the path to SOAP_Update folder in "tab "Help/Install New Software". Then you can find this screen in Communication/SOAP or with his icon.


It is mandatory to use ETH003 App!!






Examples
I did some examples to start easily, and another more complicated simulating a simple free cooling in computing centre (If you don’t know it, see this video😞
The goal is to connect through Internet a SOAP Server (xmc4500 relax that manages the control of the system) with a sensor temperature as SOAP client (xmc4500 hexagon), and android app as client too.

  • Android app:

    • Select auto or manual mode:

      • Auto: XMC4500 relax take all decisions
      • Manual: User can manage the actuators.




  • XMC4500 hexagon:

    • I simulated the outdoor temperature with a potentiometer and ADC converter.



  • XMC4500 relax:

    • Read the inside temperature with a TMP35 sensor and ADC converter.
    • Take a decision:

      • If outsideTemp open window (move servo)
      • If Desired Temp normal mode (start dc motor)
      • If Desired Temp mixed mode (mover servo and used dc motor, 50% both)

    • Display the temperatures and state of system (dc motor and servo) in LCD.

1513.attach



[INDENT=6]** In the video the outside temp is -55ºC, it's not a bug, this is because I simulated temp with a potentiometer.
** At the beginning, I move one of the slider and nothing happened, in fact, the dc motor spins faster, you can check it in the LCD.







Benchmark

In the benchmark I did a simple calculator for integer, float and double types, and an operation with String (It receives one string, and response with “Hi! I received your message”).

Volume test












Transac per sencond per operationNum threads (clients)Test time
303120 s




Results:















Average (ms)Nº transacTransac per secondBytesErrors
57.0114240102.7261935322






Although the average (orange line) time is high, the results are really good, because a XMC4500 can respond almost 103 operations in a second, only 2 errors in 14240 operations and around 50000 BPS (Green line in graphic).
In the same test, I measured the time that processor is available for other operations, the second bar, (os_iddle_demon) is this time, and around 9% of the time it is doing nothing.
It means this percent of time, we can use the processor for the main application, it is not much because in this test, the charge of communication Works is so high.

1517.attach




It means that during this percent of time, we can use the processor for the main application, and it is not much time because in this test the soap communication load is heavy.
If the requirements of SOAP communication decrease, it’s possible to get around 70% of processor time free.


Stress test












Transac per sencond per operationNum threads (clients)Test time
501-1060 s




This is a stress-test, here we can check how XMC4500 can work with almost 80000 Bytes per second until it fails.
In the second graphic we see that we get a lot of errors. It shows the relation between the number of threads in the test (soap clients) and the number errors.

1516.attach







Operations comparison












Transac per sencond per operationNum threads (clients)Test time
1002120 s




Finally, I measured the time every operation takes:

1518.attach








The DAVE eclipse plugin and all this examples are available in this zip file.
0 Likes
1 Reply
Travis
Employee
Employee
First solution authored Welcome! 500 replies posted
Hi Roberto,

This is indeed a wonderful project. Thanks for sharing.

BR
Travis
0 Likes