i know you don't like lazy A** who don't search but i've been searching and getting confused by the minute .
this community has been helpful and i hope you could help me again , so a quick recall .
i'm doing a graduation project where there are Multi AVRs (sub nodes) communicating to a Raspberry pi (main node ) you can think of it as a star Topology .
based on alot of discussions i decided to use RS-485 network using MAX488 chip full duplex communication .
this is a home automation IoT project ,for the purpose of the project i made a model " maquette " to simulate home rooms or offices in a company , the same goal to control light and get temp readings and all these stuff .
pi working as the brain , DB server & web server & Micro controller at the same time , getting requests from a mob App to get readings (temp) or to give an order ( FAN or Light ).
AVRs are the muscles here they execute orders or send readings temp .
so a moderator here suggested the RS-485 and SNAP protocol , SNAP was simple and easy but there is something not clear here ,
i don't seem to find a clear way or i'm missing something about PACKET error detection and correction .
i know that there is checksum or CRC method for error detection , but lets say a packet gest lost or error occurred during the transmission of the destination address byte . how to detect that and what is the re-transmission protocol here ???
also i've come across MODBUS protocol and when i Googled it i found that there are many protocols RTU,ASCII ,etc ?
what i had in mind that whenever a packet is transmitted a timer ticks and wait for an ACK if it doesn't appear within time it gets re-transmitted again .
but i'm afraid of latency so there are to ways i re transmit three times only and if no ack received this means Fault in the bus OR
to continuously re transmit until an ACK is received .
so if you have in mind a protocol that prevents packet loss & guarantees low latency i'd appreciate it .
the protocol will be on both AVR and the PI
note that i can finish this project in 3 days but i'm aiming for quality here and the communication process is what i'm building my whole project upon . features come later .
thanks for your patience . :) appreciate your help .