Linux Quick Start

Djamil Elaidi edited this page Jan 10, 2018 · 10 revisions

The following guidelines have been tested with Ubuntu 16.04 LTS on a physical machine. We didn't test it on an Ubuntu image on a virtual machine running on Windows.

Be sure to check also the Youtube video PandwaRF Demo: Connect to a Linux Computer Using USB

Download PandwaRF custom RfCat version

To use RfCat with PandwaRF, you need to use our custom RfCat version.

Original RfCat SW can be found here (new GitHub repo). Warning, the original RfCat SW might not work with PandwaRF as we have different messages ID and new messages.

Enable USB on PandwaRF

Using PandwaRF Android application, connect to PandwaRF device in BLE. In BUS Service tab, make sure the Enable USB switch is in ON position.

Disconnect from BLE

Unplug then re-plug USB in

Check if PandwaRF is detected by Linux

Use lsusb to check if device is correcly enumerated:

djamil@ComThingsDjam2:~/PandwaRF/SW/rfcat$ lsusb   
Bus 002 Device 022: ID 1d50:60ff OpenMoko, Inc.
Bus 002 Device 021: ID 1a40:0801 Terminus Technology Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub

You shall see 1d50:60ff OpenMoko, Inc. somewhere. PID:60ff is for PandwaRF.

If you don't see OpenMoko, then try dmesg:

djamil@ComThingsDjam2:~/PandwaRF/SW/rfcat$ dmesg 
[9590773.957862] usb 2-1.6.4: new full-speed USB device number 32 using ehci-pci
[9590779.051822] usb 2-1.6.4: device descriptor read/64, error -110

If you see device descriptor read/64, error -110 then just reset the dongle while still connected to USB by pressing the PandwaRF reset button. This is an issue we will fix asap.

When everything works you should see:

djamil@ComThingsDjam2:~/PandwaRF/SW/rfcat$ dmesg
[598665.540135] usb 3-4.2: new full-speed USB device number 66 using xhci_hcd
[598665.641002] usb 3-4.2: not running at top speed; connect to a high speed hub
[598665.643624] usb 3-4.2: New USB device found, idVendor=1d50, idProduct=60ff
[598665.643637] usb 3-4.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[598665.643640] usb 3-4.2: Product: PandwaRF Dongle
[598665.643642] usb 3-4.2: Manufacturer: ComThings
[598665.643644] usb 3-4.2: SerialNumber: 1316</code>

Have fun with RfCat

I recommend to not use use the to install rfcat, since you may want to have multiple rfcat versions on your PC. Instead just run rfcat from the directory PandwaRF/SW/rfcat

RfCat in research mode

./rfcat -r

Here is what you should get:

djamil@ComThingsDjam2:~/PandwaRF/SW/rfcat$ ./rfcat -r
'RfCat, the greatest thing since Frequency Hopping! Modified version to run with PandwaRF'

Research Mode: enjoy the raw power of rflib

currently your environment has an object called "d" for dongle.  this is how 
you interact with the rfcat dongle:
    >>> d.setFreq(433000000)
    >>> d.setMdmModulation(MOD_ASK_OOK)
    >>> d.makePktFLEN(250)
    >>> d.RFxmit("HALLO")
    >>> d.RFrecv()
    >>> print d.reprRadioConfig()

RfCat Spectrum Analyser (SpecAn):

./rfcat -s -f 433e6 -c 25000 -n 51
./rfcat -s -f 868e6 -c 25000 -n 51

Want more RfCat commands for your PandwaRF

Check the Linux RfCat For PandwaRF page.

Possible errors

ImportError: No module named usb

If you get an error like:

> ./rfcat -r
Traceback (most recent call last):
  File "./rfcat", line 8, in <module>
    from rflib import *
  File "/home/djamil/ism/droids/bitbucket/omap_ism_trx/cc1111/rfcat/rflib/", line 2, in <module>
    from chipcon_nic import *
  File "/home/djamil/ism/droids/bitbucket/omap_ism_trx/cc1111/rfcat/rflib/", line 4, in <module>
    import usb
ImportError: No module named usb

You need to install PyUSB. PyUSB provides USB access on the Python language.

sudo apt-get install python-usb

ImportError: No module named numpy

If you want to use rfcat spectrum analyzer UI (rfcat -s or d.specan()), you will get an error

In [1]: d.specan(433e6,25000,51)
ImportError                               Traceback (most recent call last)
/home/djamil/cc1111/rfcat/rflib/__init__.pyc in <module>()
----> 1 d.specan(433e6,25000,51)

/home/djamil/cc1111/rfcat/rflib/__init__.pyc in specan(self, basefreq, inc, count)
     41         freq, delta = self._doSpecAn(basefreq, inc, count)
---> 43         import rflib.ccspecan as rfspecan
     44         if not hasattr(self, "_qt_app") or self._qt_app is None:
     45             self._qt_app = rfspecan.QtGui.QApplication([])

/home/djamil/cc1111/rfcat/rflib/ in <module>()
     22 import sys
     23 import time
---> 24 import numpy
     25 import threading
     26 import rflib

ImportError: No module named numpy

you need to install the SciPy Stack :

sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose

and PySide :

sudo apt-get install python-pyside.qtgui

More documentation

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.