Hi Luca,

I believe the description is reversed regarding which driver is the newer 
one.

`mesa_modbus` is the **old driver**, while `hm2_modbus` is its **newer 
replacement**. This was also confirmed in the discussion of PR #3819:

* BsAtHome explicitly says that `mesa_modbus` should no longer be used and 
that users should move to `hm2_modbus`: [GitHub comment by BsAtHome]
(https://github.com/LinuxCNC/linuxcnc/pull/3819?utm_source=chatgpt.com#
issuecomment-3939278576)
* In a follow-up, BsAtHome states that the old driver “has been superseded” 
and describes `hm2_modbus` as the new driver with better data mapping, data 
types, translations, device initialization and timing control.
* andypugh then confirms: “Yes, mesa_modbus has been superseded, but it 
still works.” [GitHub PR #3819](https://github.com/LinuxCNC/linuxcnc/pull/
3819?utm_source=chatgpt.com)

So the order is:

**`mesa_modbus` → old / superseded**
**`hm2_modbus` → newer replacement**

Therefore, I think the proposal should be about deprecating/removing **`mesa
_modbus`**, not `hm2_modbus`.

I was also using `mesa_modbus` while working on my configuration, which is 
why I initially did not realize that it had already been superseded.


-- 
S pozdravem
Zdeněk Zdražil

---------- Původní e‑mail ----------
Od: Luca Toniolo <[email protected]>
Komu: EMC developers <[email protected]>, emc-users@
lists.sourceforge.net
Datum: 13. 8. 2026 9:29:05
Předmět: [Emc-users] Deprecating the old mesa_modbus / modcompile driver
"The Mesa hostmot2 tree currently carries two Modbus drivers. 

The older one lives in src/hal/drivers/mesa-hostmot2/modbus. You write a 
.mod file describing your device, run modcompile on it, and it generates 
and compiles a bespoke realtime component from mesa_modbus.c.tmpl for 
that device. Documented in docs/src/drivers/mesa_modbus.adoc and 
modcompile(1). 

The newer one is hm2_modbus, written to replace it. It is a single 
loadable driver configured with binary MBCCB files built by mesambccc(1), 
so there is no per-device compile step. Documented in hm2_modbus(9) and 
mesambccc(1). 

Keeping both has a concrete cost beyond the duplication. The old driver 
is the reason hostmot2-serial.h is an exported public header, which 
constrains work on the hostmot2 headers generally. The only other user is 
the mesa-pktgyro-test component, which is easy to adjust. 

So, two questions. 

To users: is anyone still running a mesa_modbus setup built with 
modcompile? If so, is there something it does for you that hm2_modbus 
does not, or is it simply that the configuration has not been migrated? 

To developers: any objection to deprecating the old driver now, with a 
note in the docs and a runtime warning, and removing it after a release? 

If there is a feature gap, I would rather hear it now and see it closed in 
hm2_modbus than remove something people depend on. 

-- 

*Luca Toniolo* 


_______________________________________________ 
Emc-users mailing list 
[email protected] 
https://lists.sourceforge.net/lists/listinfo/emc-users 
"
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to