Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
105 views
in Technique[技术] by (71.8m points)

android - Nordic SDK where to receive data?

I have started working with Nordic android SDK. And I have managed to make my sensors-devices subscribe and publish to group I have them assigned to. Problem is that my messages that I should receive in meshMessages doesn't contain enough data. From my device-sensor I have data sent in packed like code bellow.

{
    uint32_t srcMac4;
    uint8_t remoteTypeID;
    uint8_t opCode;
    uint8_t statusData[16];
} generic_onoff_status_msg_pkt_t;

I can read data in my meshMessages when I cast them to GenericOnOfStatus. Problem is that I'm receiving only 6 bytes and I should see more like 12 in one message.

How can I make my app receive more byte data in GenericOnOfStatus messages?

I have used Nordic app as guideline for me how to implement code so far. https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library

question from:https://stackoverflow.com/questions/65888426/nordic-sdk-where-to-receive-data

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have found solution. Problem is with Nordic SDK. They have problem's with their library at the moment. When we try to set unicast address in filter (White or Black listing) somehow it doesn't recognize it as unicast address and that makes app crash. Workaround at this moment until they have it patched is to switch to dev branch of library.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...