HTTP Request Method on XDK
응답
16. 10. 19 오전 9:38
Hello - it would be great if we could see in future a perfect HTTP Request Demo
which will be able to answer Sensor and Button data in JSON format.

On the images i show you an example how i can easy work with my WioLink Nodes.

Hope to see such a great demo soon.
 
+1 (1 투표)
RE: HTTP Request Method on XDK
응답
16. 10. 19 오전 10:39 as a reply to Achim Kern.

Hello Achim,

we will release a HTTP guide that provides descriptions of all required interfaces and functions soon.
The guide will be way enough for every community user to set up such an example on its own.

Kind regards,
Manuel

+1 (1 투표)
RE: HTTP Request Method on XDK
응답
16. 11. 14 오후 2:17 as a reply to Manuel Cerny.

Hello - i have seen and noticed the XDK Http Guide.
Actually i am running some tests with GET and POST messages with your HTTP Rest Client Demo.
My XDK is now able to connect to my other sensor nodes (http server on photons and redbear duos) and read their sensor data and other stuff in json format.

Normally i would prefer a running HTTP server on the XDK also, as i have on my own sensor nodes. XDK Sensor reading would then a little bit easier ?
I will make some more trials soon with your HTTP Client solution to see how i will get all XDK sensor data directly into my nodes and my software applications.

------------------------------------------------------------

1.1 The HTTP Request
HTTP defines how messages between two network endpoints should be structured in order to
obtain an efficient and reliable data transfer. In every interaction, one network endpoint acts as the client and the other as the server. The client sends requests to a server whenever it needs a certain resource or wants to perform a certain operation that the server offers. The server listens for incoming requests and tries to serve them as they arrive. For every request, the server replies with a response. This guide will demonstrate how to use the XDK to send requests.

The XDK will therefore act as an HTTP client.
Note: The presented modules also offer functionality to setup an HTTP server.
This will, however, not be covered in this guide. (may be another ?)

0 (0 투표)
RE: HTTP Request Method on XDK
응답
16. 11. 15 오후 12:37 as a reply to Achim Kern.

Hello Achim,

an integration of a HTTP server implementation in the HTTP guide is currently not planned.
The most common way to send data via HTTP is in client mode. Thus we explain this use case in the guide.

The XDK is able to operate as a HTTP server too, of course. If a HTTP server is way more convenient for you I would recommend to take a look at the the serval stack and implement it on your own.

Please note that especially for storing and availability issues a raspberry may be more convenient. The XDK is primarily designed to be used as a sensor node itself and not as a server.

Kind regards,
Manuel

0 (0 투표)
RE: HTTP Request Method on XDK
응답
16. 11. 16 오후 3:11 as a reply to Manuel Cerny.

Thank you for the feedback.
I will try to work with the http client example and make me more familar with this.

As i already told - i am now able to receive sensor data from other nodes on my xdk's.
But i have still some small bugs.

What is a perfect HTTP request answer that the XDK will need
and not see a retcode other than zero ?
At the moment i have still a retcode 1309 - but i see the correct data.
How can i get rid of this - where can i see easy a failure text belonging to a retcode ?

 INFO | XDK DEVICE 1: [x] Bosch XDK - initialization WiFi ...
 INFO | XDK DEVICE 1: [x] Bosch XDK - a WiFi IP was retrieved : 192.168.178.148 OK
 INFO | XDK DEVICE 1: [x] Bosch XDK - initialization HTTP REST Client ...
 INFO | XDK DEVICE 1: [x] Bosch XDK - HTTP REST Client running ...
 INFO | XDK DEVICE 1: sensor reading = 1
 INFO | XDK DEVICE 1: now calling demo http_request site http://23.22.14.18:80/ip ...
 INFO | XDK DEVICE 1: retcode_status=0
 INFO | XDK DEVICE 1: now reading the response...
 INFO | XDK DEVICE 1: len=33
 INFO | XDK DEVICE 1: HTTP RESPONSE: 200 [application/json]
 INFO | XDK DEVICE 1: {
 INFO | XDK DEVICE 1:   "origin": "79.251.254.112"
 INFO | XDK DEVICE 1: }
 INFO | XDK DEVICE 1: now calling RedBearDuo5 ...
 INFO | XDK DEVICE 1: retcode_status=1309
 INFO | XDK DEVICE 1: now reading the response...
 INFO | XDK DEVICE 1: len=24
 INFO | XDK DEVICE 1: HTTP RESPONSE: 200 [application/json]
 INFO | XDK DEVICE 1: {
 INFO | XDK DEVICE 1:   "lux": "177.55"
 INFO | XDK DEVICE 1: }

Edited by Manuel Cerny: Please refer to the community guidelines.

0 (0 투표)
RE: HTTP Request Method on XDK
응답
16. 11. 16 오후 3:01 as a reply to Achim Kern.

Hello Achim,

please note that this issue is not related to improvements and should be posted in the Community Support.
I replied on your issue in a thread in the Community Support category. I would ask you to open new threads for different issues.

Kind regards,
Manuel

0 (0 투표)