Skip to content
Florian Streibelt edited this page Jun 29, 2013 · 3 revisions

This should just hold some notes or things I stumbled upon

Ideas/Roadmap

  • use twisted for protocol handling
    • enable asynchronous send/receive
    • handle bus change message
    • handle ack and complete messages
  • more OO - e.g. make a class for cameras
    • factory for cameras in visca class
    • get an object only if camera is attached
    • global state of bus in that class

Notes on the protocol

The Visca protocol has some oddities/specialities.

All devices are daisy chained and use a serial line to communicate. One bus master, called the controller, has to be present on the bus.

This controller initializes the bus by sending an enumeration request with the first device address that is free, usually 1. All devices forward this message, which is a brodacast message, incrementing the address counter by one. In the end this message is received by the master, as all broadcast messages are sent back to the sender who has to remove it from the bus.

Number format

The format how Numbers are transferred first seens a bit odd, but makes sense when looking at the packet format. All messages are terminated by 0xff - thus this value may not be party of any message or number. So the designers did two things. First of all normal commands of course do not contain 0xff as argument or payload, second all bigger numbers ae encoded into two bytes with the first 4 bit being zero. 0xab thus becomes 0xa,0xb - which is simple to put together again in the devices on the bus. For positions like pan/tilt positions can be positive and negative with 0 being the center. Negative numbers are in two's complement, and encoded as explained above.

Clone this wiki locally