linux installation - digiltd/rfxcmd-restored-wiki GitHub Wiki

Introduction

Details how to install RFXcmd on Linux platform.

Tested on:

  • Debian 6 (i386)
  • Raspbian on Raspberry Pi
  • Python 2.7 (Does not work on Python 3)

Install Python-serial

To be able to communicate with the RFXCom the serial library needs to be installed.

$ apt-get install python-serial

Create directory for RFXcmd

You can freely choose the directory, it can be in user home directory or as in example in /opt

$ mkdir /opt/rfxcmd
$ cd /opt/rfxcmd

Download RFXcmd and unzip

Check the latest version on the download page, the example below might not be the latest.

$ wget http://rfxcmd.eu/?wpdmdl=112 -O rfxcmd.zip

This will download the RFXcmd v0.3-Alpha3 and save it as rfxcmd.zip. Unzip the files.

$ unzip rfxcmd.zip

Find the RFXcom device

Check your RFXcom that it is installed and visible in the usb printout with lsusb

$ lsusb

You should see a line with following data

ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC

This indicates that the RFXcom is available on the system.

There are probably many ways to find the device name, here is one that is at least working on Raspberry Pi running Raspbian.

Looking for the idVendor in dmesg printout will show the usb info

$ dmesg |grep idVendor=0403
[508669.109221] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
$

Then using the usb connector info 1-1.3 we can find which device it has connected to.

$ dmesg |grep '1-1.3'
[508668.984325] usb 1-1.3: new full-speed USB device number 4 using dwc_otg
[508669.109221] usb 1-1.3: New USB device found, idVendor=0403, idProduct=6001
[508669.109258] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[508669.109273] usb 1-1.3: Product: RFXtrx433
[508669.109287] usb 1-1.3: Manufacturer: RFXCOM
[508669.109300] usb 1-1.3: SerialNumber: 03VHG0NE
[508669.198095] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[508669.198639] usb 1-1.3: Detected FT232RL
[508669.198670] usb 1-1.3: Number of endpoints 2
[508669.198688] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[508669.198704] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[508669.198718] usb 1-1.3: Setting MaxPacketSize 64
[508669.200145] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB0
$

And at the end of the printout we can see that it is attached to the ttyUSB0. To make it statically always connected to the same device (in case additional USB devices are connected) the UDEV needs to be used.

Ready to run

If the RFXCom device is on /dev/ttyUSB0, then you can easily test that it is working with following command that will show the status of the RFXCom device.

$ ./rfxcmd.py -d /dev/ttyUSB0 -f -v

If you receive the status printout and list of all protocols, you can try to listen to incoming sensors.

$ ./rfxcmd.py -d /dev/ttyUSB0 -l -v

To use RFXcmd with all options and features you need to use the config.xml file to configure. But the basic functionality can be tested with the command above.

&nbsp_place_holder;

⚠️ **GitHub.com Fallback** ⚠️