# How can I collect raw GNSS data and prepare it for PPP processing, e.g., CSRS-PPP

**URL:** <https://community.sparkfun.com/t/how-can-i-collect-raw-gnss-data-and-prepare-it-for-ppp-processing-e-g-csrs-ppp/67195>\
**Category:** GPS/GNSS\
**Created:** [October 25, 2025, 5:18am UTC](https://community.sparkfun.com/t/how-can-i-collect-raw-gnss-data-and-prepare-it-for-ppp-processing-e-g-csrs-ppp/67195 "2025-10-25T05:18:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![semuadmin](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/semuadmin/32/7096_2.png) [@semuadmin](https://community.sparkfun.com/u/semuadmin)\
**Post date:** [October 25, 2025, 8:51am UTC](https://community.sparkfun.com/t/how-can-i-collect-raw-gnss-data-and-prepare-it-for-ppp-processing-e-g-csrs-ppp/67195/3 "2025-10-25T08:51:49Z")

</div>

Hi all,

Just to build on Paul’s advice - the X20P and other new generation UBX GNSS modules no longer support legacy UBX CFG commands (_with some exceptions_). You need to use the newer configuration database commands CFG-VALSET, CFG-VALGET and CFG-VALDEL.

Here’s a screen shot of the relevant panel in PyGPSClient:

 ![Screenshot 2025-10-25 at 09.58.44](https://canada1.discourse-cdn.com/sparkfun/original/2X/9/9d85c033f8e9f9e736e376677f8eba5a2694c6a1.png)

… and here are the enabled UBX RXM-RAWX and RXM-SFRBX messages appearing in the PyGPSClient console:

 ![Screenshot 2025-10-25 at 18.08.11](https://canada1.discourse-cdn.com/sparkfun/original/2X/a/ab60d7b0922dc5ae7ee2c9a310f3e970b9add10a.png)

The pyubx2 library has [dedicated helper methods](https://github.com/semuconsulting/pyubx2?tab=readme-ov-file#configinterface) to facilitate this. In addition, PyGPSClient has a [built-in helper method](https://github.com/semuconsulting/PyGPSClient?tab=readme-ov-file#userdefined) which can convert binary UBX messages to preset strings suitable for incorporation into the `ubxpresets_l` section of your .json configuration file.

**NB:** Just be careful with the configuration key names - pyubx2 uses **underscores** throughout, so use `"CFG_MSGOUT_UBX_RXM_RAWX_UART1"` rather than `“CFG-MSGOUT-UBX_RXM_RAWX_UART1”`

Here’s a [sample python script](https://github.com/semuconsulting/PyGPSClient/blob/master/examples/presets.py) which incorporates these helper methods:

```python
"""
Illustration of how to create UBX configuration database
messages and convert them to a UBX preset entry which can
be inserted into the ubxpresets_l section of a .json config
file.

Created on 21 Feb 2024
@author: semuadmin
"""

from pyubx2 import SET_LAYER_RAM, TXN_NONE, UBXMessage
from pygpsclient import ubx2preset

layers = SET_LAYER_RAM # volatile RAM
transaction = TXN_NONE
cfgdata = [("CFG_MSGOUT_UBX_RXM_RAWX_UART1", 1), ("CFG_MSGOUT_UBX_RXM_SFRBX_UART1", 1)]

msg = UBXMessage.config_set(layers, transaction, cfgdata)
print(msg)
preset = ubx2preset(msg, "Enable RAWX and SFRBX messages on UART1")
print(preset)

```

If you’re minded to try to deconstruct the contents of the individual RXM-SFRBX messages, be aware that this is _ **not** _ for the faint-hearted, but the following references may help:

> **[IS-GPS-200N.pdf](https://www.gps.gov/sites/default/files/2025-07/IS-GPS-200N.pdf)**
>
> 3.18 MB

(specifically section 20.3.2 Message Structure)

> **[u-blox Portal](https://portal.u-blox.com/s/question/0D52p00008HKD1kCAH/why-are-the-sfrbx-messages-words-32-bits-but-in-isgps200h-the-words-are-specified-as-being-30-bits-long)**

(note that the 30-bit NAV words are padded to 32-bits in RXM-SFRBX for ease of processing, _ **but** _ the specific padding treatment depends on the signal ID (L1, L2, L5, L6)).

---

_[View the full topic](https://community.sparkfun.com/t/how-can-i-collect-raw-gnss-data-and-prepare-it-for-ppp-processing-e-g-csrs-ppp/67195)._
