Onus Posted August 23, 2016 Share Posted August 23, 2016 Hi all.. I recently purchased both a yard stick and a RTL SDR. I was going to start writing my own python script that allowed me to quickly input which SDR device to turn on, what frequency to cooperate at and what mode. My first question is around setting the index of devices.. how can I get a list of SDR devices plugged in and their index? My other question is what are the accepted constants for setting the modulation type with rfcat Onus Quote Link to comment Share on other sites More sharing options...
Guest Josef K Posted August 23, 2016 Share Posted August 23, 2016 You can see a list of attached devices with 'lsusb.' If you use the '-v' option, you can quickly find the device you're looking for. E.g.: lsusb -v <..> Bus 001 Device 009: ID 1d50:605b OpenMoko, Inc. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 1.10 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x1d50 OpenMoko, Inc. idProduct 0x605b bcdDevice 1.00 iManufacturer 1 etsat Scott Gadgets꙾> iProduct 2 YARD Stick One iSerial 3 0000 However, it is probably easier to create symlinks in /dev with udev. Below is the config that I am using. /etc/udev/rules.d$ cat 20-rfcat.rules # legacy RfCats and cc1111usb SUBSYSTEMS=="usb" ATTRS{idVendor}=="0451" ATTRS{idProduct}=="4715" MODE:="0660" SYMLINK+="RFCAT%n", GROUP="dialout" # modern RfCats SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6047" MODE:="0660" SYMLINK+="RFCAT%n", GROUP="dialout" SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6048" MODE:="0660" SYMLINK+="RFCAT%n", GROUP="dialout" SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="605b" MODE:="0660" SYMLINK+="RFCAT%n", GROUP="dialout" # RfCat bootloader subsystem (uses it's own product id) SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="6049" SYMLINK+="RFCAT_BL_C" ENV{ID_MM_DEVICE_IGNORE}="1" SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="604a" SYMLINK+="RFCAT_BL_D" ENV{ID_MM_DEVICE_IGNORE}="1" SUBSYSTEMS=="usb" ATTRS{idVendor}=="1d50" ATTRS{idProduct}=="605c" SYMLINK+="RFCAT_BL_YS1" ENV{ID_MM_DEVICE_IGNORE}="1" /etc/udev/rules.d$ cat 52-hackrf.rules ATTR{idVendor}=="1d50", ATTR{idProduct}=="604b", SYMLINK+="hackrf-jawbreaker-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1d50", ATTR{idProduct}=="6089", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1d50", ATTR{idProduct}=="cc15", SYMLINK+="hackrf-one-%k", MODE="660", GROUP="plugdev" ATTR{idVendor}=="1fc9", ATTR{idProduct}=="000c", SYMLINK+="hackrf-dfu-%k", MODE="660", GROUP="plugdev" There are a couple of ways to find out the modulation types or other settings. - You can find the modulation types in chapter 13.9 of the TI datasheet at http://www.ti.com/lit/ds/symlink/cc1110-cc1111.pdf I recommend that you browse thru the whole datasheet. It can be a bit overwhelming at first, but all the stuff you need to know is in there. RFCat uses the register names from the datasheet. (That's why deviation is written as 'deviatn' - If you have Windows, you can also install SmartRF Studio (http://www.ti.com/tool/smartrftm-studio) - All Chipcon register settings are in one single file in rfcat too. See rflib/chipcon_nic.py : """ MODULATIONS Note that MSK is only supported for data rates above 26 kBaud and GFSK, ASK , and OOK is only supported for data rate up until 250 kBaud. MSK cannot be used if Manchester encoding/decoding is enabled. """ MOD_2FSK = 0x00 MOD_GFSK = 0x10 MOD_ASK_OOK = 0x30 MOD_MSK = 0x70 MANCHESTER = 0x08 MODULATIONS = { MOD_2FSK : "2FSK", MOD_GFSK : "GFSK", MOD_ASK_OOK : "ASK/OOK", MOD_MSK : "MSK", MOD_2FSK | MANCHESTER : "2FSK/Manchester encoding", MOD_GFSK | MANCHESTER : "GFSK/Manchester encoding", MOD_ASK_OOK | MANCHESTER : "ASK/OOK/Manchester encoding", MOD_MSK | MANCHESTER : "MSK/Manchester encoding", -Paul. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.