# Parsing data on R232 RBR Sensor

**URL:** <https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410>\
**Category:** Dev Kit Support\
**Created:** [September 3, 2024, 4:15am UTC](https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410 "2024-09-03T04:15:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Swordfish](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Swordfish](https://bristlemouth.discourse.group/u/Swordfish)\
**Post date:** [September 3, 2024, 4:15am UTC](https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410/1 "2024-09-03T04:15:46Z")

</div>

Hello,

I am integrating an RBR Sensor to the Bristle mouth board and Spotter Buoy. I am attempting to work off the code for the (v0.6.0) Bristlemouth Dev Kit Guide: Integrating an RS232 Serial Sensor. I am on the fourth section, but I am not sure which code to use. The user\_code.cpp at the end of the section does not compile. I tried building my own but I am not sure what directives to use.

The sensor I am using is the RBR concerto³ . The output onto the spotter terminal is “82142t f60605e502e024f4, [payload] | tick: 25403, rtc: 0, line: 2024-09-02 14:26:16.500, 0.0012, 24.6651, 23.8400, 200.8109, 0.0117, 1495.9879, 1.2547, 77.3767”

I want to average these over a certain timeframe, then send them via the satellite. Any help would be appreciated.

Thank you

---

<div class="post-metadata">

**Author:** ![vsowa12](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@vsowa12](https://bristlemouth.discourse.group/u/vsowa12)\
**Post date:** [September 3, 2024, 9:20pm UTC](https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410/2 "2024-09-03T21:20:13Z")

</div>

Hi @Swordfish!

I tried to compile the user\_code.cpp downloaded from the v0.6.0 RS232 guide and I was able to compile it. Specifically it was the file right after the line: “Your completed **serial\_payload\_guide/user\_code/user\_code.cpp** file should look like this:”  
What compile errors are you seeing? What is the cmake command that you are using?

Have you had a chance to check out the `OrderedSeparatorLineParser` and `AveragingSampler`? Check out `bm_protocol/src/apps/bm_devkit/rbr_coda_example` for an example on how to use the `OrderedSeparatorLineParser` to turn the serial string into values and then use `AveragingSampler` to perform computations with it!

Let us know if you have any questions!

Victor

---

<div class="post-metadata">

**Author:** ![Swordfish](https://avatars.discourse-cdn.com/v4/letter/s/d26b3c/32.png) [@Swordfish](https://bristlemouth.discourse.group/u/Swordfish)\
**Post date:** [September 3, 2024, 11:05pm UTC](https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410/3 "2024-09-03T23:05:04Z")

</div>

Hello,

That is the one I am compiling. I am using make command in the terminal window. This is the error I get.

“(bristlemouth) swordfish@fish-MBP RBR\_Data\_1 % make  
[0%] Built target conda\_check  
[26%] Built target lwipcore  
[26%] Built target linkerscript  
[26%] Generating version.c, \_version.c, version\_string – git version: v0.5.0 Consolidate compiler generated dependencies of target bm\_mote\_v1.0-RBR\_Data\_1-dbg.elf  
[26%] Building CXX object src/CMakeFiles/bm\_mote\_v1.0-RBR\_Data\_1-dbg.elf.dir/apps/bm\_devkit/RBR\_Data\_1/user\_code/user\_code.cpp.obj  
/Users/swordfish/code/bm\_protocol/src/apps/bm\_devkit/RBR\_Data\_1/user\_code/user\_code.cpp:26:8: error: ‘cfg’ does not name a type 26 | extern cfg::Configuration \*userConfigurationPartition; | ^~~  
/Users/swordfish/code/bm\_protocol/src/apps/bm\_devkit/RBR\_Data\_1/user\_code/user\_code.cpp: In function ‘void setup()’:  
/Users/swordfish/code/bm\_protocol/src/apps/bm\_devkit/RBR\_Data\_1/user\_code/user\_code.cpp:58:3: error: ‘userConfigurationPartition’ was not declared in this scope 58 | userConfigurationPartition-\>getConfig(“plUartBaudRate”, strlen(“plUartBaudRate”), | ^ ~~~~~~~~~~~~~~~~~~~~~~~~~  
make[2]: \*\*\* [src/CMakeFiles/bm\_mote\_v1.0-RBR\_Data\_1-dbg.elf.dir/build.make:814: src/CMakeFiles/bm\_mote\_v1.0-RBR\_Data\_1-dbg.elf.dir/apps/bm\_devkit/RBR\_Data\_1/user\_code/user\_code.cpp.obj] Error 1 make[1]: \*\*\* [CMakeFiles/Makefile2:531: src/CMakeFiles/bm\_mote\_v1.0-RBR\_Data\_1-dbg.elf.dir/all] Error 2 make: \*\*\* [Makefile:91: all] Error 2”

I saw those commands, I wanted to try compiling the user\_code before moving to that folder, I did not know they were the same file. I will try it and report back. Do you have an recommendations for extracting the timestamp?

---

<div class="post-metadata">

**Author:** ![vsowa12](https://avatars.discourse-cdn.com/v4/letter/v/8491ac/32.png) [@vsowa12](https://bristlemouth.discourse.group/u/vsowa12)\
**Post date:** [September 16, 2024, 6:08pm UTC](https://bristlemouth.discourse.group/t/parsing-data-on-r232-rbr-sensor/410/4 "2024-09-16T18:08:54Z")

</div>

Ahhhh! Okay, I was able to reproduce your build errors.

I looked back at the v0.5.0 guide to see what changed when going to v0.6.0 and I see that the `user_code.h` file is no longer provided in the guide, however, there is an addition to this file that you need to include. In the `user_code.h` file you need to add `#include "debug_configuration.h"` and then your compile error should go away. Let me know if this works or doesn’t!

With regards to extracting the timestamp, is this a timestamp coming from your sensor? If so can you provide an example output string from your sensor?

Hope this helps!  
Victor
