Wi-Fi communication using two u-blox C099-F9P application board
Tags: wifi, gps, gnss, iot
Published: 2022-08-31 17:19:48

The C099-F9P [RTK](https://www.youtube.com/watch?v=257WX_agvtg) Base can be set to operate as a Wi-Fi access point and UDP server to deliver RTCM correction data via a Wi-Fi link. For the Rover operation, C099-F9P can be configured to either Wi-Fi STA mode or AP mode. STA mode is suitable for one Base to one Rover communication. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/phz045rf0l585vvr2xxf.JPG)

This article will introduce Base AP mode and Rover STA mode configuration.

### Prerequisites

- Two u-blox C099-F9P [application](https://www.u-blox.com/en/product/c099-f9p-application-board) boards [(evaluation kit)](https://www.digikey.ca/en/product-highlight/u/u-blox/c099-f9p-application-board)

- [u-center](https://www.u-blox.com/en/product/u-center) installed

- [Tera Term](https://osdn.net/projects/ttssh2/releases/) installed 

### Getting started

#### Base ODIN-W2 configuration in Wi-Fi AP mode
1.Configure C099-F9P ODIN-W2 to work in Wi-Fi AP mode using CLI in Tera Term terminal:

```linux
/mem_store/run wifi_ap 
```

2.Set the C099-F9P Wi-Fi and I2C interface to support the base configuration:

```linux
/mem_store/run base
```

3.Restart the C099-F9P application board to apply Wi-Fi AP mode settings, and the Base ODIN-W2 will wait until a Wi-Fi STA Rover connects to it before streaming any data via the Wi-Fi link. The screenshot below shows the Base is streaming data to Rover via a Wi-Fi connection.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/br67bw4ylnyx0jvofnvh.JPG)

#### Rover ODIN-W2 configuration in Wi-Fi STA mode

1.Configure C099-F9P ODIN-W2 to work in Wi-Fi STA mode using CLI in Tera Term terminal:

```linux
/mem_store/run wifi_sta
```

2.Set the C099-F9P to support rover configuration:

```linux
/mem_store/run rover
```

3.Restart the Rover C099-F9P application board to apply Wi-Fi STA mode settings, and the Rover C099-F9P automatically connects to the C099-F9P Base.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/quz4fozub92thiyeod1r.PNG)

#### RTCM data streaming

When the Rover receives RTCM correction data from Base, the Fix Mode should change from 3D to 3D/DGNSS (3D/DGNSS/FLOAT or 3D/DGNSS/FIXED), and the RTK LED blinks in green. The two screenshots show the Base was in 3D/DNGSS Fix Mode and the Rover was in 3D/DGNSS/FIXED Fix Mode.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rgdlpio5q5n9l46wcq77.JPG)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/byqgamyou4e2j4rbg5m7.PNG)

### Trouble Shooting
You may need to consult [this link](https://portal.u-blox.com/s/question/0D52p0000A3VTLJCQ4/c099f9p-wifi-base-rover-configuration-no-rtcm3-data-passed) if there is no RTCM data streaming.

### Reference

https://blog.adafruit.com/2020/06/08/eye-on-npi-u-blox-c099-f9p-application-board-for-zed-f9p-gnss-rtk-module-eyeonnpi-adafruit-digikey-digikey-ublox/?gclid=Cj0KCQjwjbyYBhCdARIsAArC6LJrPi4IL63FlciBqmsiVi17k99ISIA6yqlpx9lrUJMC3ofOh8-L4CkaAnGgEALw_wcB