Velbus & Linux

Hey all,

I got myself a USB and a 8PB module today and I built myself a little test setup. I would like to get things going under Linux and I will post all my findings in this thread.

It seems that I am already off to a good start, since I got basic communication working. You need the USB Serial Device Driver built as a module in your kernel with the Generic Serial Driver option enabled. Then you load it with the following command:

modprobe usbserial vendor=0x10CF product=0x0B1B

If you then plug in the module your kernel should spew out something like this:

usb 2-5: new full speed USB device using ohci_hcd and address 6 usb 2-5: configuration #1 chosen from 1 choice usbserial_generic 2-5:1.0: Generic device with no bulk out, not allowed. usbserial_generic: probe of 2-5:1.0 failed with error -5 usbserial_generic 2-5:1.1: generic converter detected usb 2-5: generic converter now attached to ttyUSB0

I don’t know what the error is about (yet), but it does not seem to interfere with the functionality.

If you have udev running (should be if your distribution is up to date), it should create a device for it automagically. Mine (gentoo) was found in /dev/ttyUSB0.

If it is not created or you can’t find it, you can create your own device node by doing

mknod /dev/ttyUSB0 c 188 0

Apparently up to 16 different usb serial devices can be attached this way (the minor number will increment).

Be aware that if you have a setup like me, you need to actually open the serial connection to avoid getting errors on the communication bus. It took me a while to figure this out. I presume that the problem is that there is nothing consuming the messages or responding to them. I don’t know if the same will happen if you attach other modules like dimmers to the bus and leave the USB-module unconnected since I don’t have any more yet to test this. You “open” the serial connection by opening the device. For example:

cat /dev/ttyUSB0

If you then press the buttons you will see some random characters appearing in your console representing the messages being sent on the bus.

My next step will be to begin writing a library and a first console program that allows interaction with the different modules. In the spirit of sharing this will ofcourse be released under some OSS-license.

That’s great, continue, please.
i for myself might develop a python interface, in the coming days.

I wouldn’t mind the bulk out error since the VMB1USB doesn’t need bulk transfer (like a hard drive which needs to send very large amounts of data).