intel / zephyr.js

JavaScript* Runtime for Zephyr* OS
Other
180 stars 64 forks source link

Resource can only be retrieved at the first time when running multiple sensors together #1566

Closed xiaoyu3x closed 6 years ago

xiaoyu3x commented 7 years ago

Description

Resource can only be retrieved at the first time with iot-rest-api-server@0.6.0 and node@6.11.0 when running multiple sensors together,after resource can not be found again.

Steps to Reproduce

1.Build sample multiserver2.js and flash it to Arduino 101. 2.Connect to BLE, install and launch iot-rest-api-server 3.Run ./oic-get /res?rt=oic.r.temperature to get temperature resource.

  1. After temperature is found, execute ./oic-get /res?rt=oic.r.temperature to get temperature again.

Actual Result

No resources can be found anymore except the first time. The following are commands output on terminal.

selection_013

The following are port( run minicom -D /dev/ttyUSB0) return. selection_010

Expected Result

Resource can always be found.

Test Build

Branch Commit id Target Device Test Date Result
master cbe7e8f Arduino 101 Sep 28, 2017 Fail
xiaoyu3x commented 7 years ago

Sometimes, resource can't be retrieved at all, this occurs especially if flash multiserver.js into 101 board.

jimmy-huang commented 6 years ago

This is a ram issue with a101 with BLE and OCF enabled, it's only stable to run 1 or 2 sensors registered, anything with 3 or more sensors will be unstable.

jimmy-huang commented 6 years ago

This is related to RAM issue on the Arduino101, is this reproducible on the 96b_carbon?

xiaoyu3x commented 6 years ago

hello, @jimmy-huang I can't build OCF relative image successfully with 96_carbon. Build command: make BOARD=96b_carbon JS=**ocf**.js Result: selection_034

Does 96b_carbon support OCF? Is it a issue about 96b_carbon?

jimmy-huang commented 6 years ago

@xiaoyu3x Is this reproducible on k64f? We can't test on 96b_carbon because we don't have the tool to flash the bluetooth firmware over that board.

jimmy-huang commented 6 years ago

@xiaoyu3x Can you retest this with #1785, and using make JS=multiserver2.js ROM=260? multiserver2.js doesn't require ARC image, so you can bump up the size even further to get around the size problem.

xiaoyu3x commented 6 years ago

@jimmy-huang This issue isn't reproduced when using make ROM=256 JS=multiserver2.js with #1785 on A101. K64f doesn't support PWM, so can not use it to verify this issue.

xiaoyu3x commented 6 years ago

This issue isn't reproduced, so closed it.