Hey guys,
yesterday I tried to make my CC1101 module running on my Raspberry Pi with Homegear. However it doesn’t work. Here is my setup:
[ol]
[li]Installed the Raspberry image containing Homegear and OpenHAB from homegear.eu/downloads/rpi_homege … penhab.zip.[/li]
[li] Installed the Homegear nightlies from 2015-11-11[/li]
[li] Using the CC1101 module from aliexpress.com/item/Free-shi … 60542.html[/li]
[li] Wired the module like this (pins in paranthesis)
RPI CC1101
3V3 Power (17) <—> VCC (1)
Ground (25) <—> GND (9)
MOSI (19) <—> SI (3)
MISO (21) <—> SO (5)
CE0 (24) <—> CSN (7)
CLK (23) <—> SCLK (4)
GPIO25 (22) <—> GDO2 (6)
[/li]
[li] Using these settings within /etc/homegear/physicalinterfaces.conf:
[code]
---------------------------- HomeMatic BidCoS ----------------------------
#######################################
########## TI CC1101 Module ##########
#######################################
The device family this interface is for
[HomeMaticBidCoS]
Specify an unique id here to identify this device in Homegear
id = My-CC1101
When default is set to “true” Homegear will assign this device
to new peers.
default = true
Options: cul, cc1100, coc, cuno, hmcfglan, hmlgw
deviceType = cc1100
device = /dev/spidev0.0
Default: responseDelay = 95
Should be “95” for CUL or COC, “100” for TI CC1101 and “60” for HM-CFG-LAN or HM-LGW
responseDelay = 100
The interrupt pin to use. “0” for GDO0 or “2” for GDO2.
You only need to connect one of them. Specify the GPIO
you connected the interrupt pin to below.
interruptPin = 2
The GPIO GDO0 or GDO2 is connected to. Specify which GDO to use above.
gpio1 = 25
Additional TI CC1190 Config
The GPIO high gain mode of the CC1190 is connected to.
Default: -1 (disabled)
#highGainModeGpio = 5
The hexadecimal value for the PATABLE of the TI CC1101.
Default:
- Without high gain mode: 0xC2
- With high gain mode: 0x27 (maximum legally allowed setting)
#txPowerSetting = 0x27
[/code][/li][/ol]
Now performing “sudo /etc/init.d/homegear restart” outputs this:
[ ok ] Stopping Homegear: homegear.
12/01/15 07:45:58.304 Error: Failed to export GPIO with index 2 for device "cc1100": GPIO not defined in physicel devices' settings.
12/01/15 07:45:58.307 Error: Failed to export GPIO with index 2 for device "cc1100": GPIO not defined in physicel devices' settings.
12/01/15 07:45:58.312 Error: Could not setup GPIO for device cc1100: GPIO path for index 2 is not set.
12/01/15 07:45:58.313 Error: Could not setup GPIO for device cc1100: GPIO path for index 2 is not set.
12/01/15 07:45:58.317 Failed to set direction for GPIO with index "2": GPIO not defined in physicel devices' settings.
12/01/15 07:45:58.318 Failed to set direction for GPIO with index "2": GPIO not defined in physicel devices' settings.
[....] Starting Homegear: homegear12/01/15 07:45:58.569 Loading RPC server settings from /etc/homegear/rpcservers.conf
12/01/15 07:45:58.576 Loading RPC client settings from /etc/homegear/rpcclients.conf
. ok
Invoking “sudo homegear” outputs this:
12/01/15 09:13:47.212 Loading RPC server settings from /etc/homegear/rpcservers.conf
12/01/15 09:13:47.220 Loading RPC client settings from /etc/homegear/rpcclients.conf
12/01/15 09:13:47.384 Info: Loading family module mod_miscellaneous.so
12/01/15 09:13:47.405 Info: Loading family module mod_homematicbidcos.so
12/01/15 09:13:47.501 Info: Loading family module mod_max.so
12/01/15 09:13:47.557 Info: Loading family module mod_sonos.so
12/01/15 09:13:47.590 Info: Loading family module mod_philipshue.so
12/01/15 09:13:47.620 Info: Loading family module mod_insteon.so
12/01/15 09:13:47.673 Info: Loading family module mod_homematicwired.so
12/01/15 09:13:47.748 Info: Backing up database...
12/01/15 09:13:47.770 Can't execute "PRAGMA journal_mode=DELETE": database is locked
12/01/15 09:13:47.771 Can't execute "PRAGMA journal_mode=DELETE": database is locked
12/01/15 09:13:47.979 Initializing database...
12/01/15 09:13:47.992 Initializing family controller...
12/01/15 09:13:47.993 Module HomeMatic BidCoS: Loading XML RPC devices...
12/01/15 09:13:51.264 Info: Skipping file rf_central.xml: File is not needed.
12/01/15 09:13:53.915 Info: Not initializing device family HomeMatic Wired, because no physical interface was found.
12/01/15 09:13:53.917 Info: Not initializing device family INSTEON, because no physical interface was found.
12/01/15 09:13:53.918 Info: Not initializing device family MAX!, because no physical interface was found.
12/01/15 09:13:53.919 Module Philips hue: Loading XML RPC devices...
12/01/15 09:13:53.953 Info: Not initializing device family Sonos, because no physical interface was found.
12/01/15 09:13:53.955 Module Miscellaneous: Loading XML RPC devices...
12/01/15 09:13:53.968 Loading devices...
12/01/15 09:13:53.971 Module HomeMatic BidCoS: Loading HomeMatic BidCoS device 1
12/01/15 09:13:53.978 Module HomeMatic BidCoS: Loading HomeMatic BidCoS device 2
12/01/15 09:13:53.990 Module Philips hue: Loading device 4
12/01/15 09:13:53.996 Module Philips hue: Loading peer 1
12/01/15 09:13:54.010 Module Philips hue: Loading peer 2
12/01/15 09:13:54.025 Module Philips hue: Loading peer 3
12/01/15 09:13:54.040 Module Philips hue: Loading peer 4
12/01/15 09:13:54.068 Module Miscellaneous: Loading Miscellaneous device 3
12/01/15 09:13:54.071 Start listening for packets...
12/01/15 09:13:54.073 Module HomeMatic BidCoS: TI CC110X "My-CC1101": Rf device is in use: /dev/spidev0.0
12/01/15 09:13:54.074 Module HomeMatic BidCoS: TI CC110X "My-CC1101": Rf device is in use: /dev/spidev0.0
12/01/15 09:13:54.078 Critical: At least one of the physical devices could not be opened... Exiting...
12/01/15 09:13:54.079 Critical: At least one of the physical devices could not be opened... Exiting...
12/01/15 09:13:55.999 Info: Disposing family module mod_sonos.so
12/01/15 09:13:56.126 Info: Disposing family module mod_philipshue.so
12/01/15 09:13:56.128 Info: Disposing family module mod_miscellaneous.so
12/01/15 09:13:56.130 Info: Disposing family module mod_max.so
12/01/15 09:13:56.132 Info: Disposing family module mod_insteon.so
12/01/15 09:13:56.133 Info: Disposing family module mod_homematicwired.so
12/01/15 09:13:56.135 Info: Disposing family module mod_homematicbidcos.so
12/01/15 09:13:56.146 Closing database...
12/01/15 09:13:56.149 Error: Can't execute "PRAGMA journal_mode = DELETE": database is locked
12/01/15 09:13:56.149 Error: Can't execute "PRAGMA journal_mode = DELETE": database is locked
Invoking “ls -la /sys/class/gpio/” outputs this:
total 0
drwxr-xr-x 2 root root 0 Dec 1 07:45 .
drwxr-xr-x 41 root root 0 Nov 30 22:18 ..
--w------- 1 root root 4096 Nov 30 22:19 export
lrwxrwxrwx 1 root root 0 Dec 1 07:45 gpio25 -> ../../devices/soc/20200000.gpio/gpio/gpio25
lrwxrwxrwx 1 root root 0 Nov 30 22:19 gpiochip0 -> ../../devices/soc/20200000.gpio/gpio/gpiochip0
--w------- 1 root root 4096 Nov 30 22:19 unexport
Invoking “sudo gpio -v” outputs this:
gpio version: 2.30
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Model B, Revision: 03, Memory: 512MB, Maker: Egoman
Device tree is enabled.
* Root or sudo required for GPIO access.
Invoking “sudo gpio readall” outputs this:
+-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| | | 3.3v | | | 1 || 2 | | | 5v | | |
| 2 | 8 | SDA.1 | IN | 1 | 3 || 4 | | | 5V | | |
| 3 | 9 | SCL.1 | IN | 1 | 5 || 6 | | | 0v | | |
| 4 | 7 | GPIO. 7 | IN | 1 | 7 || 8 | 1 | ALT0 | TxD | 15 | 14 |
| | | 0v | | | 9 || 10 | 1 | ALT0 | RxD | 16 | 15 |
| 17 | 0 | GPIO. 0 | IN | 0 | 11 || 12 | 0 | IN | GPIO. 1 | 1 | 18 |
| 27 | 2 | GPIO. 2 | IN | 0 | 13 || 14 | | | 0v | | |
| 22 | 3 | GPIO. 3 | IN | 0 | 15 || 16 | 0 | IN | GPIO. 4 | 4 | 23 |
| | | 3.3v | | | 17 || 18 | 0 | IN | GPIO. 5 | 5 | 24 |
| 10 | 12 | MOSI | ALT0 | 0 | 19 || 20 | | | 0v | | |
| 9 | 13 | MISO | ALT0 | 0 | 21 || 22 | 1 | IN | GPIO. 6 | 6 | 25 |
| 11 | 14 | SCLK | ALT0 | 0 | 23 || 24 | 1 | ALT0 | CE0 | 10 | 8 |
| | | 0v | | | 25 || 26 | 1 | ALT0 | CE1 | 11 | 7 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| 28 | 17 | GPIO.17 | IN | 0 | 51 || 52 | 0 | IN | GPIO.18 | 18 | 29 |
| 30 | 19 | GPIO.19 | IN | 0 | 53 || 54 | 0 | IN | GPIO.20 | 20 | 31 |
+-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+---------+------+---+-Model B2-+---+------+---------+-----+-----+
Invoking “sudo gpio exports” outputs this:
GPIO Pins exported:
25: in 1 both
Hope I collected all needed info in order to investigate this.
Any help is appreciated and many thanks!!!
Thomas