When I try to write a Phidget DeviceLabel using MBS 23.3 on a Windows target, I get an “Operation Not Supported” error.

I know that only Phidgets having a serial number support Device Label writing, and I’m trying to write to a VINT hub, which has a serial number.

I also know that some older hardware didn’t support writing, but I also know that this particular device does, because I can write the label successfully using Phidgets Control Panel (under Windows). For this reason I think it’s possible that it’s an issue with the MBS plugin.

My string is 10 characters long.

I tried


and also

MyPhidget.Hub.WriteDeviceLabel(DefineEncodings(myString, Encodings.UTF16))

because the Phidget docs refer to the Device label’s maximum length in terms of UTF-16 code points so I thought maybe it needs a UTF-16-encoded string.

DefineEncodings? Try ConvertEncodings.

1 Like

Well, WriteDeviceLabel passes text as UTF-8 internally to the C API.

Not sure, but maybe this hub object doesn’t support it.

But it does - I can write its label using the Phidgets Control Panel.

Maybe that’s why it doesn’t work? From the Phidgets API documentation (which is reproduced in the MBS documentation):

“The label can be at most 10 UTF-16 code units.”