Skip to content

unicast message received as broadcast message #12

@M1rk0

Description

@M1rk0

Hello Florian, thanks for your work on this nice project.
I am getting some issues with unicast messages, sending messages like this:

MY_NODE_ID = 0x3;
ASB_BRIDGE_NODE_ID = 0x1;
bool sendTemp() {
    float temperature;
    ds18b20Sensors.requestTemperatures();
    temperature = ds18b20Sensors.getTempCByIndex(0);
    int firstTempPart = temperature;
    temperature -= firstTempPart;
    int secondTempPart = temperature * 10;
    Serial.println(firstTempPart);
    Serial.println(secondTempPart);
    const unsigned int targetAdress = ASB_BRIDGE_NODE_ID;
    const char tempPort = 0x10;
    const byte tempData[3] = {ASB_CMD_S_TEMP, firstTempPart, secondTempPart};
    const byte tempState = asb0.asbSend(ASB_PKGTYPE_UNICAST, targetAdress, tempPort, sizeof(tempData), tempData);
    return (tempState == 0);
}

and receiving them like this:

Type: 0x0
Target: 0x1
Source: 0x3
Port: 0xFFFFFFFF
Length: 0x3
  0xA0 0x1A 0x3

I am wondering, why it is not Type: 0x2 and Port: 0x10. My goal is, to get different Temperatures from one Node and use different ports for that.

I would appreciate If you have a hint for me solving this. Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions