09-18-2017 10:03 AM
Hello,
I'm trying to use the USB port as serial.
And this error message I receive when trying to activate the application with the JSON file :
ioxclient app activate lxcusbread --payload dev_map.json
Currently active profile : IR809-4G
Command Name: application-activate
Payload file : dev_map.json. Will pass it as application/json in request body..
2017/09/18 18:57:37 POST /iox/api/v2/hosting/apps/lxcusbread/state?action=activate HTTP/1.1
Host: 10.1.1.254:8443
Content-Type: application/json
X-Token-Id: 309c0d1b-d2ad-42da-9eb2-3b930e0f126c
{
"resources": {
"profile": "c1.small",
"cpu": "200",
"memory": "64",
"disk" : "100",
"network": [{"interface-name": "eth0", "network-name": "iox-bridge0"}],
"devices": [{"type": "usbdev", "label": "IR8x9_USB_label", "device-id": "/dev/bus/usb/002/003"}]
}
}
Error. Server returned 500
{
"description": "App Activation error: Device function None is not supported!",
"errorcode": -1021,
"message": "Error while changing app state"
}
My dev_map.json file :
more dev_map.json
{
"resources": {
"profile": "c1.small",
"cpu": "200",
"memory": "64",
"disk" : "100",
"network": [{"interface-name": "eth0", "network-name": "iox-bridge0"}],
"devices": [{"type": "usbdev", "label": "IR8x9_USB_label", "device-id": "/dev/bus/usb/002/003"}]
}
}
09-18-2017 06:19 PM
for USB storage and serial device, please refer to Cisco DevNet: IOx - Docs
10-24-2017 05:40 PM
Seems that you're missing the 'function' key inside 'devices', in package.yaml.
'function': is a mandatory field used for describing the usb as 'storage' or 'serial'
In your code, for example:
{
"resources": {
"profile": "c1.small",
"cpu": "200",
"memory": "64",
"disk" : "100",
"network": [{"interface-name": "eth0", "network-name": "iox-bridge0"}],
"devices": [{"type": "usbdev", "function": "storage", "label": "IR8x9_USB_label", "device-id": "/dev/bus/usb/002/003"}]
}
}
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide