RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

AI Module ReferenceBackwards Compatibility Module ReferenceBdebug Module ReferenceBdebugImpl Module ReferenceBeamstate Module ReferenceBullettime Module ReferenceController Module ReferenceDamageTracker Module ReferenceDrivetrain Module ReferenceElectrics Module ReferenceElectrics Custom Value ParserEnergyStorage Module ReferenceExtensions Module ReferenceFire Module ReferenceVehicle Engine True GlobalsGuihooks Module ReferenceGUI Streams Module ReferenceHTML Texture Module ReferenceHydros Module ReferenceInput Module ReferenceJBeam-Lua Integration GuideMapmgr Module ReferenceMaterial Module ReferenceBeamNG Math & Unit Conversions Referenceobj (Vehicle C++ Object)PartCondition Module ReferenceParticlefilter Module ReferenceParticles Module ReferencePowertrain Module ReferenceVehicle Property & Module TreeProps Module ReferenceProtocols Module ReferenceRecovery Module ReferenceScriptAI Module ReferenceSensors Module ReferenceSounds Module ReferenceStreams Module ReferenceThrusters Module Reference`v` (Vehicle Data & JBeam)Wheels Module Reference
Advanced Wheel DebugAero DebugVehicle APIChassis DataCouplingsCruise ControlDrag AIDynamic Vehicle DataDyno ClientESC CalibrationESC MeasurementVehicle Extensions OverviewGameplay InterfaceGameplay StatisticInput AnalyzerMQTT Grafana DemoOdometerOutGaugeOutSimPerfect LaunchPerformance LoggerSimple Trip AppSkeletonStraight LineTelemetry LoggerUT RecorderVehicle Performance DataVehicle Stats Logger
Adaptive Cruise Control (ACC)ADAS InputADAS UltrasonicAdvanced IMUDump Player InputGPS SensorIdeal RADAR SensorMesh SensorOBD EmulatorPlatooningPowertrain SensorRoads SensorTechCore Module ReferenceTrail SimTyre BarrierVehicle Points of InterestVehicle SearcherVehicle Systems CouplingWheel Forces
CAN Button BoxCAN Bus (PCAN)Project Bavaria ControllerProject Bavaria KombiProject Bavaria ShifterRacing Display

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceveextensionstechCANBus

CAN Bus (PCAN)

Interface to PEAK-System PCAN hardware for real CAN bus communication. Enables BeamNG to send and receive CAN frames through physical CAN adapters for hardware-in-the-loop testing.

Interface to PEAK-System PCAN hardware for real CAN bus communication. Enables BeamNG to send and receive CAN frames through physical CAN adapters for hardware-in-the-loop (HIL) testing with real automotive ECUs and instrument clusters.


Public API

VariableTypeDescription
canBusAPIuserdataHandle to the native PCAN API library.
PCANHandlestableMap of available PCAN channel handles (USB, PCI, etc.).
baudratestableSupported CAN baud rates (125k, 250k, 500k, 1M).
errorCodestablePCAN error code definitions.
messageTypetableCAN message type flags (standard, extended, RTR).
CANTypetableCAN protocol type identifiers.
errorCodeLookuptableReverse lookup for error code names.
isConnectedbooleanWhether a PCAN adapter is currently connected and initialized.

Hooks

HookDescription
onExtensionLoadedLoads the PCAN DLL and attempts to initialize the configured CAN channel.

Usage Example

-- Load the CAN bus extension
extensions.load("tech/CANBus/CANBusPeak")

-- Check connection status
if extensions.tech_CANBus_CANBusPeak.isConnected then
  log("I", "CAN", "PCAN adapter connected")
end

See Also

  • Button Box — CAN-connected button box controller
  • Project Bavaria Controller — BMW E39 CAN controller
  • Project Bavaria Kombi — BMW E39 instrument cluster
  • Racing Display — CAN-connected racing display
  • LIN Bus (PCAN) — LIN bus via PCAN hardware

CAN Button Box

Reads button inputs from a CAN-connected button box controller. Maps physical button presses to vehicle actions via CAN frames.

Project Bavaria Controller

CAN bus integration for a BMW E39 body controller. Reads and writes CAN frames to control real BMW hardware (windows, locks, mirrors) from BeamNG.

On this page

Public APIHooksUsage ExampleSee Also