cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1834
Views
6
Helpful
2
Replies

error message using ioxclient app activate app_id --payload dev_map.json

cvailler
Cisco Employee
Cisco Employee

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"}]

        }

}


2 Replies 2

Steve Zhang
Cisco Employee
Cisco Employee

for USB storage and serial device, please refer to Cisco DevNet: IOx - Docs

Lucas Scola
Cisco Employee
Cisco Employee

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"}]

      }

}