Missing checksum in captured data on usb controller?


I am programming a python library for Velbus and am encountering the following problem:

Sometimes, I receive messages that do not have a checksum. These are few examples:

0f f8 dc 04 00 00 08 00 04
0f f8 de 04 00 04 00 00 04
0f f8 de 04 00 00 04 00 04
0f fb de 08 fb 02 00 00 00 00 00 00 04
0f fb dc 08 fb 04 00 00 00 00 00 00 04

=> RelayStatus and PushButtonStatus message from different modules. The message size is incorrect. It seems that the end-byte is there and all the data bytes are there but the checksum is missing.

I use a VMB1USB module to interact with the Bus. These are my configuration parameters:
DEVICE_NAME = “/dev/usb/ttyUSB0”
BAUD_RATE = 38400
BYTE_SIZE = twisted.internet.serialport.EIGHTBITS
PARITY = twisted.internet.serialport.PARITY_NONE
STOPBITS = twisted.internet.serialport.STOPBITS_ONE

I don’t have any clue on how to fix this:

  • The errors can not be allocated consistently to one or more modules: some channels have it, other’s don’t (most if them have it)
  • They can be consistently allocated to some channels on specific modules
  • I just listen to the bus, I am not sending anything
  • I removed the termination units from all my modules (including my USB module) except for 2, like advised in the manual

It would be great if someone can provide any pointers on how to fix this!!!

(Python library can be found on bitbucket: bitbucket.org/tdelaet/python-velbus)

As far as I am aware that is not possible so you will probably have an error in your script somewhere. I would suggest debugging it at the lowest level possible and moving from there, see when it becomes 0.