I've been tinkering with the example given on https://github.com/aollin/racechrono-ble-diy-device
with RaceChrono PRO v6.4.1 for Android, and had some feedback/questions.
1) In my testing, RaceChrono always requests a "50 ms" notify interval.
If I correctly understand what it means, this results in a 20 Hz refresh rate.
In my limited testing, it seems that Bluetooth BLE on Bluefruit nRF52832 can easily support 40 Hz refresh rate for a significant number of channels if I just ignore the "notify interval" and notify() on "fake" updates repeatedly without waiting.
I wonder if the refresh rate should be a parameter in the UI?
What is the reason RaceChrono limits CAN updates to 20 Hz?
That arguably removes one of the advantages of listening to CAN over OBD-II.
What's the worst thing that can happen if my DIY device ignores the notify interval on the request and uses a "10 ms" notify interval instead?
2) Is one BLE characteristic 0x01 sufficient for data communication?
I'm not super familiar with Bluetooth BLE yet, or with how multiple updates are delivered when using notify().
What happens if the car sends 5 different "allowed" CAN messages 1 ms apart over and over?
With a 50 ms notify interval, we will notify() the characteristic 5 times with a 1 ms interval, and then do nothing for 45 ms.
Does it make the communication for the last CAN PID more reliable because its data is "exposed" for longer?
Or is there something that allows RaceChrono to see past value updates even if a new one came in shortly afterwards?
I wonder if it would be useful to have say 10 characteristics and update them in a round robin way, or something like that.
3) Strange requests in the "Vehicle profile" mode.
I've been looking at what commands RaceChrono sends via characteristic 0x02.
a) When I start a session, I get "DENY ALL", and then "ADD PID" for the set of enabled PIDs.
This makes sense. It's cool to see that RaceChrono is smart enough to only request the same PID once if it's shared by multiple channels.
b) When I enable "Test connection" in "Vehicle profile", I get "ALLOW ALL" — this makes sense, although not clear why you couldn't just reuse the same smart logic from the session mode.
c) When I open "Channel editor", I get TWO "ALLOW ALL" requests.
This is strange. I wonder if the intention was to send "DENY ALL" and one "ADD PID" afterwards, that would be a lot more efficient.
d) When I change the PID in "Channel editor", I get a "ALLOW ALL" request.
Again, if I change the PID, I'd expect to get "DENY ALL" followed by "ADD PID".
Interestingly, I get "ALLOW ALL" even if I hit the checkmark without changing the PID at all.