problem with writing label to SBC4's VINT HUB

General PhidgetSBC Discussion.
Post Reply
atthe
Phidgetsian
Posts: 7
Joined: Tue Feb 02, 2010 3:26 pm
Contact:

problem with writing label to SBC4's VINT HUB

Post by atthe »

Hello,

I tried python and C manager samples with SBC4. In 'attach' callback I try to write label to attached device, but this call simply hang the code flow. And label is never changed.

Can label of VINT HUB of SBC4 be changed at all?
If 'yes' then 'how?'

Thanks
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: problem with writing label to SBC4's VINT HUB

Post by Patrick »

To write the label on a VINT Hub, you need to create a PhidgetHubHandle and open it. You can't set properties on handles you get back from the Manager, because these are read-only, not opened.

-Patrick
atthe
Phidgetsian
Posts: 7
Joined: Tue Feb 02, 2010 3:26 pm
Contact:

Re: problem with writing label to SBC4's VINT HUB

Post by atthe »

Thank you, Patrick,

code like this works fine (errors checking removed for simplicity):

Code: Select all

    PhidgetHubHandle hub_handle;
    PhidgetHub_create(&hub_handle);
    Phidget_setDeviceSerialNumber((PhidgetHandle)hub_handle, serialNumber);
    Phidget_openWaitForAttachment((PhidgetHandle)hub_handle, 3000);
    Phidget_writeDeviceLabel((PhidgetHandle)hub_handle, labelSet.c_str());
    const char* labelGet = NULL;
    Phidget_getDeviceLabel((PhidgetHandle)hub_handle, &labelGet); 
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests