AB BLE Gateway Http Post

Hi.

I am trying to setup AB BLE Gateway and get it connect to a
http web server’s async handler on either port 80 or ssl port 443.
I have successfully setup my application on the mobile phone using ABGateway software,
but still I get no data or posts happening on the server.
If I type the URL manually into my browser I then get data.

I’m logging all the data in the contents of the http request and I’m
simply not getting any beacons detected. nothing posting to the
http webserver async handler.
Any advice on how to get this working would be of great assistance.
firmware version is 1.9 . Application : HTTP Client also tried MQTT client with no joy

AB BLE Gateway doesn’t support SSL yet. So you should use http only. We have a simple http server example written in nodejs. please have a look.

Hi,
Thank you I have changed to non encrypted port 80,
Conntection Type : HTTP Client
Host : www.xxxxxx.com
Port: 80
URI: /abgate
RSSI fielder : default
What is the name of the context request param to get the beacon ranging data.
I’m logging all the context request params on the server to see the values but I’m
not seeing any data that looks like beacons ranging data.
what is the context request key param called?

You should check for HTTP raw post data. Here’s an example for nodejs. For php, you can use php://input instead

Hi,
For those of you from C# world I got the data using a StreamReader on the content.Request.InputStream.
very simply…

using (var reader = new StreamReader(context.Request.InputStream))
{
string httpdata = reader.ReadToEnd();
}

Thank you for sharing this. Could you please share a simple parser code written in C#?

Hi, I’ve been battling for the last 2 days trying to get the extracted
http data, this is what I’m getting posted back to the server
line1:{“v”:“1.9”,“mid”:977,“id”:“3583076”,“mac”:“A020A636AC64”,“rssi”:-68,“time”:981,“ip”:“192.168.0.33”}
line2:n/a
line3: Looks like data is coming in as binary and starts with ýÿ
OR
line3: convert binary into hex I get the following data
KD2702606405KD54KDKD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000C03KDKD0D0AKD2702606405KDKD3AKD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000A13KDKD0D0AKD1A00KD4914493644KD0201050D094646325F31343439333634340D0AKD0C004B62KDKD71KDKD02011A0D0AKD1A00KD4914493644KD0201050D094646325F31343439333634340D0AKD2702KD4AKD76v9KD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD00030030KD0D0AKD0C004B62KDKD71KDKD02011A0D0AKD2702087CKD00305FKD0201051AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD00030508KD0D0AKD2702KD3639j249KD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000E02KDKD0D0AKD2702087CKD003042KD0201051AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000304KDKD0D0AKD1A00KD4914493644KD0201050D094646325F31343439333634340D0AKD0C004B62KDKD71KDKD02011A0D0AKD18001C1AKD5BKD47KD02011A0BKD4C0009060336KDKD00160D0AKD1A00KD4914493644KD0201050D094646325F31343439333634340D0AKD2702KD3639iF11KD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000E02KDKD0D0AKD2702KDKD1949KDKDKD0201061AKD4C000215KD6D46KD24KD4663KD5230KD6B0EKDKD000D0103KD0D0A

What am I doing wrong? what are the steps required to decode the data after the two \r\n in the http post. the first part of post is easy as its in JSON but i’m stuck with the next part after the \r\n \r\n the documentations say to expect HEX but all I’m getting is binary and as you can see via the example above that’s just not right. Please could you advise and remember I’m writing code in C# not in java.?

http://wiki.aprbrother.com/wiki/AB_BLE_Gateway_User_Guide

Thanks I’ve read the user guide but it does not cover this topic very well.
Please could you explain the hex data that I’m getting in the post.
I can see the 0D0A value repeated and that means “End of Frame” but where
is the FE value for “Start of the data frame” ? Mine all look like the start with KD which is
strange since it’s hex, I would expect to see only chars A through F, please advise?.

Hi jay,

Please paste the code about how do you convert binary to hex.

Can you give me your email address and i will send
you further information, so its not on a public forum.

I’ve sent you a private message. Please check it