How to install GPS service
GPS Service Installation
Download IOxGPS service from cisco dev-hub.
IOx services is hosted on cisco devhub. User needs to have devhub credentials(username/password) for accessing service packages.
To understand how to use the devhub login follow the instructions on this page.
Download IOx service packages and search for iox-packages-group/services/ir800.
GPS service can be installed by
- ioxclient
- Local Manager
- FogDirector
IOxCore need not be installed on to IR8xx device.It will be available as part of the image and will be bought up on demand when IOxGPS service is installed.Just the IOxGPS package needs to be installed either via FD/LM/ioxclient
GPS service installation via ioxclient
Deploy the GPS bundle in either NAT mode or Bridge mode(based on networking requirement of customer) on the IR8xx device as below. GPS data is streamed in NMEA format via virtual serial device on host linux os
Serial port used for this purpose is "/dev/ttyS4" on IR8xx devices
There are 3 steps
- Installation of gps package
- Activation of gps service
- Start of gps service
From ioxclient , please provide json activation payload with content as mentioned below while activating via ioxclient
Sample Activation payload
e.g $ cat ~/act.json
{
"resources": {
"network": [{"interface-name": "eth0", "network-name": "iox-nat0"}],
"devices": [{"type": "serial", "label": "GPS_DEV", "device-id": "/dev/ttyS4"}]
}
}
Steps to install, activate and start the gps service using ioxclient
``` $ ioxclient app install IOxGPS
$ ioxclient app act IOxGPS --payload ~/act.json
Currently active profile : 211
Command Name: service-activate
Service IOxGPS is Activated
$ ioxclient app start IOxGPS
Currently active profile : 211
Command Name: service-start
Service IOxGPS is Started
$ ioxclient svc list
Currently active profile : 211
Command Name: service-list
List of installed Service :
1. IOxGPS ---> RUNNING
2. IOxCore ---> RUNNING
<br>
### Installing via Fog Director
- IOxGPS service is pre-bundled along with FD instance from AC6 release onwards
- If new version of IOxGPS is available , please download the latest as mentioned above
- Select the IOxGPS bundle from Apps page and install on the compatible devices.
- In resource editing page of the service , select right serial device for this service.
- please select "GPS NMEA" option while activating the IOxGPS in resources page
- Unlike ioxclient , FD directly installs, activates and start the service without the user having carry out these steps individually.
### Installing via LM####
- Download the package as mentioned above.
- Upload the package to LM and install on to the device
- click the Activate option once the service is installed.
- Select the right serial device in the activation page of the service
- Activate the service
- Start the service
**NAT Configuration on IOS **
<br>
NBI (North Bound interface ) gateway may need access from outside the router for the cloud applications to communicate with micro services APIs.
NAT configuration is required if you are going to use ioxclient to subscribe for the gps data or an external App which is not be installed on the device.In none of the these conditions below mentioned NAT configuration is not required if Fog App is going to reside on the device.
<br>
Proper NAT rules need to be installed on the IOS for the NBI to be accessible in this case
Use IOXClient CLI to check the mapped port of the NBI.
ioxclient svc info IOxCore
Check under networking section , PortMapping value to find the right map.In the example below 9999 port is mapped.
Add nat entries on the IOS to map the ports with the IP of the svcbr_0 of the Guest OS to the IP of the external interface or VLAN.
conf> ip nat inside source static tcp <svcbr_0 IP on GOS> 9999 interface GIGE-0 9999
### **Next steps**
**[Next Chapter](gps-api.md)** - IOxGPS API reference
To learn more about how to develop GPS App use below link:
- **[GPS App development](../../../../overview/iox-gps-app-tutorial.md)** - How to develop GPS App development using IOx gps service
- **[Reference GPS App](https://github.com/CiscoIOx/iox-services-samples/tree/master/gpsApp)** - Sample GPS App
- **[IOx Services developer guide](../../../services-developer-guide/index.md)** - IOx Services developer guide