[Solved] Pi3 B+ and HM-MOD-RPI-PCB no pairing


#1

Hello everybody,

I’m running openhabian on a Raspberry Pi3 B+ and Homegear 0.7.27-1824 with HM-MOD-RPI-PCB.

I had a little trouble to get the HM-MOD-RPI-PCB running. Now the module seems to talk to homegear but they don’t unterstand each other. :wink:

I can’t pair any devices (I’m trying with a HM-LC-Bl1PBU-FM). The logs keep saying:

08/06/18 22:33:03.266 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: No response received to packet: FD0003000003180A
08/06/18 22:33:03.266 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: Unknown packet received in response to init packet. Reconnecting...

I was was wondering if the HM-MOD-RPI-PCB is working correctly, so I installed Raspberrymatic. Pairing worked right away and according to other posts in various forums Raspberry should have done a firmware update to the module. I think I saw something like that in the Raspberrymatic logs but I’m not sure about it.

I followed the “official” configuration instructions and read almost every post in this forum about the HM-MOD-RPI-PCB.

I disabled the serial interfaces:

systemctl disable serial-getty@ttyAMA0.service
systemctl disable serial-getty@serial0.service
systemctl disable serial-getty@ttyS0.service

And some kind of communication between the Pi and the module seem to work. Here are my config and the log files:

---------------------------- HomeMatic BidCoS  ----------------------------
___________________________________________________________________________

[General]

moduleEnabled = true

#######################################
########## General Settings  ##########
#######################################

[General]

## The BidCoS address of Homegear. It is recommended to change this to a random 3 byte hexadecimal
## value starting with 0xFD (e. g. 0xFD43AB). Only change this, when no HomeMatic BidCoS devices
## are paired to Homegear as existing pairings will not work anymore!
centralAddress = 0xFD0AB0

## Specify a 16 byte (32 characters) long AES key here to protect your wireless communication
## !!! IMPORTANT: It is highly recommended to change this key before pairing the first device.
## !!! IMPORTANT: Never ever lose this key. That would render your devices useless.
## To remove the key from your devices, you need to factory reset them using Homegear. The factory
## reset on the device is not possible!!!
rfKey = XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

## With each key change currentRFKeyIndex needs to be
## incremented by 1
currentRfKeyIndex = 1

## When you change rfKey, put the old key here. To change the key Homegear needs to know the
## old and the new one.
## !!! Do not set oldRFKey when you set rfKey for the first time !!!
##oldRfKey = 00112233445566778899AABBCCDDEEFF

## When set to "true" unsigned broadcast packets are processed by Homegear. This could enable an
## attacker to make Homegear do things, you don't want. That means, this option is a security
## risk.
processBroadcastWithAesEnabled = false

...

#######################################
########### HM-MOD-RPI-PCB  ###########
#######################################

## The device family this interface is for
[HomeMatic Wireless Module for Raspberry Pi]

## Specify an unique id here to identify this device in Homegear
id = My-HM-MOD-RPI-PCB

## When default is set to "true" Homegear will assign this device
## to new peers.
default = true

## Options: cul, cc1100, coc, cunx, hmcfglan, hmlgw, hm-mod-rpi-pcb, homegeargateway
deviceType = hm-mod-rpi-pcb

device = /dev/ttyAMA0

## Default: responseDelay = 95
## Should be "95" for CUL or COC, "100" for TI CC1101 and "60" for HM-CFG-LAN or HM-LGW
responseDelay = 95

## Default: gpio1 = 0
## "18" for HM-MOD-RPI-PCB
gpio1 = 18

homegear.log (33,7 KB)

homegear.err

08/06/18 18:17:34.210 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: No response received to packet: FD0003000003180A
08/06/18 18:17:34.210 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: Unknown packet received in response to init packet. Reconnecting...
08/06/18 18:17:35.780 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Warning: Connection closed (1). Trying to reconnect...
08/06/18 18:17:43.923 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: No response received to packet: FD0003000003180A
08/06/18 18:17:43.923 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Error: Unknown packet received in response to init packet. Reconnecting...
08/06/18 18:17:45.492 Module HomeMatic BidCoS: HM-MOD-RPI-PCB "My-HM-MOD-RPI-PCB": Warning: Connection closed (1). Trying to reconnect...

$ ls -la /dev/tty*

crw-rw---- 1 homegear homegear 204, 64 Aug  6 18:22 /dev/ttyAMA0
crw------- 1 root     root       5,  3 Aug  6 18:13 /dev/ttyprintk
crw-rw---- 1 root     dialout    4, 64 Aug  6 18:13 /dev/ttyS0

============================================================================================
$ cat /etc/udev/rules.d/99-com.rules

##SUBSYSTEM=="input", GROUP="input", MODE="0660"
##SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
##SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
##SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

#SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
        chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
        chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
        chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

KERNEL=="ttyAMA[01]", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart0 $ALIASES/serial0; then \
                echo 0;\
        elif cmp -s $ALIASES/uart0 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi\
'", SYMLINK+="serial%c"

KERNEL=="ttyS0", PROGRAM="/bin/sh -c '\
        ALIASES=/proc/device-tree/aliases; \
        if cmp -s $ALIASES/uart1 $ALIASES/serial0; then \
                echo 0; \
        elif cmp -s $ALIASES/uart1 $ALIASES/serial1; then \
                echo 1; \
        else \
                exit 1; \
        fi \
'", SYMLINK+="serial%c"

============================================================================================
$ cat /boot/cmdline.txt

dwc_otg.lpm_enable=0 console=tty1 root=PARTUUID=1fff3176-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

============================================================================================

$ cat /boot/config.txt

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
#dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on
gpu_mem=16

enable_uart=1
dtoverlay=pi3-miniuart-bt
dtparam=spi=on
dtparam=i2c_arm=on

Does anyone has an idea?

Regards

Martin


#2

I had a similar probllem.
In my case the problem was that I have made a firmware-upgrade of HM-MOD-RPI-PCB -> and obviously the updated firmware of HM-MOD-RPI-PCB is not compatible with homegear.

In any case : I have downgraded -> and afterwards HM-MOD-RPI-PCB could see and pair homematic devices.

Here a link to do the downgrade:

Hope this helps

cu
schroedinger


#3

Paging @sathya… I’m not aware that a new firmware of the HM-MOD-RPI-PCB has problems working with homegear.


#4

Maybe it’s not a problem with homegear but with the underlying openhabian. In the meantime I tried YAHM on the openhabian installation. Without any success. So I would focus on homegear again.


#5

I tried to downgrade to firmware 1.4.1 on a plain raspian light.

 # eq3configcmd update-coprocessor -c -p /dev/ttyS0 -d /firmware/HM-MOD-UART -u
2018/08/14 20:29:24.107 <Info> Version: 1.4.1
2018/08/14 20:29:24.107 <Info> No update necessary

I’m installing openhabian right now to give it another try…
By the way I had to use /dev/ttyS0 and not /dev/ttyAMA0


#6

It’s working!!

Here is what I did:

to /boot/config.txt

Reboot. Done!