9,171 views
4 votes
4 votes

i am understanding Character stuffing from an online resource !! 

It says " 

sing the special character of <DEL> and <STX> and <ETX> for start/end framing, the message: 

AB<DEL>C<STX><ETX>DE 

would be sent as (stuffed characters are underlined):

<STX>AB<DEL><DEL>C<DEL><STX><DEL><ETX>DE<ETX>...<STX>


but they state that the problem with this method is 

" We can't use this method in situation like this when message is 

<DEL><STX>A<DEL><ETX> 



why we can't do that ?? 

converting this <DEL><STX>A<DEL><ETX> to our codeword will give output something like this 

<STX><DEL><DEL><DEL><STX>A<DEL><DEL><DEL><ETX><ETX> 

where receiver will loose the sync ??

1 Answer

1 votes
1 votes

Character stuffing

Same idea as bit-stuffing, but operates on bytes instead of bits.

Use reserved characters to indicate the start and end of a frame. For instance, use the two-character sequence DLE STX (Data-Link Escape, Start of TeXt) to signal the beginning of a frame, and the sequence DLE ETX (End of TeXt) to flag the frame's end.

Problem: What happens if the two-character sequence DLE ETX happens to appear in the frame itself?

Solution: Use character stuffing; within the frame, replace every occurrence of DLE with the two-character sequence DLE DLE. The receiver reverses the processes, replacing every occurrence of DLE DLE with a single DLE.

Example: If the frame contained ``A B DLE D E DLE'', the characters transmitted over the channel would be ``DLE STX A B DLE DLE D E DLE DLE DLE ETX''.

Disadvantage: character is the smallest unit that can be operated on; not all architectures are byte oriented.

Related questions

3 votes
3 votes
2 answers
1
Hirak asked May 8, 2019
2,014 views
End delimeter is → 0111data to be sent 0111111111.What is the data we should send to the reciever?
1 votes
1 votes
2 answers
2
Lone Wolf asked Aug 13, 2018
1,119 views
A message M = 11111111 after bit stuffing with End delimeter as 111 will be sent as____________?
0 votes
0 votes
0 answers
4
atul_21 asked Oct 2, 2017
257 views
Answer given is 4 . . How???