02-01-2017 05:59 AM
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?
02-06-2017 05:29 PM
It is not available to access this info via SNMP currently. Please use the script to retrieve that.
02-13-2017 10:40 PM
BTW, the GPS service on IOx will be available soon (beta version now). Then the app could call the GPS API directly.
02-23-2017 07:37 PM
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
07-17-2017 05:14 PM
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.
07-18-2017 10:13 PM
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)
07-19-2017 10:57 AM
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.
07-19-2017 09:28 PM
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
02-22-2018 01:09 AM
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).
04-23-2019 08:54 AM
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.
04-23-2019 10:18 AM
I tried deploy/activate/start IOx GPS service on 15.7.3.M2 and it worked fine.
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.
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