Skip to content

Total error while processing the frame and response #10

@mati294

Description

@mati294

Hello, I'm trying to run the library on an STM32C0 and I'm unable to receive the correct data or send a response message.
To rule out DMA or HAART issues, I'm manually sending the frame.

mbus_poll(modbus, frame_by_bit);

The register address is correct, but the value is always 96, regardless of what I send.

Using the added ctx->header.data, I'm checking the values ​​ctx->conf.recvbuf[2 * (ctx->header.num - ctx->header.rnum)] = byte; this is fine.
And here, 0 and 2 appear
[2 * (ctx->header.num - ctx->header.rnum)]

When I try to send response this is activates:
if (ctx->conf.send == 0 || pbuf == 0 || ctx->conf.sendbuf_sz < (size + 2))
return MBUS_ERROR;

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