Gr-ais: bit unstuffing bug?

Hi all, Nick,

In gr-ais. the bit un-stuffing is done before the de-framing, shouldn’t
it be done after instead?

Chris


Christian G.,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/

You can do it either way since unstuffing will never generate a valid
HDLC
framing code (“01111110”). Unstuffing before the deframing correlators
means my tags’ sample numbers don’t have to be modified for the bits
inserted by the unstuffing operation.

–n

On 10/08/12 19:55, Nick F. wrote:

You can do it either way since unstuffing will never generate a valid
HDLC framing code (“01111110”). Unstuffing before the deframing

For what i understand, bit stuffing never generates framing code (that’s
the whole point), but the bit unstuffing can and will if the payload
contains itself a byte which as the same value as the framing code.

Actually, while dumping data from ais_parse.cc, I found that gr-ais
unstuffing code do generate framing codes. that has fooled
get_tags_in_range (a stop was found because the AIS payload had a
01111110 in it).
Well, I think I found, I’m still scratching my head…

correlators means my tags’ sample numbers don’t have to be modified for
the bits inserted by the unstuffing operation.

Yes, I see the point. But you could unstuff inline, in place of the
memcpy, just before calling parse().

Chris

Ireland
Tel: + 353 (0) 1 236 5990 <tel:%2B%20353%20%280%29%201%20236%205990>
Web: http://www.techworks.ie/

_________________________________________________
Discuss-gnuradio mailing list
[email protected] <mailto:[email protected]>
https://lists.gnu.org/mailman/__listinfo/discuss-gnuradio
<https://lists.gnu.org/mailman/listinfo/discuss-gnuradio>


Christian G.,
Embedded systems engineer.
Techworks Marine
1 Harbour road
Dun Laoghaire
Co. Dublin
Ireland
Tel: + 353 (0) 1 236 5990
Web: http://www.techworks.ie/

Hmm, you might be right about that. I’ll take another look.

–n

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs