If you want to use it with Can-Utils check out our socket-can guide and the Can-Utils GitHub https://github.com/linux-can/can-utils to install this Linux program.
If you want to query the ECU, all you need to do is upload this scanner sketch to M2:
Another program you can use is CanCat; it's similar to RfCat. This gives you a powerful python interface to reverse engineer the CAN bus. https://github.com/atlas0fd00m/CanCat
Craig has a number of programs that are based around socketcan and should, in theory, work with the slcan interface possible with M2RET. Examples: ICSim, UDSim, CaringCaribou. I haven’t tested them with an M2 but I think we ought to do so as they provide some useful things we would otherwise lack. I know that CaringCaribou didn’t work well when I tried it with a GVRET device a few years ago but the situation might be different now.