cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5080
Views
2
Helpful
10
Replies

GPS, accelerometer, gyroscope info via SNMP

Paulo Seguel
Cisco Employee
Cisco Employee

So far, the only way to access GPS/accelerometer/gyroscope data from GOS is creating a small script that retrieves the data via telnet/CLI, and then parsing it.

I guess SNMP would be more elegant, but no idea if it's available.

Is it possible to access this info via SNMP?

10 Replies 10

Steve Zhang
Cisco Employee
Cisco Employee

It is not available to access this info via SNMP currently. Please use the script to retrieve that.

Steve Zhang
Cisco Employee
Cisco Employee

BTW, the GPS service on IOx will be available soon (beta version now). Then the app could call the GPS API directly.

Paulo Seguel
Cisco Employee
Cisco Employee

I found that inside GOS, we can cat the serial device assigned to the accelerometer/gyroscope.

It seems better than retrieving the info from IOS.

root@qemux86-64:~# cat  /dev/ttyS3

2017:02:24:03:34:26.141186 4576.25 2852.50 323.75 -3.111 -8.601 1006.134

2017:02:24:03:34:26.621178 2257.50 2703.75 367.50 -3.599 -8.662 1007.781

2017:02:24:03:34:27.100209 4506.25 2703.75 175.00 -2.745 -9.333 1004.731

2017:02:24:03:34:27.580192 6676.25 2633.75 280.00 -3.355 -8.845 1006.256

2017:02:24:03:34:28.060178 4322.50 2712.50 411.25 -1.586 -8.967 1008.025

Hi, I have a PaaS app that I want to get the gyroscope and accelerometer info by reading /dev/ttyS3.  But, the ttyS3 device is not available inside the app container.  I think I need to specify in package.yaml under app->resources that the app needs the ttyS3 device, but I don't know the format and most links in DevNet for "package descriptor" seem to be dead except the one about reading from serial.  Appreciate the help.

There is some issue to access the link of "https://developer.cisco.com/site/iox/documents/developer-guide/?ref=quickstart". please use https://developer.cisco.com/site/iox/docs/ instead.

You may refer to Cisco DevNet: IOx - Docs (go to Python Application Using Serial Port as an example for using serial port)

Steve, thanks for the links.  Looking at the serial port files, I added the following to the activation.json file:

{

    "resources": {

        "profile": "c1.small",

        "network": [{ "interface-name": "eth0", "network-name": "iox-bridge0" }],

        "devices": [{ "type": "serial", "label": "HOST_DEV1", "device-id": "/dev/ttyS3" }]

    }

}

But when I activate the app, it gives me this error:

Command Name: application-activate

Payload file : ./activation.json. Will pass it as application/json in request body..

Error. Server returned 500

{

"description": "App Activation error: Serial device /dev/ttyS3 not supported",

"errorcode": -1021,

"message": "Error while changing app state"

}

Using /dev/ttyS1 works, but I want to read the gyroscope and accelerometer values from /dev/ttyS3.  Is it not a serial device?  What should the type be then?

Thanks for the help.

Hi Michael,

/dev/ttyS3 is not officially supported in PaaS/LXC/Docker apps. However there is a workaround to support it.

You may contact me offline for the workaround in case it is urgent for you. Or you may have to wait for the new releases to come for the formal support.

Thanks,

Steve

For the latest version (15.7.3M1 or later) of IR809/829 IOx, it supports /dev/ttyS3 to get the information of Accelerometer and Gyroscope in the IOx apps.

For the GPS, you may refer to the GPS microservice (https://developer.cisco.com/docs/iox/#gps-service-architecture).

Hi Steve,

I've try to activate the GPS on IR829 but I receive this error message:

Currently active profile : default
Command Name: application-activate
Payload file : activate-gps.json. Will pass it as application/json in request body..
Error. Server returned 500
{
"description": "App Activation error: serial device serial not supported",
"errorcode": -1021,
"message": "Error while changing app state"
}

activate-gps.json:

 

{
"resources": {
"network": [{"interface-name": "eth0", "network-name": "iox-nat0"}],
"devices": [{"type": "serial", "label": "GPS_DEV", "device-id": "/dev/ttyS4"}]
}
}

 

My IOS version is Version 15.7(3)M2.

 

Could you please help me?

Thanks in advance.

 

I tried deploy/activate/start IOx GPS service on 15.7.3.M2 and it worked fine.  

https://devhub.cisco.com/artifactory/webapp/#/artifacts/browse/tree/General/iox-packages-group/services/ir800/IOxGPS-1.5.1.tar

Note: This service will auto-install dependent IOx core service.

 

If this doesn't work for you, please share techsupport snapshot (can generate from LocalManager: System Troubleshoot tab) and also the app package.tar.

 

Screen Shot 2019-04-23 at 10.15.15 AM.pngScreen Shot 2019-04-23 at 10.15.01 AM.png