Skip to content
This repository was archived by the owner on Apr 12, 2026. It is now read-only.
This repository was archived by the owner on Apr 12, 2026. It is now read-only.

TagFuse/tagtlv/gps_struct: unpack error #8

Description

@cire831

TIB5: cire831/mm@2049390
TagFuse: danome/TagNet@d0187a1

Running continuous stream against TIB 5:

Fuse side:

read p/l:17971772/44
*** 33828 sparsefile, cur/max number of blocks: 5/5, max block size: 635536
DEBUG:fuse.log-mixin:<- read '\x00\x00\x00\x00\x01\x00\x00\x00\xa0\xa2\x00\x1a]\x12\x03\x07\x82\x14\x07\xcd\x07\x0f\x00\x01_\x18\x00\x00\x00C\x00\x16\x8czk\x00\x00\x00\x04;\xb0\xb3\x00\x00'
DEBUG:fuse.log-mixin:-> read /1fbcd99fd29f/tag/sd/0/dblk/byte (20L, 17971816L, <fuse.fuse_file_info object at 0x75ddae40>)
read p/l:17971816/20
*** 33829 sparsefile, cur/max number of blocks: 5/5, max block size: 635536
DEBUG:fuse.log-mixin:<- read "'\x00 \x00\x84\x15\x04\x00\x17B\x0e\r\x15\x04\x14\x04\xe2\x07\x83\x05"
DEBUG:fuse.log-mixin:-> read /1fbcd99fd29f/tag/sd/0/dblk/byte (20L, 17971836L, <fuse.fuse_file_info object at 0x75ddaee0>)
DEBUG:fuse.log-mixin:<- read '[Unhandled Exception]'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 495, in _wrapper
    return func(*args, **kwargs) or 0
  File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 583, in read
    offset, fh)
  File "/usr/local/lib/python2.7/dist-packages/fuse.py", line 972, in __call__
    ret = getattr(self, op)(path, *args)
  File "tagfuse/tagfuse.py", line 188, in read
    return (str(handler.read(path_list, size, offset)))
  File "tagfuse/taghandlers.py", line 322, in read
    size, offset)
  File "tagfuse/radiofile.py", line 63, in file_get_bytes
    err, payload = msg_exchange(radio, req_msg)
  File "tagfuse/radioutils.py", line 200, in msg_exchange
    rsp = TagMessage(bytearray(rsp_buf))
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagmessages.py", line 88, in __init__
    self.parse(args[0])
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagmessages.py", line 175, in parse
    self.name = TagName(v[hdr_size:self.header.name_length+hdr_size])
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagnames.py", line 23, in __init__
    super(TagName,self).__init__(*args, **kwargs)
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagtlv.py", line 176, in __init__
    self.parse(args[0])
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagtlv.py", line 225, in parse
    self.append(TagTlv(fb[x:x+y]))
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagtlv.py", line 577, in __init__
    self.mytlv = _Tlv(t)
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagtlv.py", line 315, in __init__
    if (self._build_value(t) is not None):
  File "/home/pi/tag/Tagnet/tagfuse/../tagnet/tagnet/tagtlv.py", line 504, in _build_value
    if (t == tlv_types.GPS):       return list(gps_struct.unpack(v))
error: unpack requires a string argument of length 12
DEBUG:fuse.log-mixin:-> flush /1fbcd99fd29f/tag/sd/0/dblk/byte (<fuse.fuse_file_info object at 0x75ddae90>,)
*** sparse IO flush [u'<node_id:1fbcd99fd29f>', u'tag', u'sd', u'0', u'dblk', u'byte']
DEBUG:fuse.log-mixin:<- flush 0
DEBUG:fuse.log-mixin:-> release /1fbcd99fd29f/tag/sd/0/dblk/byte (<fuse.fuse_file_info object at 0x75ddae90>,)
** tag release
DEBUG:fuse.log-mixin:<- release 0

And on the tag side:

--- @17971480 267649 219037306  224    32  GPS_RAW -- MID:   4     (04) <rx> NavTrack
--- @17971704 267650 219038071   45    32  GPS_RAW -- MID:   9     (09) <rx> cpu thruput
--- @17971752 267651 219038125   62    32  GPS_RAW -- MID:  93/18  (5d) <rx> TCXO learning
*** TF.read: unhandled OSError exception <type 'exceptions.OSError'>
Traceback (most recent call last):
  File "/usr/local/bin/tagdump", line 11, in <module>
    load_entry_point('tagdump==0.3.0.dev3', 'console_scripts', 'tagdump')()
  File "/usr/local/lib/python2.7/dist-packages/tagdump-0.3.0.dev3-py2.7.egg/tagdump/__main__.py", line 10, in main
    dump(parseargs())
  File "/usr/local/lib/python2.7/dist-packages/tagdump-0.3.0.dev3-py2.7.egg/tagdump/tagdump.py", line 547, in dump
    rec_offset, hdr, rec_buf = get_record(infile)
  File "/usr/local/lib/python2.7/dist-packages/tagdump-0.3.0.dev3-py2.7.egg/tagdump/tagdump.py", line 413, in get_record
    rec_buf.extend(bytearray(fd.read(dlen)))
  File "/usr/local/lib/python2.7/dist-packages/tagdump-0.3.0.dev3-py2.7.egg/tagdump/tagfile.py", line 57, in read
    new = os.read(self.fileno, cnt - len(buf))
OSError: [Errno 14] Bad address

when I restart with: tagdump --tail -j 17971480 byte

it fires up fine.

P222 (110): tagdump --tail -j 17971480 byte
--- offset  recnum       rt  len  type  name
--- @17971480 267649 219037306  224    32  GPS_RAW -- MID:   4     (04) <rx> NavTrack
--- @17971704 267650 219038071   45    32  GPS_RAW -- MID:   9     (09) <rx> cpu thruput
--- @17971752 267651 219038125   62    32  GPS_RAW -- MID:  93/18  (5d) <rx> TCXO learning
--- @17971816 267652 219038231   39    32  GPS_RAW -- MID:  51/1   (33) <rx> unk_51
--- @17971856 267653 219038265   40    32  GPS_RAW -- MID:  65/192 (41) <rx> gpio
--- @17971896 267654 219102567  127    32  GPS_RAW -- MID:  41     (29) <rx> GeoData   L  (6)
--- @17972024 267655 219102875   40     4  EVENT  GPS_SATS_41 6 0 516 0
--- @17972064 267656 219102880   40     4  EVENT  GPS_TIME 132252692 5386 23000 0
--- @17972104 267657 219102884   40     4  EVENT  GPS_GEO 370762097 3075047160 1997 508238000
--- @17972144 267658 219102888   40     4  EVENT  GPS_AWAKE_S 41 4 0 0
--- @17972184 267659 219103489   77    32  GPS_RAW -- MID:   2     (02) <rx> NavData  (6)
--- @17972264 267660 219103638   40     4  EVENT  GPS_SATS_2 6 4 0 0
--- @17972304 267661 219103643   40     4  EVENT  GPS_XYZ 6 4292267925 4290646060 3824270
--- @17972344 267662 219103647   40     4  EVENT  GPS_AWAKE_S 2 4 0 0
--- @17972384 267663 219103642   45    32  GPS_RAW -- MID:   9     (09) <rx> cpu thruput
--- @17972432 267664 219103695   62    32  GPS_RAW -- MID:  93/18  (5d) <rx> TCXO learning
--- @17972496 267665 219103801   39    32  GPS_RAW -- MID:  51/1   (33) <rx> unk_51
--- @17972536 267666 219103835   40    32  GPS_RAW -- MID:  65/192 (41) <rx> gpio
--- @17972576 267667 219168137  127    32  GPS_RAW -- MID:  41     (29) <rx> GeoData   L  (6)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions