Notifications
Clear all

[Solved] ACK


Meric
(@meric)
Trusted Member
Joined: 1 year ago
Posts: 55
Topic starter  

Hi Milad, 

The ACK boolean of the function is true if the acknoledgement message contain :

- the right address

- the right command

right ? 

=> As far as the CRC is not implemented yet, you cannot be sure about the message integrity : Isn't it safer to test the whole returned value ?


//set direction
{addr,WriteDirection,
0x00,0x00,0x00,0x01}; //read direction {addr,WriteDirection,0x00,0x00,0x00,0x00};
//test ack message
addr = addr
WriteDirection = WriteDirection
return ("yep, direction is OK, let's go for full power!");

 

This topic was modified 8 months ago 2 times by Meric

Quote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 229
 

Hi @meric,

Posted by: @meric

right ? 

Yes, When you WRITE something on SOLO, the ACK is the full Echo-back of what you have sent, so the DATA part is exactly the same, but When you want to READ something, the DATA part of the Request and Answer can be different, so you can't really compare the full packet.

The initiator, the Ending, the device address, and the Command Code are those parameters that are currently being checked and are identical in both Writing and Readings with respect to the ACK coming after. In near future, we will add the CRC, but in general, by those 4 checks I've mentioned there will be a very low chance of receiving faulty packets.

Posted by: @meric

//set direction
{addr,WriteDirection,
0x00,0x00,0x00,0x01}; //read direction {addr,WriteDirection,0x00,0x00,0x00,0x00};
//test ack message
addr = addr
WriteDirection = WriteDirection
return ("yep, direction is OK, let's go for full power!");

yes, this is also a better method, we actually have a plan to integrate a similar approach to this in future library development, by checking the parameters before and after writing, to make sure no parameter is double-written if it's already set.

But even now, after each Read / Write the full ACK is being checked and in any case, we are trying to make sure all the packets are safely seen by SOLO and also Arduino.

I will remain available.

Regards
Milad

 

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Meric
(@meric)
Trusted Member
Joined: 1 year ago
Posts: 55
Topic starter  

@milad OK, I experience too much issues with UART so I'm probably too freaky on the subject ? 

Indeed, really nice lib ? 

 


ReplyQuote
SOLO Team
(@milad)
Chief Member Moderator
Joined: 2 years ago
Posts: 229
 

Thanks @meric, Yes UART can get tricky especially if the hardware setups like the baud rates are not matching, but normally once it's matched, it works in a good way.

If you found the answers helpful and you could solve your problems, please kindly verify here to help others in the future.


ReplyQuote
Share: