Hi,

Hi Iotivity-constrained developers

I am trying to run the iotivity-constrained server of zephyr port on qemu
before using it on the actual NRF board. The behavior is not correct. When
zephyr server is loaded, it initializes iotivity stack properly. Now
starting the linux client, it sends multicast discovery which is received
correctly by the zephyr server and the /light/1 resource is properly
discovered by the linux client but no progress beyond that. Server does not
seem to be handling observe. The observe request does not make it to the
zephyr server on its global IP address. The log for Zephyr Server and Linux
Client are below.

When I tried the RIOT server and linux client and also linux client/server,
they work perfectly.

The big difference I noticed in the logs are the following:
1- Both linux server and riot server bind to the link local address and
communicate via it to the linux client.

2- Zephyr is supposed to be working on tap0 interface with the following
parameters:
tap0      Link encap:Ethernet  HWaddr 3e:c1:37:b6:fa:49
          inet addr:192.0.2.2  Bcast:0.0.0.0  Mask:255.255.255.0
          inet6 addr: 2001:db8::2/64 Scope:Global
          inet6 addr: fe80::3cc1:37ff:feb6:fa49/64 Scope:Link
However, when reply to multicast discovery is received by linux client it
arrives from address:
DEBUG: ipadapter.c <network_event_thread:274>: Incoming message from
[fe80:0000:0000:0000:0200:5eff:fe00:53d8]

This address has nothing to do with tap0 or the other interface
enp0s3    Link encap:Ethernet  HWaddr 08:00:27:20:03:50
          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
          inet6 addr: fe80::dccc:db0a:2908:e6fb/64 Scope:Link

So, why do the zephyr server response come from this address? The client
properly identifies the /light/1 resource endpoint properly
Resource /light/1 hosted at endpoints:
[2001:0db8:0000:0000:0000:0000:0000:0001]:53378
but when it sends requests to this global address, it does not seem to
reach server and therefore stops the observe and progress stops.

Could someone help?

Khaled


Zephyr Server Output:
==========================================
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<process_thread_message_buffer_handler:112>: Started buffer handler process
DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_init:233>: Initializing connectivity
Let us see if we are gonna get any IP address here
DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_init:346>: IPv6 address: ::
DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_init:347>: MCAST IPv6 address: ff02::158
DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_init:348>: oc_connectivity_init: successfully initialized
connectivity
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_main.c
<oc_main_init:163>: oc_main: stack initialized
oc_main_init CALLED
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../apps/server_zephyr.c
<main:134>: oc_main_init CALLED
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<oc_allocate_message:54>: buffer: Allocated TX/RX buffer; num free: 3
oc_network_receive: received 63 bytes
oc_network_receive: incoming message:
[fe80:0000:0000:0000:3cc1:37ff:feb6:fa49]:37001
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../apps/server_zephyr.c
<main:148>: system ticks = 60400
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<process_thread_message_buffer_handler:127>: Inbound network event:
decrypted request
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:118>:

CoAP Engine: received datalen=63
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:476>: Token (len 8) [0x434098FE71113322]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 11 (delta 11, len 3): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:620>: Uri-Path [oic]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 11 (delta 0, len 3): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:620>: Uri-Path [oic/res]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 12 (delta 1, len 2): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:540>: Content-Format [10000]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 15 (delta 3, len 12): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:629>: Uri-Query [if=oic.if.ll]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 15 (delta 0, len 14): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:629>: Uri-Query [if=oic.if.ll&rt=oic.r.light]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:532>: OPTION 17 (delta 2, len 2): DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:559>: Accept [10000]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:690>: Content-format/accept-Version: [2048]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:690>: Content-format/accept-Version: [2048]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_parse_message:705>: -Done parsing-------
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:145>:   Parsed: CoAP version: 1, token: 0x4340, mid: 36127
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:151>:   type: NON
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:188>:   method: GET
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:200>:   URL: oic/res
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/engine.c
<coap_receive:201>:   Payload:
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<oc_allocate_message:54>: buffer: Allocated TX/RX buffer; num free: 2
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/transactions.c
<coap_new_transaction:89>: Created new transaction 36127 0
DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_get_endpoints:202>: $$$$$$$$$$$$$$$ End points Getting
===================
Let us see if we are gonna get any IP address here
$$$$$$$$$$$$$$$


DEBUG: /home/osboxes/iotivity-constrained/port/zephyr/src/ipadapter.c
<oc_connectivity_get_endpoints:211>: IPv6 address: 2001:db8::1
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:313>: -Serializing MID 53441 to 0x00115ddd
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:335>: Token (len 8) 43 40 98 FE 71 11 33 22DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:345>:
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:350>: Serializing options at 0x00115de9
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:370>: Serialize content format: 10000
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:372>: Content-Format [10000]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_int_option:149>: OPTION 12 (delta 12, len 2)
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_set_option_header:126>: WRITTEN 1 B opt header
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_int_option:149>: OPTION 2053 (delta 2041, len 2)
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_set_option_header:126>: WRITTEN 3 B opt header
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:405>: -Done serializing at 0x00115df1----
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:424>: -Done 185 B (header len 21, payload len 164)-
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_serialize_message:429>: Dump [0x58 45 D0 C1  43 40 98 FE]
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/transactions.c
<coap_send_transaction:115>: Sending transaction 36127
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/coap.c
<coap_send_message:436>: -sending OCF message (185)-
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../messaging/coap/transactions.c
<coap_clear_transaction:187>: Freeing transaction 36127: 0x001152e0
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<oc_message_unref:84>: buffer: freed TX/RX buffer; num free: 3
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<process_thread_message_buffer_handler:155>: Outbound network event:
unicast message
oc_send_buffer: outgoing message:
[fe80:0000:0000:0000:3cc1:37ff:feb6:fa49]:37001
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../api/oc_buffer.c
<oc_message_unref:84>: buffer: freed TX/RX buffer; num free: 4
DEBUG:
/home/osboxes/iotivity-constrained/port/zephyr/src/../../../apps/server_zephyr.c
<main:148>: sysoc_send_buffer: sent 185 bytes

=====================================================
Linux Client Log
=====================================================
DEBUG: ipadapter.c <oc_connectivity_init:653>: Initializing connectivity
for device 0
DEBUG: ipadapter.c <oc_connectivity_init:783>: Successfully initialized
connectivity for device 0
DEBUG: ../../api/oc_main.c <oc_main_init:163>: oc_main: stack initialized
DEBUG: ipadapter.c <oc_send_buffer:414>: Outgoing message to
[ff02:0000:0000:0000:0000:0000:0000:0158]:5683DEBUG: ipadapter.c
<oc_send_buffer:416>:
DEBUG: ipadapter.c <oc_send_buffer:478>: Sent 63 bytes
DEBUG: ipadapter.c <oc_send_buffer:414>: Outgoing message to
[ff02:0000:0000:0000:0000:0000:0000:0158]:5683DEBUG: ipadapter.c
<oc_send_buffer:416>:
DEBUG: ipadapter.c <oc_send_buffer:478>: Sent 63 bytes
DEBUG: ipadapter.c <network_event_thread:274>: Incoming message from
[fe80:0000:0000:0000:dccc:db0a:2908:e6fb]:37001DEBUG: ipadapter.c
<network_event_thread:276>:
DEBUG: ipadapter.c <network_event_thread:274>: Incoming message from
[fe80:0000:0000:0000:0200:5eff:fe00:53d8]:53378DEBUG: ipadapter.c
<network_event_thread:276>:
Resource /light/1 hosted at endpoints:
[2001:0db8:0000:0000:0000:0000:0000:0001]:53378
DEBUG: ipadapter.c <oc_send_buffer:414>: Outgoing message to
[2001:0db8:0000:0000:0000:0000:0000:0001]:53378DEBUG: ipadapter.c
<oc_send_buffer:416>:
DEBUG: ipadapter.c <oc_send_buffer:478>: Sent 35 bytes
Stopping OBSERVE
%%%why stop observe?

DEBUG: ipadapter.c <oc_send_buffer:414>: Outgoing message to
[2001:0db8:0000:0000:0000:0000:0000:0001]:53378DEBUG: ipadapter.c
<oc_send_buffer:416>:
DEBUG: ipadapter.c <oc_send_buffer:478>: Sent 36 bytes
_______________________________________________
iotivity-dev mailing list
iotivity-dev@lists.iotivity.org
https://lists.iotivity.org/mailman/listinfo/iotivity-dev

Reply via email to