Error using

I am working on and and I am trying to embed a
fixed sequence in the payload part of my packet. However, when i try to
receive the data using rx_voice, i get an error saying

terminate called after throwing an instance of ‘std::runtime_error’
what(): msg length is not a multiple of d_itemsize
Aborted (core dumped)

I have added only one line in make_packet in and it
looks like this:(just the important lines as i thought)

def make_packet(payload, samples_per_symbol, bits_per_symbol,
access_code=default_access_code, pad_for_usrp=True):

(packed_access_code, padded) = 

(packed_preamble, ignore) =
payload = packed_preamble + payload
payload_with_crc = gru.gen_and_append_crc32(payload)
pkt = ‘’.join((packed_access_code, make_header(L),
whiten(payload_with_crc), ‘\x55’))

if pad_for_usrp:
    pkt = pkt + (_npadding_bytes(len(pkt), samples_per_symbol, 

bits_per_symbol) * ‘\x55’)

return pkt

Can anyone please explain how to remove this error. I want to add fixed
sequence so that it helps in calculation of BER.

Pratik Hetamsaria

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