Menu

#13 VISCA_set_address () misunderstanding

v1.0 (example)
open
nobody
None
5
2013-07-18
2013-07-17
Paul Turner
No

VISCA_set_address() attempts to enumerate and set the addresses of cameras but it seems the author is unaware that cameras are linked in a daisy chain with the last camera being the one that returns responses to the controller. Fair enough since the project only claims to control 'a' camera. When the first camera receives 0x88,0x30,0x01,0xFF (set your address to 1) it forwards an incremented message 0x88,0x30,0x02,0xFF (set your address to 2) to the next camera, and so on. Therefore the message/response received at the controller contains 0x88,0x30,0x0N,0xFF where N is one more than the number of cameras found. A small rewrite is required.

Related

Bugs: #13

Discussion

  • Damien Douxchamps

    Thanks Paul.

    I was unaware of that problem indeed. Not only because I only worked
    with a single camera (IIRC) but also because that was more than 10 years
    ago (!) I haven't touched a single VISCA device ever since, so it's hard
    for me to debug the library, especially if the required changes are
    important.

    Could you submit a patch?

    Damien

    On Wed, 2013-07-17 at 01:43 +0000, Paul Turner wrote:


    [bugs:#13] VISCA_set_address () misunderstanding

    Status: open
    Created: Wed Jul 17, 2013 01:43 AM UTC by Paul Turner
    Last Updated: Wed Jul 17, 2013 01:43 AM UTC
    Owner: nobody

    VISCA_set_address() attempts to enumerate and set the addresses of
    cameras but it seems the author is unaware that cameras are linked in
    a daisy chain with the last camera being the one that returns
    responses to the controller. Fair enough since the project only claims
    to control 'a' camera. When the first camera receives
    0x88,0x30,0x01,0xFF (set your address to 1) it forwards an incremented
    message 0x88,0x30,0x02,0xFF (set your address to 2) to the next
    camera, and so on. Therefore the message/response received at the
    controller contains 0x88,0x30,0x0N,0xFF where N is one more than the
    number of cameras found. A small rewrite is required.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/libvisca/bugs/13/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    Damien 高原 Douxchamps http://damien.douxchamps.net/

     

    Related

    Bugs: #13

  • Paul Turner

    Paul Turner - 2013-07-18

    Hi Darrien,
    I am trying to get a Sony block camera to work on an MBED LPc1768, so not having some of the lower-level comms libraries (v24 stuff), I 'bent' the low-level stuff to fit the object-oriented serial ports of the MBED platform.
    I am having no luck getting responses even after adding a 3.3V to 5V level shifter, so I am wondering if the camera (54G-10H) really is VISCA compliant.
    I have never submitted a patch before, so I may be a while figuring out the system, plus I will couch the patch in your original style, /* */ comments etc.
    Meanwhile, this is my patch (which I have yet to prove actually works).

    uint32_t    VISCA_set_address(VISCAInterface_t *iface, int *camera_num) {
        VISCAPacket_t packet;
        int backup;
        VISCACamera_t camera;           // temporary camera struct
    
        camera.address = 1;             // start numbering camera IDs from 1
        backup = iface->broadcast;      // remember if we were in broadcast mode
    
        _VISCA_init_packet (&packet);
        _VISCA_append_byte (&packet, 0x30);
        _VISCA_append_byte (&packet, 0x01);
    
        iface->broadcast = 1;           // this IS a broadcast
        if (_VISCA_send_packet(iface, &camera, &packet) != VISCA_SUCCESS) {
            iface->broadcast = backup;  // resume previous broadcast/non-broadcast mode
            return VISCA_FAILURE;
        } else {
            iface->broadcast = backup;  // resume previous broadcast/non-broadcast mode
        }
    
        if (_VISCA_get_reply(iface, &camera) != VISCA_SUCCESS) {
            return VISCA_FAILURE;
        } else {
            // The packet returned from the last camera in the daisy-chain should be 88 30 0x FF,
            // 'x' being the last camera id + 1. The number of cams will thus be buf[2] - 1
            *camera_num = (iface->ibuf[2] - 1);     // return the number of cameras via the pointer parameter
            return VISCA_SUCCESS;
        }
    }
    
     

    Last edit: Paul Turner 2013-07-18
  • Damien Douxchamps

    On Thu, 2013-07-18 at 03:11 +0000, Paul Turner wrote:

    Ah, erm, I don't actually have a VISCA block camera as it turns out.
    It looks like I will be writing some new code!
    http://www.mintron.com/HTM/New_PRODUCTS/ALPHA/download/54G5&G10%
    20protocol.pdf
    Oh well.

    Libvisca is an old protocol; I would not be surprised if Sony drops it
    in the next few years ;)


    [bugs:#13] VISCA_set_address () misunderstanding

    Status: open
    Created: Wed Jul 17, 2013 01:43 AM UTC by Paul Turner
    Last Updated: Thu Jul 18, 2013 01:56 AM UTC
    Owner: nobody

    VISCA_set_address() attempts to enumerate and set the addresses of
    cameras but it seems the author is unaware that cameras are linked in
    a daisy chain with the last camera being the one that returns
    responses to the controller. Fair enough since the project only claims
    to control 'a' camera. When the first camera receives
    0x88,0x30,0x01,0xFF (set your address to 1) it forwards an incremented
    message 0x88,0x30,0x02,0xFF (set your address to 2) to the next
    camera, and so on. Therefore the message/response received at the
    controller contains 0x88,0x30,0x0N,0xFF where N is one more than the
    number of cameras found. A small rewrite is required.


    Sent from sourceforge.net because you indicated interest in
    https://sourceforge.net/p/libvisca/bugs/13/

    To unsubscribe from further messages, please visit
    https://sourceforge.net/auth/subscriptions/

    --
    Damien 高原 Douxchamps http://damien.douxchamps.net/

     

    Related

    Bugs: #13


Log in to post a comment.

MongoDB Logo MongoDB