0

I am trying to run IOTivity under Docker. I've just installed Docker on a Raspberry Pi and started it. After that I pulled the IoTivity image via Docker Hub as "iotivity/resource directory".

docker stack deploy -c docker-compose.yml iotivity
docker service ls
docker ps -a

I just followed the link https://wiki.iotivity.org/docker and followed the steps. When I run docker ps -a it doesn't show anything as in the output. The third step doesn't give any output either.

David Maze
  • 130,717
  • 29
  • 175
  • 215
  • David, don't modify questions in such a way - that you are rewriting them completely :) If you have a new question, write comment but not modify it completely so the provided answer looks inappropriate. – Ondrej Tomcik Jan 24 '19 at 09:52

1 Answers1

0

IoTivity which is in the docker hub is the IoTivity Cloud. Not the device side. If you want to run the cloud, you need more then just the resource directory, see this documentation please: https://wiki.iotivity.org/docker

If you want to run IoTivity on the device, please see: https://iotivity.org/getting-started

Ondrej Tomcik
  • 1,150
  • 9
  • 24
  • hello ondrej. thank for your reply. I got it but the problem is i want to run it on raspberry pi and also following the link [link]https://wiki.iotivity.org/build_for_your_system.and i installed it on raspberry pi but there is no support of iotivity with pi.can you please guide me , how to discovering resources using iotivity. i am new in this. – Gaurav Sharma Jan 24 '19 at 09:51
  • Page you provided is for device side of the IoTivity. Not for cloud part, which is provided in form of ready to use docker containers. I will ask differently, what do you want to achieve? – Ondrej Tomcik Jan 24 '19 at 09:53
  • i just need to discovering resource using Iotivity along with raspberry pi.Like as i have raspberry pi as a server installed in this and three other raspberry pi connected to same or other wifi. i just need to find the resource using the main server pi which have iotivity in it. How can i do that.Second the docker+ iotivity cloud which i asked you , how can be they use mean i followed all the steps above in link but they created but don't know furthur process. please can you give me idea of both the questions. thanks – Gaurav Sharma Jan 24 '19 at 11:01
  • If they are in the same network, you don't need IoTivity cloud. It's for the scenario where devices are all over the "world" and you want to access them. If you want to access IoTivity devices which are in the same network with your RasPi, follow https://github.com/iotivity/iotivity-constrained/blob/master/apps/client_linux.c this example. It's a client sample. – Ondrej Tomcik Jan 24 '19 at 11:37
  • Thank you. One more thing is, how can i discover resource as i asked on previous comment.And they can communicate using any IoT protocol.Like first main Pi automatic discover the near by resource and then communication process start. – Gaurav Sharma Jan 24 '19 at 12:03
  • Here you're discovering all resources of type oic.r.light, what means, you will find each device which has the light resource you can control. https://github.com/iotivity/iotivity-constrained/blob/master/apps/client_linux.c#L132 – Ondrej Tomcik Jan 24 '19 at 20:45
  • Thank you. I am finding onem2m support for raspberry pi but can't find on google. so i can install it on anothe rpi board and check which is easier.Can you suggest me better platform for iot with RpI in which thing like resource discovery of neighabouring resources, wifi, bluetooth are present. – Gaurav Sharma Jan 25 '19 at 06:36
  • yes i checked and save this file as same name, need to know how to run this.can it be find my raspberry pi's or i need to code it up. Is there any functionality in Iotivity which can discover nearby wifi resources and registered them. – Gaurav Sharma Jan 25 '19 at 11:59
  • How to run it requires basic skill of how to compile it. Follow iotivity wiki, you find there most of the information. – Ondrej Tomcik Jan 29 '19 at 09:36
  • Hello Onderj, Thank you i build the iotivity on raspberry pi and run the examples like ./simpleserver and ./simpleclient. Now i want to know how to use these example code as per my requirement. Mean, i want it on android application.Can we edit in example codes or write own code. i didn't find it anywhere. – Gaurav Sharma Feb 11 '19 at 04:32
  • For java you have codebase including examples here: https://github.com/iotivity/iotivity/tree/master/java How to build: `scons TARGET_TRANSPORT=IP BUILD_JAVA=yes JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 WITH_CLOUD=yes WITH_TCP=yes TEST=0` – Ondrej Tomcik Feb 12 '19 at 10:29
  • great Thank you sir. If i have iotivity on one Pi board and want resource discovery and broadcasting with another Pi's board which has no iotivity. can i do that. Is it necessary to iotivity platform in another board. – Gaurav Sharma Feb 13 '19 at 04:15
  • If you're interested just in resource discovery, you can use https://github.com/go-ocf/go-coap (mcast/client example) – Ondrej Tomcik Feb 13 '19 at 08:17
  • i seen the above link and it is for resource discovery and uses the coap protocol in it . I can just use it in the board and on the other hand the can i use iotivity server on another pi board.is it possible. i am working on the vanet roadside unit and onboard vehical unit where every vechile is registerd itself to the roadside unit and search resources. But if every board has iotiivity in it means it is dependent. – Gaurav Sharma Feb 13 '19 at 09:28
  • IoTivity brings with itself lot of other features, like security, onboarding, discovery, observation. Depends on your use-case and requirements. I don't see a reason why to do everything from a scratch. – Ondrej Tomcik Feb 13 '19 at 10:23
  • This is because i always run client application on the onboard units. But it is iotivity dependent. but we don't know these units does have iotivity and discover and register itself except it always use coaps and http. – Gaurav Sharma Feb 13 '19 at 10:43
  • @GauravSharma if my answer was successful, mark it as solved. Thanks – Ondrej Tomcik Feb 21 '19 at 11:02
  • dear ondrej your answer was awesome but i didn't come out from my problem. i did't understand the iotivity and how can i make and edit the code as per my requirement. like in the resource /examples, there are many codes and .json files and also the bat files. why it is used for. Again OCResourceHandle m_resourceHandle. what is OCResourcehandle. i couldn't found any details regarding it in ....can you please let me know the code and how to edit it. Thank you – Gaurav Sharma Feb 22 '19 at 12:14
  • hello ondrej,i installed the iot-lite c sdk for this. – Gaurav Sharma Mar 06 '19 at 06:22
  • hello ondrej,i installed the iot-lite c sdk for this. Now i am doing recording the ip address of connected severs to the client so i run the simpleclient and simpleserver.c . i have a problem in it. on the client side it shows me ipv6. but i need ipv4. i didn't find relevant ipv4 and why it is taking it so. – Gaurav Sharma Mar 06 '19 at 07:04
  • @GauravSharma please write to iotivity-dev@lists.iotivity.org . Stackoverflow is not step-by-step manual :) – Ondrej Tomcik Mar 06 '19 at 21:26
  • Thank you very much for your kind support. – Gaurav Sharma Mar 08 '19 at 04:04
  • iotivity.org/getting-started is out of date. I would recommend going to https://iotivity.github.io/IoTivity-Getting-Started/ – gnash117 Mar 23 '20 at 18:13