Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add lwm2m deviceshifu design #878

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

rhoninl
Copy link
Collaborator

@rhoninl rhoninl commented Apr 17, 2024

What this PR does / why we need it:
lwM2M deviceShifu design doc
Will this PR make the community happier?
yes
Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

How is this PR tested

  • unit test
  • e2e test
  • other (please specify)
    documentation no need test
    Special notes for your reviewer:

Release note:

- add lwM2M deviceShifu design doc

Copy link
Contributor

@tomqin93 tomqin93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rhoninl added some comments, please include an architecture diagram too

docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved
docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved
docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved
docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved
docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved
docs/design/deviceshifu/design-deviceShifu-lwm2m.md Outdated Show resolved Hide resolved

The `deviceShifu-lwM2M` will represent each lwM2M object as an instruction that can be accessed through a RESTful API. The API will use the POST method for write operations and the GET method for read operations. The supported data formats for lwM2M v1.0 are TLV, JSON, Plain text, and Opaque.

deviceShifu-lwM2M's lwM2M server will handle Register, Update, De-register, Read, Write, Observe and Notify.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean external LwM2M server? Like mosquitto broker for MQTT. Not part of deviceShifu

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is a part of deviceShifu, for devices are LwM2M client and deviceShifu is server which device can connect to us

- normal mode: just like the other deviceshifu, when call the instruction, deviceShifu will send Read or Write Request to deviceShifu and return response
- observe mode: this mode will set the min and max notify time, then device will notify data when data changed or timeout. deviceShifu will record data, and return the data store in the memory cache when call the instruction. and this kind of mode also support read and write operation.

deviceShifu will host a lwM2M server and listen on udp 3683(lwM2M default port) and http server(deviceshifu) on 8080.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so we will deploy one LwM2M server for each device?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes deviceshifu-LwM2M will have both http server and LwM2M server as well

@rhoninl rhoninl requested a review from tomqin93 April 19, 2024 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants