Hi Fede93,
that´s quite simple!
Since you already established a connection over OBD2, you just have to emulate the OBD2 commands.
The initialization is done by the adapter automatically.
All
control commands are called AT-commands.
You can find a little explanation
here.
If you have had to reconfigure something on your ScanM5X App, you have to do that in you solution as well.
Otherwise, you just have to initialize the connection and start sending requests:
ATZ \r
01 0C\rThis will reset the ELM327 and request the RPM. All PID´s can be seen
here. But not all of them are compatible with your bike.
The response will start with 41 (Which is the SID you´ve sent + 0x40) followed by two values A & B and a return \r>
From the PID List, you can use the equations and calc back the RPM (A * 256 + B) / 4.
That´s it

To force the adapter to use ISO9141 you can also set the protocol manually:
AT SP 5Good luck!