Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
edf253e
Meshtatic Driver
BillBrown341 Nov 12, 2025
ceea00d
Merge branch 'opensensorhub:master' into MeshtasticDriver
BillBrown341 Nov 12, 2025
ec43c3a
Update Acknoledgement of messages to see personal messages sent by radio
BillBrown341 Nov 13, 2025
00f254e
Add Definition to 'destination' field. Added Better Description for t…
BillBrown341 Nov 14, 2025
5f7e434
Remove 'System.out.println' to clean up code.
BillBrown341 Nov 14, 2025
a1973db
Switched all cases of 'System.err.println' to 'getLogger().error()'
BillBrown341 Nov 14, 2025
89b6d1f
Updated All variables to meet consistent naming convention
BillBrown341 Nov 14, 2025
6ceeb24
added definition to packet record
BillBrown341 Nov 14, 2025
3d777cf
Removed Old Tests that do not work
BillBrown341 Nov 14, 2025
26fa39d
Fixed variable naming convention of FOI function
BillBrown341 Nov 14, 2025
fd5fdb1
Updated Serial number to be 001 by default instead of meshtastic. Upd…
BillBrown341 Nov 17, 2025
2bc89c1
Changed ID for the developer object in build.gradle to my Github profile
BillBrown341 Nov 17, 2025
047a10c
Updated 'data record' NAME in Text Msg Control to resolve and competi…
BillBrown341 Nov 17, 2025
f5d24d6
Updated Bundle Activator with more meaningful Bundle Activatorclear
BillBrown341 Nov 17, 2025
4397ccb
Created more meaningful package name 'org.sensorhub.impl.sensor.mesht…
BillBrown341 Nov 17, 2025
d031167
updated doStop() method to update error when stopping sensor
BillBrown341 Nov 17, 2025
b4e7032
Updated doStart() to begin processing after handshake has been made w…
BillBrown341 Nov 17, 2025
57699ac
Fixed issues with doStop() method
BillBrown341 Nov 17, 2025
a8dfff7
added 'foi' to FoiUID to differentiate with sensor UID
BillBrown341 Nov 17, 2025
4dcc136
Fixed Naming semantics
BillBrown341 Nov 17, 2025
3421f73
Updated Handler and Outputs to implement an Interface to clean up han…
BillBrown341 Nov 17, 2025
1a14e64
updated code for unit tests
BillBrown341 Nov 17, 2025
5cea76a
Temporarily Removed Unit Tests for Build
BillBrown341 Nov 18, 2025
6af97b3
Updated Outputs to VarRateSensorOutput to update sampling period more…
BillBrown341 Nov 21, 2025
0c2d499
Removed 'Generated' directory from addons and updated build.gradle to…
BillBrown341 Nov 21, 2025
f1db383
Merge branch 'opensensorhub:master' into MeshtasticDriver
BillBrown341 Nov 21, 2025
8b5220b
Fixed naming for VarRateSensorOutput
BillBrown341 Nov 21, 2025
9e87388
Merge branch 'MeshtasticDriver' of https://github.com/BillBrown341/os…
BillBrown341 Nov 21, 2025
b6802d4
Added SensorHubException() when starting the commProvider
BillBrown341 Nov 24, 2025
2ec7f16
Configured 'compileJava' task to depend on 'generateProto'
BillBrown341 Nov 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sensors/others/sensorhub-driver-meshtastic/src/main/protobufs"]
path = sensors/others/sensorhub-driver-meshtastic/src/main/protobufs
url = https://github.com/meshtastic/protobufs
79 changes: 79 additions & 0 deletions sensors/others/sensorhub-driver-meshtastic/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# Meshtastic Driver over Serial Communication
## Dependencies
To work properly, this driver requries a comm module. The driver was tested on a mac using the [sensorhub-comm-jssc](https://github.com/opensensorhub/osh-addons/tree/master/comm/sensorhub-comm-jssc):


## Meshtastic Node Configuration
Prior to using the OSH Meshtastic Driver with a Meshtastic Radio, the radio must be configured with the [Meshtastic Firmware](https://flasher.meshtastic.org/).
Follow Meshtastic [Getting Started Documentation](https://meshtastic.org/docs/getting-started/) to properly set up a Meshtastic Radio.

Once the radio has been flashed with Meshtastic Firmware, [connect to the device](https://meshtastic.org/docs/getting-started/initial-config/) to setup it's initial configuration.

To use this Driver over Serial, you must configure the following Meshtastic Settings:
- Settings/Serial
- Make sure ```Enabled``` is **ON**
- Make sure ```Mode``` is set to ***Protobufs***


Once this has been configured, you will need to exit the application and plug your radio directly into the computer running your OSH Node.

# OSH Node Configuration
Once your node has been launched. Make sure a ***Communication Provider*** has been selected. (This has been tested
using the JSSC Serial Comm Provider) and all necessary information has been selected.

Select ```Apply Changes``` and then ```Start``` the driver. As Meshtastic Protobuf messages are received from your meshtastic radio,
these messages will appear in the Output of the drier.

# Text Message Control
Additionally, a Text Message Control has been added to this driver. If you want to send a direct message, type the node number of
the node you want to send a message to. If you want to broadcast a message, type 'broadcast' or 'Broadcast' and selct send command.




# Meshtastic Driver (Serial)
This driver enables an OSH Node to communicate with a Meshtastic radio over a serial connection using Protobuf messages.

## Dependencies
This driver requires a serial communication module. It has been tested using [sensorhub-comm-jssc](https://github.com/opensensorhub/osh-addons/tree/master/comm/sensorhub-comm-jssc)

Make sure this communication module is included in your OSH environment before running the driver.

## Meshtastic Radio Setup
1. Follow the [Meshtastic Getting Started](https://meshtastic.org/docs/getting-started/) guide for initial configuration:

2. Flash your radio with the official [Meshtastic Firmware](https://flasher.meshtastic.org/) if not done in step 1:

3. After flashing and initial setup, open the [Meshtastic app](https://meshtastic.org/docs/getting-started/initial-config/) and configure the radio’s Serial settings:
- Settings → Serial
- Enabled: ON
- Mode: Protobufs

4. Close the Meshtastic app and connect the radio directly to the computer running the OSH Node. ***Note the Port Address***

Note: If another application (like the Meshtastic GUI or CLI) is open and using the serial port, the OSH Node will not be able to connect.

## OSH Node Configuration
1. Launch your OSH Node.

2. Select and configure the ***Communication Provider***.
(This driver has been verified using JSSC Serial Comm Provider)

3. Apply the communication settings.

4. Start the driver.

As Protobuf messages are received from the Meshtastic radio, sensor outputs will appear in the driver’s output stream.

## Sending Text Messages

This driver includes support for sending text messages through the Meshtastic network.

### To send a message:

- To message a specific node: enter the Node ID of the destination.
- To broadcast a message: enter broadcast (case-insensitive).

Then type your message and select ```Send Command```.


76 changes: 76 additions & 0 deletions sensors/others/sensorhub-driver-meshtastic/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
plugins {
id "java"
id "com.google.protobuf" version "0.9.4"
}

description = 'Meshtastic Driver'
ext.details = "Driver that utilizes a meshtastic Radio pre-configured with meshtastic Node Software to communicate with other meshtastic Radio"
version = '1.0.0'


dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
implementation "com.google.protobuf:protobuf-java:3.25.1"
testImplementation "junit:junit:4.13.1"
}

protobuf {
protoc {
// Use protoc matching the runtime protobuf-java version
artifact = "com.google.protobuf:protoc:3.25.1"
}
// Where to place generated sources
generatedFilesBaseDir = "$projectDir/src/generated"

// Configure generation tasks
generateProtoTasks {
all().each { task ->
// enable java builtin (default) — leave plugin-free so we get plain java classes
task.builtins {
java {}
}
// ensure the proto source dir is considered an input (not strictly required, but explicit)
task.inputs.dir("${projectDir}/src/main/protobufs")
}
}
}



// Make sure Gradle sees our non-standard proto source directory
sourceSets {
main {
// add the generated java to the java source set so IDEs/compilation pick them up
java {
srcDirs += "$projectDir/src/generated/main/java"
}
// tell the Java sourceSet where our proto files are; the plugin will read these
proto {
srcDirs = ['src/main/protobufs']
}
}
}

test {
useJUnit()
}

// add info to OSGi manifest
osgi {
manifest {
attributes ('Bundle-Vendor': 'Botts Inc')
attributes ('Bundle-Activator': 'com.sample.impl.sensor.meshtastic.Activator')
}
}

// add info to maven pom
ext.pom >>= {
developers {
developer {
id 'meshtastic'
name 'Bill Brown'
organization 'Botts Inc'
organizationUrl ''
}
}
}
Loading