folg / killerbee

Automatically exported from code.google.com/p/killerbee
0 stars 0 forks source link

Device Enumeration Support in OpenBSD #9

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. OpenBSD 4.8
2. Try running sudo zbid or equivalent functionality

What is the expected output? What do you see instead?
kbutils is not properly enumerating at least TelosB devices. This is likely 
based on the glob regex not matching the USB devices in /dev/. Consider 
handling these as proper USB devices, or fixing the glob expression.

$ sudo usbdevs -dv    
...
Controller /dev/usb5:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), 
Intel(0x8086), rev 1.00
  uhub5
 port 1 powered
 port 2 addr 2: full speed, power 100 mA, config 1, tmote sky(0x6001), Moteiv(0x0403), rev 4.00, iSerialNumber M4A6H5T7
   uftdi0
...

$ sudo zbid
Dev     Product String  Serial Number
Found 0 devices.

Original issue reported on code.google.com by rmspe...@gmail.com on 21 Feb 2012 at 12:06

GoogleCodeExporter commented 9 years ago
Initial changes in OpenBSD 4.8 to support glob on "/dev/usb*" seem to have 
issues when actually attaching to the device inside the currently included 
GoodFET libraries. More troubleshooting needed:

Traceback (most recent call last):
  File "/usr/local/bin/zbid", line 12, in <module>
    show_dev()
  File "/usr/local/bin/zbid", line 5, in show_dev
    kbdev_info = kbutils.devlist()
  File "/usr/local/lib/python2.6/site-packages/killerbee/kbutils.py", line 87, in devlist
    elif (isgoodfetccspi(serialdev)):
  File "/usr/local/lib/python2.6/site-packages/killerbee/kbutils.py", line 113, in isgoodfetccspi
    gf.serInit(port=serialdev, attemptlimit=2)
  File "/usr/local/lib/python2.6/site-packages/killerbee/GoodFET.py", line 120, in serInit
    timeout=timeout
  File "/usr/local/lib/python2.6/site-packages/pyserial-2.6-py2.6.egg/serial/serialutil.py", line 261, in __init__
    self.open()
  File "/usr/local/lib/python2.6/site-packages/pyserial-2.6-py2.6.egg/serial/serialposix.py", line 282, in open
    self._reconfigurePort()
  File "/usr/local/lib/python2.6/site-packages/pyserial-2.6-py2.6.egg/serial/serialposix.py", line 311, in _reconfigurePort
    raise SerialException("Could not configure port: %s" % msg)
serial.serialutil.SerialException: Could not configure port: (22, 'Invalid 
argument')

Original comment by rmspe...@gmail.com on 21 Feb 2012 at 12:34

GoogleCodeExporter commented 9 years ago
Note: suggest troubleshooting Tmote directly with GoodFET client first, with 
up-to-date firmware and client. Ex, it currently doesn't seem to be working 
that way either, so rule that out before KillerBee considered an issue:
% ./goodfet.monitor info
Resyncing.
Resyncing.
...

Original comment by rmspe...@gmail.com on 21 Feb 2012 at 12:39