Banana Pi BPI-R2 Razberry board OpenHab2 - help!

Hi all,

So I decided that the BPI-R2 would make a nice OpenHab machine.

The Razberry 2 is on the GPIO pins as you would expect.

I’m running - 2017-09-14-raspbian-stretch-preview-bpi-r2-sd-emmc.img - which is stable.

  • I’ve updated java :java -version
    java version "1.8.0_131"
    Java™ SE Runtime Environment (build 1.8.0_131-b11)
    Java HotSpot™ Client VM (build 25.131-b11, mixed mode)

  • I’ve installed Openhab2 and appears all good and stable. Use Raspberry instructions with apt-get

  • I’ve amended my /usr/share/openhab2/runtime/bin/setenv to include the -Dgnu.io.rxtx.SerialPorts entry

  • I’ve added the same to /etc/default/openhab2 EXTRA_JAVA_OPTS

  • I’ve used raspi-conf disable remote access to serial while leaving it enabled.

  • There is a setting about GPIO being accessible over the network - I’m not sure on this one, anyone?

  • Able to add the appropriate “add-ons” and Things in paper ui but the Z wave shows as offline,

  • /var/log/openhab2/openhab2.log just sits there " Connecting to serial port ‘/dev/ttyS1’" and doesn’t go any further.

  • The /boot/config.txt enable_uart=1 is there. As far as disabling wifi and bluetooth those are platform specific and I’m not sure if anything equivalent if required.

  • /boot/cmdline.txt all looks ok, I didn’t have to remove anything but please confirm:

dwc_otg.lpm_enable=0 console=tty1 console=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

  • The openhab user has been added to the appropriate tty and dialout groups.

  • The BIG question is what port device to use, /dev/ttyAMA0 or similar doesn’t exist and online i see people using /dev/ttyS1 ,2, 3 etc… I’ve tried them all. Can anyone confirm what they’ve done? or how to tell what port I should be using? a ls -l /dev/tty* confirms that ttyS1,2,3 is prob the way to go. I’ve tried them all. I’ve repeated the add-on and thing installation with a reboot after changing the setenv etc, each time,

(btw I’ve tested the Razberry on a raspberry pi with Razberry image and it works fine.)

  • Should I be using a different OS?

  • Can anyone who has had success with this confirm: the port, the raspi-config settings, anything that needed disabling and how, or the OS they used.

  • I’ve not run any of the prepare scripts as they are all raspberry centric and look for /dev/tty/AMA0 etc

This is driving me nuts and really would appreciate any advice.

Thanks

Henners

As a first thing, there should be no need to edit /usr/share/openhab2/runtime/bin/setenv, the settings in /etc/default/openhab2 should suffice.

In question of the correct tty, take a look at the output of

ls -l /dev/tty*

On a common PC platform, typically there are two serial interfaces named ttyS0 and ttyS1. On a Raspberry this would be ttyAMA0. If using an USB interface (like a zwave stick), it could be ttyUSB0 or something else, so you have to get this information.
As you can use a Raspberry headless, the serial interface is normally configured to be bound to the kernel console (this is switched off by raspi-conf, but I don’t know if this will work at the Banana Pi as well, maybe the command will differ. The /boot/cmdline.txt should not contain console=/dev/ttyAMA0 if this is the serial interface.

As I neither own a Banana Pi nor a Razberry, I searched a little bit and got this https://forum.z-wave.me/viewtopic.php?f=3422&t=21064 so it seems, the name of the razberry interface should be /dev/ttyS2. So this should belong to the dialout group (and permissions set to something like 660). This interface must be set in /etc/default/openhab2 and also in the zwave configuration of openHAB2.

Hey buddy, thanks for getting involved!

Firstly as you can see in the output (bottom of post) you can see the ttyAMA0 doesn’t exist on the Banana, permissions look ok. I have tried ttyS2 before - in fact i did see that doc before.

Can you just confirm in its entirity what the cmdline.txt should be - just to avoid confusion, do i drop the baud as well for example?

I’ll set the port in openhab2 only. Thanks,

In terms of raspi-config. I get the options:

For Serial:

Would you like a login shell to be accessible over serial? yes/no
Would you like the serial port hardware to be enabled? yes/no

Remote GPIO:

Would you like the GPIO server to be accessible over the network? yes/np

Here are all the nterface options:

P1 Camera Enable/Disable connection to the Raspberry Pi Camera
P2 SSH Enable/Disable remote command line access to your Pi using SSH
P3 VNC Enable/Disable graphical remote access to your Pi using RealVNC
P4 SPI Enable/Disable automatic loading of SPI kernel module
P5 I2C Enable/Disable automatic loading of I2C kernel module
P6 Serial Enable/Disable shell and kernel messages on the serial connection
P7 1-Wire Enable/Disable one-wire interface
P8 Remote GPIO Enable/Disable remote access to GPIO pins

What do you think they should be.

pi@openhabbpi:/dev $ ls ttyS* -l -h
crw–w---- 1 root tty 4, 64 Dec 12 00:19 ttyS0
crw-rw---- 1 root dialout 4, 65 Dec 12 00:19 ttyS1
crw-rw---- 1 root dialout 4, 66 Dec 12 00:19 ttyS2
crw-rw---- 1 root dialout 4, 67 Dec 12 00:19 ttyS3
pi@openhabbpi:/dev $ ls tty* -l -h
crw-rw-rw- 1 root tty 5, 0 Dec 12 00:19 tty
crw–w---- 1 root tty 4, 0 Dec 12 00:19 tty0
crw------- 1 pi tty 4, 1 Dec 12 00:19 tty1
crw–w---- 1 root tty 4, 10 Dec 12 00:19 tty10
crw–w---- 1 root tty 4, 11 Dec 12 00:19 tty11
crw–w---- 1 root tty 4, 12 Dec 12 00:19 tty12
crw–w---- 1 root tty 4, 13 Dec 12 00:19 tty13
crw–w---- 1 root tty 4, 14 Dec 12 00:19 tty14
crw–w---- 1 root tty 4, 15 Dec 12 00:19 tty15
crw–w---- 1 root tty 4, 16 Dec 12 00:19 tty16
crw–w---- 1 root tty 4, 17 Dec 12 00:19 tty17
crw–w---- 1 root tty 4, 18 Dec 12 00:19 tty18
crw–w---- 1 root tty 4, 19 Dec 12 00:19 tty19
crw–w---- 1 root tty 4, 2 Dec 12 00:19 tty2
crw–w---- 1 root tty 4, 20 Dec 12 00:19 tty20
crw–w---- 1 root tty 4, 21 Dec 12 00:19 tty21
crw–w---- 1 root tty 4, 22 Dec 12 00:19 tty22
crw–w---- 1 root tty 4, 23 Dec 12 00:19 tty23
crw–w---- 1 root tty 4, 24 Dec 12 00:19 tty24
crw–w---- 1 root tty 4, 25 Dec 12 00:19 tty25
crw–w---- 1 root tty 4, 26 Dec 12 00:19 tty26
crw–w---- 1 root tty 4, 27 Dec 12 00:19 tty27
crw–w---- 1 root tty 4, 28 Dec 12 00:19 tty28
crw–w---- 1 root tty 4, 29 Dec 12 00:19 tty29
crw–w---- 1 root tty 4, 3 Dec 12 00:19 tty3
crw–w---- 1 root tty 4, 30 Dec 12 00:19 tty30
crw–w---- 1 root tty 4, 31 Dec 12 00:19 tty31
crw–w---- 1 root tty 4, 32 Dec 12 00:19 tty32
crw–w---- 1 root tty 4, 33 Dec 12 00:19 tty33
crw–w---- 1 root tty 4, 34 Dec 12 00:19 tty34
crw–w---- 1 root tty 4, 35 Dec 12 00:19 tty35
crw–w---- 1 root tty 4, 36 Dec 12 00:19 tty36
crw–w---- 1 root tty 4, 37 Dec 12 00:19 tty37
crw–w---- 1 root tty 4, 38 Dec 12 00:19 tty38
crw–w---- 1 root tty 4, 39 Dec 12 00:19 tty39
crw–w---- 1 root tty 4, 4 Dec 12 00:19 tty4
crw–w---- 1 root tty 4, 40 Dec 12 00:19 tty40
crw–w---- 1 root tty 4, 41 Dec 12 00:19 tty41
crw–w---- 1 root tty 4, 42 Dec 12 00:19 tty42
crw–w---- 1 root tty 4, 43 Dec 12 00:19 tty43
crw–w---- 1 root tty 4, 44 Dec 12 00:19 tty44
crw–w---- 1 root tty 4, 45 Dec 12 00:19 tty45
crw–w---- 1 root tty 4, 46 Dec 12 00:19 tty46
crw–w---- 1 root tty 4, 47 Dec 12 00:19 tty47
crw–w---- 1 root tty 4, 48 Dec 12 00:19 tty48
crw–w---- 1 root tty 4, 49 Dec 12 00:19 tty49
crw–w---- 1 root tty 4, 5 Dec 12 00:19 tty5
crw–w---- 1 root tty 4, 50 Dec 12 00:19 tty50
crw–w---- 1 root tty 4, 51 Dec 12 00:19 tty51
crw–w---- 1 root tty 4, 52 Dec 12 00:19 tty52
crw–w---- 1 root tty 4, 53 Dec 12 00:19 tty53
crw–w---- 1 root tty 4, 54 Dec 12 00:19 tty54
crw–w---- 1 root tty 4, 55 Dec 12 00:19 tty55
crw–w---- 1 root tty 4, 56 Dec 12 00:19 tty56
crw–w---- 1 root tty 4, 57 Dec 12 00:19 tty57
crw–w---- 1 root tty 4, 58 Dec 12 00:19 tty58
crw–w---- 1 root tty 4, 59 Dec 12 00:19 tty59
crw–w---- 1 root tty 4, 6 Dec 12 00:19 tty6
crw–w---- 1 root tty 4, 60 Dec 12 00:19 tty60
crw–w---- 1 root tty 4, 61 Dec 12 00:19 tty61
crw–w---- 1 root tty 4, 62 Dec 12 00:19 tty62
crw–w---- 1 root tty 4, 63 Dec 12 00:19 tty63
crw–w---- 1 root tty 4, 7 Dec 12 00:19 tty7
crw–w---- 1 root tty 4, 8 Dec 12 00:19 tty8
crw–w---- 1 root tty 4, 9 Dec 12 00:19 tty9
crw------- 1 root root 3, 176 Dec 12 00:19 ttya0
crw------- 1 root root 3, 177 Dec 12 00:19 ttya1
crw------- 1 root root 3, 178 Dec 12 00:19 ttya2
crw------- 1 root root 3, 179 Dec 12 00:19 ttya3
crw------- 1 root root 3, 180 Dec 12 00:19 ttya4
crw------- 1 root root 3, 181 Dec 12 00:19 ttya5
crw------- 1 root root 3, 182 Dec 12 00:19 ttya6
crw------- 1 root root 3, 183 Dec 12 00:19 ttya7
crw------- 1 root root 3, 184 Dec 12 00:19 ttya8
crw------- 1 root root 3, 185 Dec 12 00:19 ttya9
crw------- 1 root root 3, 186 Dec 12 00:19 ttyaa
crw------- 1 root root 3, 187 Dec 12 00:19 ttyab
crw------- 1 root root 3, 188 Dec 12 00:19 ttyac
crw------- 1 root root 3, 189 Dec 12 00:19 ttyad
crw------- 1 root root 3, 190 Dec 12 00:19 ttyae
crw------- 1 root root 3, 191 Dec 12 00:19 ttyaf
crw------- 1 root root 3, 192 Dec 12 00:19 ttyb0
crw------- 1 root root 3, 193 Dec 12 00:19 ttyb1
crw------- 1 root root 3, 194 Dec 12 00:19 ttyb2
crw------- 1 root root 3, 195 Dec 12 00:19 ttyb3
crw------- 1 root root 3, 196 Dec 12 00:19 ttyb4
crw------- 1 root root 3, 197 Dec 12 00:19 ttyb5
crw------- 1 root root 3, 198 Dec 12 00:19 ttyb6
crw------- 1 root root 3, 199 Dec 12 00:19 ttyb7
crw------- 1 root root 3, 200 Dec 12 00:19 ttyb8
crw------- 1 root root 3, 201 Dec 12 00:19 ttyb9
crw------- 1 root root 3, 202 Dec 12 00:19 ttyba
crw------- 1 root root 3, 203 Dec 12 00:19 ttybb
crw------- 1 root root 3, 204 Dec 12 00:19 ttybc
crw------- 1 root root 3, 205 Dec 12 00:19 ttybd
crw------- 1 root root 3, 206 Dec 12 00:19 ttybe
crw------- 1 root root 3, 207 Dec 12 00:19 ttybf
crw------- 1 root root 3, 208 Dec 12 00:19 ttyc0
crw------- 1 root root 3, 209 Dec 12 00:19 ttyc1
crw------- 1 root root 3, 210 Dec 12 00:19 ttyc2
crw------- 1 root root 3, 211 Dec 12 00:19 ttyc3
crw------- 1 root root 3, 212 Dec 12 00:19 ttyc4
crw------- 1 root root 3, 213 Dec 12 00:19 ttyc5
crw------- 1 root root 3, 214 Dec 12 00:19 ttyc6
crw------- 1 root root 3, 215 Dec 12 00:19 ttyc7
crw------- 1 root root 3, 216 Dec 12 00:19 ttyc8
crw------- 1 root root 3, 217 Dec 12 00:19 ttyc9
crw------- 1 root root 3, 218 Dec 12 00:19 ttyca
crw------- 1 root root 3, 219 Dec 12 00:19 ttycb
crw------- 1 root root 3, 220 Dec 12 00:19 ttycc
crw------- 1 root root 3, 221 Dec 12 00:19 ttycd
crw------- 1 root root 3, 222 Dec 12 00:19 ttyce
crw------- 1 root root 3, 223 Dec 12 00:19 ttycf
crw------- 1 root root 3, 224 Dec 12 00:19 ttyd0
crw------- 1 root root 3, 225 Dec 12 00:19 ttyd1
crw------- 1 root root 3, 226 Dec 12 00:19 ttyd2
crw------- 1 root root 3, 227 Dec 12 00:19 ttyd3
crw------- 1 root root 3, 228 Dec 12 00:19 ttyd4
crw------- 1 root root 3, 229 Dec 12 00:19 ttyd5
crw------- 1 root root 3, 230 Dec 12 00:19 ttyd6
crw------- 1 root root 3, 231 Dec 12 00:19 ttyd7
crw------- 1 root root 3, 232 Dec 12 00:19 ttyd8
crw------- 1 root root 3, 233 Dec 12 00:19 ttyd9
crw------- 1 root root 3, 234 Dec 12 00:19 ttyda
crw------- 1 root root 3, 235 Dec 12 00:19 ttydb
crw------- 1 root root 3, 236 Dec 12 00:19 ttydc
crw------- 1 root root 3, 237 Dec 12 00:19 ttydd
crw------- 1 root root 3, 238 Dec 12 00:19 ttyde
crw------- 1 root root 3, 239 Dec 12 00:19 ttydf
crw------- 1 root root 3, 240 Dec 12 00:19 ttye0
crw------- 1 root root 3, 241 Dec 12 00:19 ttye1
crw------- 1 root root 3, 242 Dec 12 00:19 ttye2
crw------- 1 root root 3, 243 Dec 12 00:19 ttye3
crw------- 1 root root 3, 244 Dec 12 00:19 ttye4
crw------- 1 root root 3, 245 Dec 12 00:19 ttye5
crw------- 1 root root 3, 246 Dec 12 00:19 ttye6
crw------- 1 root root 3, 247 Dec 12 00:19 ttye7
crw------- 1 root root 3, 248 Dec 12 00:19 ttye8
crw------- 1 root root 3, 249 Dec 12 00:19 ttye9
crw------- 1 root root 3, 250 Dec 12 00:19 ttyea
crw------- 1 root root 3, 251 Dec 12 00:19 ttyeb
crw------- 1 root root 3, 252 Dec 12 00:19 ttyec
crw------- 1 root root 3, 253 Dec 12 00:19 ttyed
crw------- 1 root root 3, 254 Dec 12 00:19 ttyee
crw------- 1 root root 3, 255 Dec 12 00:19 ttyef
crw------- 1 root root 3, 0 Dec 12 00:19 ttyp0
crw------- 1 root root 3, 1 Dec 12 00:19 ttyp1
crw------- 1 root root 3, 2 Dec 12 00:19 ttyp2
crw------- 1 root root 3, 3 Dec 12 00:19 ttyp3
crw------- 1 root root 3, 4 Dec 12 00:19 ttyp4
crw------- 1 root root 3, 5 Dec 12 00:19 ttyp5
crw------- 1 root root 3, 6 Dec 12 00:19 ttyp6
crw------- 1 root root 3, 7 Dec 12 00:19 ttyp7
crw------- 1 root root 3, 8 Dec 12 00:19 ttyp8
crw------- 1 root root 3, 9 Dec 12 00:19 ttyp9
crw------- 1 root root 3, 10 Dec 12 00:19 ttypa
crw------- 1 root root 3, 11 Dec 12 00:19 ttypb
crw------- 1 root root 3, 12 Dec 12 00:19 ttypc
crw------- 1 root root 3, 13 Dec 12 00:19 ttypd
crw------- 1 root root 3, 14 Dec 12 00:19 ttype
crw------- 1 root root 3, 15 Dec 12 00:19 ttypf
crw------- 1 root root 3, 16 Dec 12 00:19 ttyq0
crw------- 1 root root 3, 17 Dec 12 00:19 ttyq1
crw------- 1 root root 3, 18 Dec 12 00:19 ttyq2
crw------- 1 root root 3, 19 Dec 12 00:19 ttyq3
crw------- 1 root root 3, 20 Dec 12 00:19 ttyq4
crw------- 1 root root 3, 21 Dec 12 00:19 ttyq5
crw------- 1 root root 3, 22 Dec 12 00:19 ttyq6
crw------- 1 root root 3, 23 Dec 12 00:19 ttyq7
crw------- 1 root root 3, 24 Dec 12 00:19 ttyq8
crw------- 1 root root 3, 25 Dec 12 00:19 ttyq9
crw------- 1 root root 3, 26 Dec 12 00:19 ttyqa
crw------- 1 root root 3, 27 Dec 12 00:19 ttyqb
crw------- 1 root root 3, 28 Dec 12 00:19 ttyqc
crw------- 1 root root 3, 29 Dec 12 00:19 ttyqd
crw------- 1 root root 3, 30 Dec 12 00:19 ttyqe
crw------- 1 root root 3, 31 Dec 12 00:19 ttyqf
crw------- 1 root root 3, 32 Dec 12 00:19 ttyr0
crw------- 1 root root 3, 33 Dec 12 00:19 ttyr1
crw------- 1 root root 3, 34 Dec 12 00:19 ttyr2
crw------- 1 root root 3, 35 Dec 12 00:19 ttyr3
crw------- 1 root root 3, 36 Dec 12 00:19 ttyr4
crw------- 1 root root 3, 37 Dec 12 00:19 ttyr5
crw------- 1 root root 3, 38 Dec 12 00:19 ttyr6
crw------- 1 root root 3, 39 Dec 12 00:19 ttyr7
crw------- 1 root root 3, 40 Dec 12 00:19 ttyr8
crw------- 1 root root 3, 41 Dec 12 00:19 ttyr9
crw------- 1 root root 3, 42 Dec 12 00:19 ttyra
crw------- 1 root root 3, 43 Dec 12 00:19 ttyrb
crw------- 1 root root 3, 44 Dec 12 00:19 ttyrc
crw------- 1 root root 3, 45 Dec 12 00:19 ttyrd
crw------- 1 root root 3, 46 Dec 12 00:19 ttyre
crw------- 1 root root 3, 47 Dec 12 00:19 ttyrf
crw------- 1 root root 3, 48 Dec 12 00:19 ttys0
crw–w---- 1 root tty 4, 64 Dec 12 00:19 ttyS0
crw------- 1 root root 3, 49 Dec 12 00:19 ttys1
crw-rw---- 1 root dialout 4, 65 Dec 12 00:19 ttyS1
crw------- 1 root root 3, 50 Dec 12 00:19 ttys2
crw-rw---- 1 root dialout 4, 66 Dec 12 00:19 ttyS2
crw------- 1 root root 3, 51 Dec 12 00:19 ttys3
crw-rw---- 1 root dialout 4, 67 Dec 12 00:19 ttyS3
crw------- 1 root root 3, 52 Dec 12 00:19 ttys4
crw------- 1 root root 3, 53 Dec 12 00:19 ttys5
crw------- 1 root root 3, 54 Dec 12 00:19 ttys6
crw------- 1 root root 3, 55 Dec 12 00:19 ttys7
crw------- 1 root root 3, 56 Dec 12 00:19 ttys8
crw------- 1 root root 3, 57 Dec 12 00:19 ttys9
crw------- 1 root root 3, 58 Dec 12 00:19 ttysa
crw------- 1 root root 3, 59 Dec 12 00:19 ttysb
crw------- 1 root root 3, 60 Dec 12 00:19 ttysc
crw------- 1 root root 3, 61 Dec 12 00:19 ttysd
crw------- 1 root root 3, 62 Dec 12 00:19 ttyse
crw------- 1 root root 3, 63 Dec 12 00:19 ttysf
crw------- 1 root root 3, 64 Dec 12 00:19 ttyt0
crw------- 1 root root 3, 65 Dec 12 00:19 ttyt1
crw------- 1 root root 3, 66 Dec 12 00:19 ttyt2
crw------- 1 root root 3, 67 Dec 12 00:19 ttyt3
crw------- 1 root root 3, 68 Dec 12 00:19 ttyt4
crw------- 1 root root 3, 69 Dec 12 00:19 ttyt5
crw------- 1 root root 3, 70 Dec 12 00:19 ttyt6
crw------- 1 root root 3, 71 Dec 12 00:19 ttyt7
crw------- 1 root root 3, 72 Dec 12 00:19 ttyt8
crw------- 1 root root 3, 73 Dec 12 00:19 ttyt9
crw------- 1 root root 3, 74 Dec 12 00:19 ttyta
crw------- 1 root root 3, 75 Dec 12 00:19 ttytb
crw------- 1 root root 3, 76 Dec 12 00:19 ttytc
crw------- 1 root root 3, 77 Dec 12 00:19 ttytd
crw------- 1 root root 3, 78 Dec 12 00:19 ttyte
crw------- 1 root root 3, 79 Dec 12 00:19 ttytf
crw------- 1 root root 3, 80 Dec 12 00:19 ttyu0
crw------- 1 root root 3, 81 Dec 12 00:19 ttyu1
crw------- 1 root root 3, 82 Dec 12 00:19 ttyu2
crw------- 1 root root 3, 83 Dec 12 00:19 ttyu3
crw------- 1 root root 3, 84 Dec 12 00:19 ttyu4
crw------- 1 root root 3, 85 Dec 12 00:19 ttyu5
crw------- 1 root root 3, 86 Dec 12 00:19 ttyu6
crw------- 1 root root 3, 87 Dec 12 00:19 ttyu7
crw------- 1 root root 3, 88 Dec 12 00:19 ttyu8
crw------- 1 root root 3, 89 Dec 12 00:19 ttyu9
crw------- 1 root root 3, 90 Dec 12 00:19 ttyua
crw------- 1 root root 3, 91 Dec 12 00:19 ttyub
crw------- 1 root root 3, 92 Dec 12 00:19 ttyuc
crw------- 1 root root 3, 93 Dec 12 00:19 ttyud
crw------- 1 root root 3, 94 Dec 12 00:19 ttyue
crw------- 1 root root 3, 95 Dec 12 00:19 ttyuf
crw------- 1 root root 3, 96 Dec 12 00:19 ttyv0
crw------- 1 root root 3, 97 Dec 12 00:19 ttyv1
crw------- 1 root root 3, 98 Dec 12 00:19 ttyv2
crw------- 1 root root 3, 99 Dec 12 00:19 ttyv3
crw------- 1 root root 3, 100 Dec 12 00:19 ttyv4
crw------- 1 root root 3, 101 Dec 12 00:19 ttyv5
crw------- 1 root root 3, 102 Dec 12 00:19 ttyv6
crw------- 1 root root 3, 103 Dec 12 00:19 ttyv7
crw------- 1 root root 3, 104 Dec 12 00:19 ttyv8
crw------- 1 root root 3, 105 Dec 12 00:19 ttyv9
crw------- 1 root root 3, 106 Dec 12 00:19 ttyva
crw------- 1 root root 3, 107 Dec 12 00:19 ttyvb
crw------- 1 root root 3, 108 Dec 12 00:19 ttyvc
crw------- 1 root root 3, 109 Dec 12 00:19 ttyvd
crw------- 1 root root 3, 110 Dec 12 00:19 ttyve
crw------- 1 root root 3, 111 Dec 12 00:19 ttyvf
crw------- 1 root root 3, 112 Dec 12 00:19 ttyw0
crw------- 1 root root 3, 113 Dec 12 00:19 ttyw1
crw------- 1 root root 3, 114 Dec 12 00:19 ttyw2
crw------- 1 root root 3, 115 Dec 12 00:19 ttyw3
crw------- 1 root root 3, 116 Dec 12 00:19 ttyw4
crw------- 1 root root 3, 117 Dec 12 00:19 ttyw5
crw------- 1 root root 3, 118 Dec 12 00:19 ttyw6
crw------- 1 root root 3, 119 Dec 12 00:19 ttyw7
crw------- 1 root root 3, 120 Dec 12 00:19 ttyw8
crw------- 1 root root 3, 121 Dec 12 00:19 ttyw9
crw------- 1 root root 3, 122 Dec 12 00:19 ttywa
crw------- 1 root root 3, 123 Dec 12 00:19 ttywb
crw------- 1 root root 3, 124 Dec 12 00:19 ttywc
crw------- 1 root root 3, 125 Dec 12 00:19 ttywd
crw------- 1 root root 3, 126 Dec 12 00:19 ttywe
crw------- 1 root root 3, 127 Dec 12 00:19 ttywf
crw------- 1 root root 3, 128 Dec 12 00:19 ttyx0
crw------- 1 root root 3, 129 Dec 12 00:19 ttyx1
crw------- 1 root root 3, 130 Dec 12 00:19 ttyx2
crw------- 1 root root 3, 131 Dec 12 00:19 ttyx3
crw------- 1 root root 3, 132 Dec 12 00:19 ttyx4
crw------- 1 root root 3, 133 Dec 12 00:19 ttyx5
crw------- 1 root root 3, 134 Dec 12 00:19 ttyx6
crw------- 1 root root 3, 135 Dec 12 00:19 ttyx7
crw------- 1 root root 3, 136 Dec 12 00:19 ttyx8
crw------- 1 root root 3, 137 Dec 12 00:19 ttyx9
crw------- 1 root root 3, 138 Dec 12 00:19 ttyxa
crw------- 1 root root 3, 139 Dec 12 00:19 ttyxb
crw------- 1 root root 3, 140 Dec 12 00:19 ttyxc
crw------- 1 root root 3, 141 Dec 12 00:19 ttyxd
crw------- 1 root root 3, 142 Dec 12 00:19 ttyxe
crw------- 1 root root 3, 143 Dec 12 00:19 ttyxf
crw------- 1 root root 3, 144 Dec 12 00:19 ttyy0
crw------- 1 root root 3, 145 Dec 12 00:19 ttyy1
crw------- 1 root root 3, 146 Dec 12 00:19 ttyy2
crw------- 1 root root 3, 147 Dec 12 00:19 ttyy3
crw------- 1 root root 3, 148 Dec 12 00:19 ttyy4
crw------- 1 root root 3, 149 Dec 12 00:19 ttyy5
crw------- 1 root root 3, 150 Dec 12 00:19 ttyy6
crw------- 1 root root 3, 151 Dec 12 00:19 ttyy7
crw------- 1 root root 3, 152 Dec 12 00:19 ttyy8
crw------- 1 root root 3, 153 Dec 12 00:19 ttyy9
crw------- 1 root root 3, 154 Dec 12 00:19 ttyya
crw------- 1 root root 3, 155 Dec 12 00:19 ttyyb
crw------- 1 root root 3, 156 Dec 12 00:19 ttyyc
crw------- 1 root root 3, 157 Dec 12 00:19 ttyyd
crw------- 1 root root 3, 158 Dec 12 00:19 ttyye
crw------- 1 root root 3, 159 Dec 12 00:19 ttyyf
crw------- 1 root root 3, 160 Dec 12 00:19 ttyz0
crw------- 1 root root 3, 161 Dec 12 00:19 ttyz1
crw------- 1 root root 3, 162 Dec 12 00:19 ttyz2
crw------- 1 root root 3, 163 Dec 12 00:19 ttyz3
crw------- 1 root root 3, 164 Dec 12 00:19 ttyz4
crw------- 1 root root 3, 165 Dec 12 00:19 ttyz5
crw------- 1 root root 3, 166 Dec 12 00:19 ttyz6
crw------- 1 root root 3, 167 Dec 12 00:19 ttyz7
crw------- 1 root root 3, 168 Dec 12 00:19 ttyz8
crw------- 1 root root 3, 169 Dec 12 00:19 ttyz9
crw------- 1 root root 3, 170 Dec 12 00:19 ttyza
crw------- 1 root root 3, 171 Dec 12 00:19 ttyzb
crw------- 1 root root 3, 172 Dec 12 00:19 ttyzc
crw------- 1 root root 3, 173 Dec 12 00:19 ttyzd
crw------- 1 root root 3, 174 Dec 12 00:19 ttyze
crw------- 1 root root 3, 175 Dec 12 00:19 ttyzf

As I don’t own a Banana Pi, I don’t know what the cmdline.txt should look like, but of course the baud rate is part of the console definition.
As there are 4 serial consoles (and one for tty), let’s try another thing.
First shutdown the system and disconnect Razberry. Start the Banana Pi and list the serial consoles with

ls -l /dev/ttyS*

If the list is one console short, this should be the Razberry. Additionally, you could use

dmesg | grep -i -A1 -B1 ttys

this should throw 3 lines for each serial interface and you should see the hardware it belongs to.

No difference from ls /dev/ttyS* (with device unplugged ) :crw–w---- 1 root tty 4, 64 Dec 12 23:43 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Dec 12 23:43 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Dec 12 23:43 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Dec 12 23:43 /dev/ttyS3

dmesg | grep -i -A1 -B1 ttys: again nothing interesting.(board was plugged in at this point)

0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 522861

[ 0.000000] Kernel command line: board=bpi-r2 console=earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait service=linux vmalloc=496M debug=7 initcall_debug=0
[ 0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)

[ 3.543566] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 3.545571] console [ttyS0] disabled
[ 3.565762] 11004000.serial: ttyS0 at MMIO 0x11004000 (irq = 30, base_baud = 1625000) is a ST16650V2
[ 4.713512] console [ttyS0] enabled
[ 4.717545] [drm] Initialized drm 1.1.0 20060810

Is it for sure that the /dev/ttySx device would disappear once the device is removed?

I;vr never run any driver or tool from the Razberry site : is this required? Its only serial right?

Thanks for your help again

H

I’m wondering a) 2A is enough power for the device and Razberry2 board or b) Proper GPIO support somehow isn’t right in this preview: 2017-09-14-raspbian-stretch-preview-bpi-r2-sd-emmc.img

If you check here: https://drive.google.com/drive/folders/0B_YnvHgh2rwjTkdwNnE2VmFoNzg

The best most stable image around is Ubuntu 16.04.

As I don’t own a Razberry, I can only guess. Maybe you have to install the zwave server:

wget -q -O - razberry.z-wave.me/install | sudo bash

but as mentioned, this is just a guess.

I got this working in the end.

Basically you need to enable the GPIO by amending the appropriate dts files in the kernel code ( https://github.com/BPI-SINOVOIP/BPI-R2-bsp ) and setting the uart entries to “status=okay”

detalled here:
http://fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:gpio

Then compile the kernel (in a VM or whereever) and ship it over to the BPI-R2 SD card.

The good news is there is two other options:

  1. frank-w has got pre compiled kernels here, I used 4.4.108. https://drive.google.com/drive/folders/15Y5Y3NAOwg_IMmN3k6hdb7pAQj9oTVTl . just copy over the BPI-BOOT and the BPI-ROOT over to the appropriate partition mounted on other machine as root!

  2. If you prefer 4.14 with uart/gpio enabled in preconfgiured debian images, frank-w has done those too: https://drive.google.com/open?id=15Y5Y3NAOwg_IMmN3k6hdb7pAQj9oTVTl

After than just follow the install. use /dev/ttyS2 . make sure setenv and openhab/default have the appropriate entries.

Make sure openhab is added to the tty group.

Sort java out etc…

Good to go - it works well.

Henry

Just to confirm in point 1 I’m using the Ubuntu 16.04 image, not the rasbian stretch preview I was using earlier.