- C++ 98.1%
- CMake 1.9%
| src | ||
| tests | ||
| .gitignore | ||
| CMakeLists.txt | ||
| CPPLINT.cfg | ||
| LICENSE | ||
| README.md | ||
bambu_replacement_lib
A drop-in replacement library for Bambu Studio's and OrcaSlicer's bambu_networking.so.
Status: WORK IN PROGRESS
Current State
This library provides a C++ implementation that mirrors the exported API of bambu_networking.so.
Key Features Implemented:
- MQTT Connectivity: Uses
mosquittoppto handle MQTT connections to printers. - SSL/TLS Support: Integrated OpenSSL for secure connections.
- JSON Parsing: Uses
nlohmann/jsonfor handling data structures. - Network Agent: Partial implementation of the
Agentclass for managing printer state and discovery. - Exported Symbols: All exported functions needed to print match original ABI.
Source Files:
src/bambu_network.cpp- Implementation of exported functions (mix of active logic and stubs).src/Agent.cpp- Core logic for network management, MQTT, and SSDP.src/MqttHandler.cpp- Wrapper around Mosquitto for MQTT communication.
Built Output:
libbambu_networking_oss.so- Shared library.
Prerequisites & Dependencies
To build this project, you need a C++17 compliant compiler and the following development libraries:
- CMake (3.16 or newer)
- C++ Compiler (GCC 15.2.1 tested, Clang should work)
- OpenSSL (libssl-dev)
- libcurl (libcurl4-openssl-dev)
- Mosquitto (libmosquitto-dev, libmosquittopp-dev)
- nlohmann_json (nlohmann-json3-dev)
- GTest (libgtest-dev, for running tests)
On Ubuntu/Debian, you can install these with:
sudo apt-get update
sudo apt-get install cmake build-essential libssl-dev libcurl4-openssl-dev \
libmosquitto-dev libmosquittopp-dev nlohmann-json3-dev libgtest-dev
Building
# Clone the repository
git clone https://git.contentnation.net/grumpydevelop/bambu_network_oss.git
cd bambu_replacement_lib
# Create build directory
mkdir build && cd build
# Configure and Build
cmake ..
make
# (Optional) Run Tests
ctest
Usage with OrcaSlicer
Important: Patched OrcaSlicer Required
To use this library, you currently need a patched version of OrcaSlicer.
The standard release of OrcaSlicer (and Bambu Studio) performs integrity checks and signature verification on the loaded bambu_networking.so module. To load this open-source replacement:
- You must use a build of OrcaSlicer where these verification checks have been disabled or modified to accept the OSS library.
- Replace the original
bambu_networking.soin the OrcaSlicer directory with the compiledlibbambu_networking_oss.so(rename it tobambu_networking.so).
Note: Instructions for patching OrcaSlicer are outside the scope of this document.
Current state
- "It works on my machine/printer"
- It does compile and run with the current git version of OrcaSlicer in a Ubunt 24.04 LTS and my P1S on Firmware 1.08.02.
Contributions
Contributions, Bugs reports and also Success reports are welcome. Either here or via Matrix #chat@grumpydevelop:contentnation.net