0

 Coap Server ScreenShot

On the left side,I have LightRGB and ı can get the LightRGB payload with Client get request.I have ChangeColor as LightRGB child unfortunately but I can't get the ChangeColor payload.Payload is a xml output as you can see on the right side of the photo

How Can I get the ChangeColor payload with Python Client request.Please help me.

Burak Deniz
  • 55
  • 1
  • 6

1 Answers1

0

If you are adding the ChangeColor resource as a child resource of LightRGB; In CoAP, a child resource cannot access the parent Request handlers (ex: GET) unless you allow it. I actually have low experience in CoAPthon as I have only worked with CoAP java implementation (californium). In californium there is a way you can use the GET handler of a parent resource also in the child resource.

public void handleGET(CoapExchange exchange) //This is the child resouce GET handler
{
     this.getParent().handleRequest(exchange); //This line calls the original parent resource request handler.
}

Hope you can find a similar solution to address this matter with Python.

DragNa
  • 31
  • 5