arduino - AX.25 protocol interfering with sending data packet -


i sorry not able provide code question more of logical situation. termination sequence ax.25 protocol "111111" 6 1s. if sequence of 1s found inside data packet, denote end of packet file , send without correctly sending rest of packet. best explain conclusions , test results such can understand dilemma.

***programming in arduino******

byte 1 contains 8 bits. below , attempt picture byte in rectangular box. right next byte 2 contains 8 bits. situation 1:

||_1_0_1_1_1_0_1_0_ ||_1_1_1_1_1_1_0_0_||

attempted solution 1: change 1 0 , keep track of it.

situation 2:

||_1_0_1_1_1_0_1_1_ ||_1_1_1_1_0_0_1_0_||

attempted solution 2: attempted solution 1 breaks apart. , stuck here.

individually bytes safe activating ax.25 termination sequence combined bytes results in problem.

here list of possible cases:

1) 6 1s = termination sequence activated end of packet

2) 6 1s inside actual data of packet = premature termination

3) if 1s changed 0s sequence of 6 0s can problem in reverting changes back

4) can read 1 byte @ time (eeprom) due memory limitations

5) if 6 1s occur between 2 bytes prematurely activate termination sequence.

thank in advance kind of help.

the solution mandated ax.25 protocol bit stuffing.

conceptually, time receiver sees 5 sequential 1 bits , 0 bit, assumes 0 bit has been stuffed sender (to break erroneous frame sequences in data), , removes before emitting received data. sequence of 6 1-bits can have been sent un-stuffed framing sequence; data have been sent stuffed. receiver must de-stuff.

to stuff or unstuff require couple of bytes of working ram (or couple of bytes of registers), although there might creative ways around that.

to quote official tapr protocol standard:

"in order ensure flag bit sequence mentioned above not appear accidentally anywhere else in frame, sending station monitors bit sequence group of 5 or more contiguous “1” bits. time 5 contiguous “1” bits sent, sending station inserts “0” bit after fifth “1” bit. during frame reception, time 5 contiguous “1” bits received, “0” bit following 5 “1” bits discarded."

a google search ax.25 bit stuffing should return detail might need.


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -