Roy,

Just to give you a hint. We have tried to reproduce the issue with 
Android(Server) to Android(Client) and Linux(Server) to Android(Client), but 
were not successful.

Thanks,

Tim Kourt
Intel Open Source Technology Center


-----Original Message-----
From: iotivity-dev-bounces at lists.iotivity.org 
[mailto:[email protected]] On Behalf Of Thiago Macieira
Sent: Sunday, January 10, 2016 9:09 PM
To: iotivity-dev at lists.iotivity.org
Subject: Re: [dev] [Question] About double data transfer

On Saturday 09 January 2016 23:52:22 Roy Kang wrote:
> Dear all,
> 
> I have sent double data from arduino to android.
> 
> value is 32.17
> 
> - Arduino side (ocserver.cpp)
> My code is as below.
> if (OC_REST_GET == entiryHandlerRequest->method) {
>     double temp = 32.17;
>     OCRepPayloadSetPropDouble(payload, "temp", temp); } ...
> 
> - Android side (SimpleClient.java)
> temp: -3.47786198xxxxxxx (x is number)
> 
> As i know, arduino mega is little endian.
> Android is little endian, too.
> I guess, it doesn't cause of endian.
> 
> What is problem ?

It's not endianness.

There's a bug somewhere. Anyway, this code is changing since we will not 
transmit floating point anymore.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center

_______________________________________________
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to