[dev] Java IoTivity APIs for Linux

2016-11-29 Thread Durbha, Viswanath
Hi,

Recently I've seen the following message in the mailing list about the work 
regarding a generic Java API work just completed and merged into master. Hope 
this helps.
https://lists.iotivity.org/pipermail/iotivity-dev/2016-November/006083.html

Thanks,
Viswanath

On Tue, Nov 29, 2016 at 8:06 PM, MATTIA ANTONINI mailto:mattia.antonini1 at studenti.unipr.it>> wrote:
Hi All,
I have to work with IoTivity inside a  java-based Linux application. Is it 
officially supported? where can I find some information? or have I to write 
some JNI glue code?

Cheers,

Mattia Antonini

___
iotivity-dev mailing list
iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org>
https://lists.iotivity.org/mailman/listinfo/iotivity-dev




--
Thanks and Regards,
Viswanath
https://socialtango.cognizant.com/profile/103771/about

This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information. 
If you are not the intended recipient(s), please reply to the sender and 
destroy all copies of the original message. Any unauthorized review, use, 
disclosure, dissemination, forwarding, printing or copying of this email, 
and/or any action taken in reliance on the contents of this e-mail is strictly 
prohibited and may be unlawful. Where permitted by applicable law, this e-mail 
and other e-mail communications sent to and from Cognizant e-mail addresses may 
be monitored.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/82cec0e3/attachment.html>


[dev] IoTivity in Kistler products

2016-11-29 Thread Ondrej Tomcik
Hello IoTivity developers.
I would like to ask you for help. We are evaluating IoTivity platform for our 
test platform and I would like to ask you few questions which are 
not clear to me yet.

We have for example measurement station which contains our sensors(can measure 
pressure, force, acceleration and torque). Some of them can host IoTivity 
directly and connect to cloud, but some of them not.

? Other IoT platforms provides ?gateway?. This gateway uses 
adapters(drivers) in which you can implement logic for data transformation. For 
example, 3rd party camera uploads xml with ocr information and picture to ftp 
server. I need to host this FTP server in an adapter and when device uploads 
the file, I parse this xml, transform to json and send this message to IoT 
platform in the name of that device. How should I handle these type of devices 
with IoTivity? I was not ablemto find something similar.

IoTivity supports cloud deployment. Devices which wants to communicate with the 
cloud has to sign-up. After they are authorized, they can communicate with 
Cloud Interface. I found two examples. One is aircon_controlle and if I 
understand IoTivity correctly, it is both server and client, which can change 
it?s state (on/off).

? Is this state stored both locally and also on cloud side in resource 
dictionary?

It is required for us to send many telementry messages from station sensors 
(and gateway) to cloud / from station sensors to station infield server. This 
messages has to be queued, in correct order and delivered.

? How is this done? Is Kafka used for this purpose?

?Is messaging done through Cloud Interface -> Message Queue -> Kafka?

? How are intermittent connections handled ?

? On the cloud side, we will have a microservice which will receive 
these messages and route it to correct microservice. Is it only client which 
will subscribe to the specific topic?

? Is it possible to allow subscribing only from internal network of 
cloud and publishing from sites?



Sorry for many questions, but we have many requirements which as far as I see 
IoTivity can fulill. But I am not sure how exactly. Documentation has few gaps 
which I will try to update later.



Thank you.

Ondrej Tomcik @ Kistler


Sent from my iPad
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/aebf686d/attachment.html>


[dev] Basic questions on IoTivity security

2016-11-29 Thread Prakash Karthikeyan

Hi Max,
With my experience in working with IoTivity, the secured flag is not going to 
change anything in maximum general server/client examples provided. 
You can find these general examples in /out/../../resource/examples
1. The secured flag is meant to create a resource with options to communicate 
via a secured channel using tinyDTLS or mbedTLS. 
These are mentioned in SVR's while creating a resource.
There are different steps involved before the regular communications with the 
server created with secured flag (On-Boarding, Provisioning etc.,). Hope this 
link helps you to find out different steps in that. 
Link: https://openconnectivity.org/wp-content/uploads/2016/01/Habib-Virji.pdf
The examples when you build using the secured flag are mentioned in the PDF 
from above link. 
2. The server which is created with secured flag needs Storage, Ownership 
transfer method etc., Which are not implemented in regular server/client 
examples.
Non-Secured and Secured UDP communication ports are different and mentioned in 
the specs.
You can go through scons files under different folders to findout which files 
are included when building with SECURED=1 flag.
Hope above details answers your question.
--
Regards,
Karthikeyan Prakash
Blog: http://goo.gl/mN65Dl Tuesday, 29 November 2016, 09:31PM +05:30 from Max 
Kholmyansky  max001 at gmail.com :

>Hi,
>
>2 basic questions:
>
>1. What's the exact difference between SECURED=1 and SECURED=0 compiled 
>library versions?
>Is "1" a superset of ?"0"? Implementing a different behavior? What exactly "0" 
>cannot do?
>
>2. If a server resource is created as "secure" (with?OC_SECURE flag):
>I understand it means that "it can be accessed in both non-secure and secure 
>(DTLS) way" - right?
>If this is the case, how does the IoTivity client determine whether or not to 
>use encryption?
>
>Thanks in advance,
>
>Max
>
>Software Architect - Tekoia Ltd.
>___
>iotivity-dev mailing list
>iotivity-dev at lists.iotivity.org
>https://lists.iotivity.org/mailman/listinfo/iotivity-dev
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/b32f18cf/attachment.html>


[dev] Basic questions on IoTivity security

2016-11-29 Thread Thiago Macieira
On ter?a-feira, 29 de novembro de 2016 18:01:48 PST Max Kholmyansky wrote:
> Hi,
> 
> 2 basic questions:
> 
> 1. What's the exact difference between SECURED=1 and SECURED=0 compiled
> library versions?
> Is "1" a superset of  "0"? Implementing a different behavior? What exactly
> "0" cannot do?

SECURED=0 is a debug mode. It disables a lot of functionality, including 
encryption, just so you can develop your application.

Such application must never be deployed. It will never pass OCF certification.

What's more, a SECURED=0 application will not interoperate with SECURED=1 
applications. In order for you to test an application with real devices (when 
those exist), you'll need SECURED=1

> 2. If a server resource is created as "secure" (with OC_SECURE flag):
> I understand it means that "it can be accessed in both non-secure and
> secure (DTLS) way" - right?

The other way around: it can only be accessed in secured way. If the flag is 
absent, then IoTivity allows it to be accessed without DTLS.

Note that allowing access outside of DTLS is out of scope of the OCF 
specification. I don't remember whether that will also cause a certification 
failure. Either way, you should not have devices without the OC_SECURE flag.

> If this is the case, how does the IoTivity client determine whether or not
> to use encryption?

I think you should not ask the question.

Instead, use encryption, period.

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



[dev] presence?

2016-11-29 Thread Thiago Macieira
On ter?a-feira, 29 de novembro de 2016 13:42:42 PST Kis, Zoltan wrote:
> A resource/device directory should be able to encapsulate this - is a
> resource directory guaranteed to be in the OCF network nowadays?

It is not.

This is a topic I want to address in the OCF 1.1 protocol.

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



[dev] Improper code in CAReceiveMessage function ?

2016-11-29 Thread Thiago Macieira
On ter?a-feira, 29 de novembro de 2016 04:31:11 PST Arpit Agarwal wrote:
> In the following code in CAReceiveMessage function:
> 
> if (flags & CA_IPV6)
> {
> namelen = sizeof (struct sockaddr_in6);
> level = IPPROTO_IPV6;
> type = IPV6_PKTINFO;
> len = sizeof (struct in6_pktinfo);
> }
> else
> {
> namelen = sizeof (struct sockaddr_in);
> level = IPPROTO_IP;
> type = IP_PKTINFO;
> len = sizeof (struct in6_pktinfo);
> }
> 
> May I know why the len is set to sizeof (struct in6_pktinfo) in case of IPv4
> packet? Is it intentional with a purpose? Shouldn't it be set to sizeof
> (struct in_pktinfo) ? It will be helpful if someone can clear my doubt.

Hello Arpit

Yes and no. This looks like a copy & paste error and it should have been 
sizeof(struct in_pktinfo). However, this is harmless. This part of the code is 
simply telling the OS the size of the buffer, which was defined above as;

union control
{
struct cmsghdr cmsg;
unsigned char data[CMSG_SPACE(sizeof (struct in6_pktinfo))];
} cmsg;

If it set the len to sizeof(struct in_pktinfo), then it needs to assert 
(hopefully static_assert) that the size of in6_pktinfo is greater than or 
equal to the size of in_pktinfo.

Alternatively, it can do what the Windows code below does and simply pass the 
size of the buffer:

union control
{
WSACMSGHDR cmsg;
uint8_t data[WSA_CMSG_SPACE(sizeof (IN6_PKTINFO))];
} cmsg;
// 
  .Control = {.buf = cmsg.data, .len = sizeof (cmsg)}

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


[dev] Basic questions on IoTivity security

2016-11-29 Thread Max Kholmyansky
Hi,

2 basic questions:

1. What's the exact difference between SECURED=1 and SECURED=0 compiled
library versions?
Is "1" a superset of  "0"? Implementing a different behavior? What exactly
"0" cannot do?

2. If a server resource is created as "secure" (with OC_SECURE flag):
I understand it means that "it can be accessed in both non-secure and
secure (DTLS) way" - right?
If this is the case, how does the IoTivity client determine whether or not
to use encryption?

Thanks in advance,

Max

Software Architect - Tekoia Ltd.
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/12e38897/attachment.html>


[dev] Java IoTivity APIs for Linux

2016-11-29 Thread MATTIA ANTONINI
Hi All,
I have to work with IoTivity inside a  java-based Linux application. Is it
officially supported? where can I find some information? or have I to write
some JNI glue code?

Cheers,

Mattia Antonini
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/9777c52e/attachment.html>


[dev] presence?

2016-11-29 Thread Kis, Zoltan
Hello,

It seems the OCF Core spec 1.1 does not deal with presence any more: the "
oic.wk.ad" resource type and the "/oic/ad" resource are not specified any
more - or then it's just me who doesn't find them.

iotivity still seems to support "enablePresence()" and "disablePresence()"
that are based on the "/oic/ad" resource. That sounds obsolete now.

I wonder what are the current mechanisms in OCF that support the following
use cases:
- when a server deletes/unregisters a resource, observers of that resource
SHOULD get delete notifications
- [sub-case] when a client deletes a remote resource, observers of that
resource SHOULD get delete notifications
- when a server device goes down, observers for that should get
notification instead of trying to fetch resources of that device in vain.

Without these, client applications need to do periodic discovery and
maintain their own lists of resources and devices. This is catastrophic for
network and battery efficiency when we scale it up to the projected number
of IoT devices.

A resource/device directory should be able to encapsulate this - is a
resource directory guaranteed to be in the OCF network nowadays?

I wonder what are the recommended client work flows the current OCF Core
spec is supporting. Right now it seems that a client first needs to look
for a resource directory; if there is one, use it. Otherwise set up
periodic discovery and maintain own resource/device list.

Thanks,
Zoltan
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/71f0ec71/attachment.html>


[dev] [IoTivity Helpdesk #33244] RE: 1.2.0 build failure

2016-11-29 Thread Trevor Bramwell via RT
Hi Uze,

Sorry for not responding to this sooner, as it was the Thanksgiving holiday in 
the US.

I have updated Jenkins to build master, 1.1-rel, and 1.2-rel twice a day, I 
believe the timing needs to be modified, but my idea is to have branches 
verified before the start of work days in each timezone (PST/KST) so any 
blocking issues can be addressed ASAP.

I'll work with Phillipe to address any discrepancies he may find in what needs 
to be cached on the build server.

Regards,
Trevor Bramwell

On Wed Nov 23 21:02:36 2016, uzchoi at samsung.com wrote:
> Two activities we can think about.
> 
> - From the Jenkins we need to trigger the build verification
> periodically for released version. (Trevor, Could you help it)
> - External library dependency with exact version. It should be done
> from 1.2.1 release [https://jira.iotivity.org/browse/IOT-1600]
> 
> BR, Uze Choi
> -Original Message-
> From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev-
> bounces at lists.iotivity.org] On Behalf Of Thiago Macieira
> Sent: Thursday, November 24, 2016 2:43 AM
> To: iotivity-dev at lists.iotivity.org
> Subject: Re: [dev] 1.2.0 build failure
> 
> On ter?a-feira, 22 de novembro de 2016 15:39:54 PST Nivedita Singhvi
> wrote:
> > * It does not matter if it was working when first released, if 48hrs
> > later
> > is subsequently breaks with the existing code. And all subsequent
> > users are affected going forward, for ever, as you point out, as
> > it is
> > not removed or replaced. Most projects rev their release when
> > something
> > like that happens, or provide some mitigation for users.
> 
> Yes, we need an update that fixes it. That's 1.2.1 and it's coming.





[dev] Java IoTivity APIs for Linux

2016-11-29 Thread Gregg Reynolds
On Nov 29, 2016 8:37 AM, "MATTIA ANTONINI" <
mattia.antonini1 at studenti.unipr.it> wrote:
>
> Hi All,
> I have to work with IoTivity inside a  java-based Linux application. Is
it officially supported? where can I find some information? or have I to
write some JNI glue code?
>

fwiw I'm working on a minimal java wrapper on the C API, no C++.  anybody
interested in helping with the design and implementation is welcome.  just
getting started, no docs yet, but the intrepid can take a look at
https://github.com/iotk/iochibity-java/tree/master/jni-c .  OCFTest.java
will give you the general idea.

Gregg
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/de8bdd87/attachment.html>


[dev] presence?

2016-11-29 Thread Gregg Reynolds
On Tue, Nov 29, 2016 at 5:42 AM, Kis, Zoltan  wrote:

> Hello,
>
> It seems the OCF Core spec 1.1 does not deal with presence any more: the "
> oic.wk.ad" resource type and the "/oic/ad" resource are not specified any
> more - or then it's just me who doesn't find them.
>

I couldn't find them either.

>
> iotivity still seems to support "enablePresence()" and "disablePresence()"
> that are based on the "/oic/ad" resource. That sounds obsolete now.
>
> I wonder what are the current mechanisms in OCF that support the following
> use cases:
> - when a server deletes/unregisters a resource, observers of that resource
> SHOULD get delete notifications
> - [sub-case] when a client deletes a remote resource, observers of that
> resource SHOULD get delete notifications
> - when a server device goes down, observers for that should get
> notification instead of trying to fetch resources of that device in vain.
>
> Without these, client applications need to do periodic discovery and
> maintain their own lists of resources and devices. This is catastrophic for
> network and battery efficiency when we scale it up to the projected number
> of IoT devices.
>
> A resource/device directory should be able to encapsulate this - is a
> resource directory guaranteed to be in the OCF network nowadays?
>
> I wonder what are the recommended client work flows the current OCF Core
> spec is supporting. Right now it seems that a client first needs to look
> for a resource directory; if there is one, use it. Otherwise set up
> periodic discovery and maintain own resource/device list.
>
> Thanks,
> Zoltan
>
>
> ___
> iotivity-dev mailing list
> iotivity-dev at lists.iotivity.org
> https://lists.iotivity.org/mailman/listinfo/iotivity-dev
>
>
-- next part --
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/8ff51ad4/attachment.html>


[dev] Improper code in CAReceiveMessage function ?

2016-11-29 Thread Arpit Agarwal
An HTML attachment was scrubbed...
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/b70e1718/attachment.html>
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 13402 bytes
Desc: not available
URL: 
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161129/b70e1718/attachment.gif>