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

SimpleClient - IPV4 Issue #20

@CarolineBoyer

Description

@CarolineBoyer

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 ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions