[BitCloud] ZDP Requests from app endpoint

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

hi,

i'm try to do a ZDP IEEE_Addr_req with a plain APS_DataReq_t not using the BitCloud ZDO_ZdpReq_t (the reason for this is the request data comes from PC and i just want to forward it into a APS request)

The problem is i got no APS_DataConf callback and it seems that memory gets overwritten wildly.

I'm using the following request data (BitCloud 1.10):

static asdu[MAX_ASDU_SIZE];

req.dstAddrMode = 0x02; // short addr mode
req.dstAddress.shortAddress = 0x0000;
req.dstEndopint = 0x00; // ZDO endpoint
req.profileID = 0x0000; // ZDP profile
req.clusterID = 0x0001; // IEEE_Addr_req
req.srcEndpoint = 0xE0; // my app endpoint (simple descriptor exits)
req.asduLength = 5;
req.asdu = asdu;  // asdu is { 0x12, 0x00, 0x00, 0x00, 0x00 }
req.txOptions = all 0;
req.radius = 5;
req.APS_DataConf = appApsDataConf; // gets never called?!

any ideas whats going on here?

Last Edited: Fri. Oct 16, 2015 - 02:31 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

is this line correct?

req.txOptions = all 0;

should it be just

req.txOptions = all;

or

req.txOptions = 0;

phil

_________________________________

www.proficnc.com
_________________________________
Go Aussie Go!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

:-) it just means that each field in the req.txOptions is set to 0.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

but shouldn't you define all=0 somewhere else?

_________________________________

www.proficnc.com
_________________________________
Go Aussie Go!!!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

1. You are forgetting header and footer in the asdu (look at any application how application payload buffer is defined).

2. It won't work because response will be processed by the stack and will be just ignored since there were no corresponding request.

NOTE: I no longer actively read this forum. Please ask your question on www.eevblog.com/forum if you want my answer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oops yes header and footer was missing for the message I fixed that now.

Ah ok I understand, I hoped this was just the case for srcEndpoint == 0x00. So this seems to be wired to ZDP ProfileId.

For ZCL endpoints APS data indication I could hook in a wrapper for the callback I guess this wont be possible for ZDO/ZDP.