Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

SimpleClient - IPV4 Issue #20

Open
CarolineBoyer opened this issue Apr 17, 2018 · 1 comment
Open

SimpleClient - IPV4 Issue #20

CarolineBoyer opened this issue Apr 17, 2018 · 1 comment

Comments

@CarolineBoyer
Copy link

Hello everyone,

I came across an issue after installing iotivity-constrained on a raspberry pi 2 using in port/linux :

make DEBUG=1 IPV4=1

and running the ./simpleclient script that is created in port/linux.

First thought : it would be interesting to have an /out/ folder containing all the script created by the makefile in the /port/linux like the main iotivity project, as that would make the make clean easier ( as it isn't working not erasing everything as it is now).

ISSUE :
When launching the ./simpleClient on the Raspberry Pi 2, I have :

DEBUG: ../../api/oc_buffer.c <process_thread_message_buffer_handler:112>: Started buffer handler process
DEBUG: ../../api/oc_introspection.c <oc_create_introspection_resource:118>: oc_introspection: Initializing introspection resource
DEBUG: ipadapter.c <oc_connectivity_init:887>: Initializing connectivity for device 0
ERROR: ipadapter.c <oc_connectivity_init:929>: creating server sockets

error initializing connectivity for device
Abort.
Aborted

After looking at the oc_connectivity_init method, it seems that the program tries to create a socket using AF_INET6 even if I put the IPV4 option. And as IPV6 is not enabled on the pi, I guess it is why the socket returns an error.
Your IPV4 test is after the socket method... and therefore never called... Could it not be possible to put all IPV6 code under an ifdef block or something ?

Second thought : it would also be great to have the nature of the socket error returned in the message.

Or maybe there is something that I didn't get, and done wrongly. Any thoughts ?

@yannS2016
Copy link

hello CarolineBoyer

Are you still experiencing this issue! i have been running iotivity constrained on my raspberry PI 2 without issues. IPV6 is mandatory from what i got from Kirsten. when you enable IPV4 it will allocated IPV4 sockets coupled to the IPV6 ones. you said "And as IPV6 is not enabled on the pi" Actually Pi uses IPV6 on the link-local or scope link( address starting with : inet6 fe80::). which is the one required for the stack to communicate via IPV6.

Regards

Yann

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants