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

Unable to create a registration resource #163

Open
Vulcainreo opened this issue Aug 11, 2020 · 0 comments
Open

Unable to create a registration resource #163

Vulcainreo opened this issue Aug 11, 2020 · 0 comments

Comments

@Vulcainreo
Copy link

Hello,
I expected an issue during creation of a registration resource.

This example code doesn't working (method not allowed):

print "Create a registration resource"
path = "rd?ep=node1&con=coap://local-proxy-old.example.com:5683&et=oic.d.sensor"
ct = {'content_type': defines.Content_types["application/link-format"]}
payload = '</sensors/temp>;ct=41;rt="temperature-c";if="sensor";anchor="coap://spurious.example.com:5683",' \
              '</sensors/light>;ct=41;rt="light-lux";if="sensor"'
response = client.post(path, payload, None, None, **ct)
location_path = response.location_path
print response.pretty_print()

About running instance :
python coapserver.py is started
python resourcedirectoryserver.py is also started
mongodb is also accessible by changing the coapthon/define.py file (remote host without password)

During execution of the code, I expected this error:

Create a registration resource
Source: ('127.0.0.1', 5683)
Destination: None
Type: ACK
MID: 50745
Code: METHOD_NOT_ALLOWED
Token: NM
Payload: 
None

Can you help me, I think I miss something during the coapserver + ressource directory launch ?
Thank you in advance.

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

No branches or pull requests

1 participant