To get Speeduino to send out the realtime data to your device connected on a Secondary Serial IO port you must send either an "A", an "n" or an "r" to it.
1. A "A" confirming the received instruction (sent as 0x41 in hex),
2. The port will then transmit the first 75 realtime data values from the list below.
The "A" command data set will not be changed or expanded upon and is maintained for legacy devices.
Designers of new devices are recommended to use the newer "n" command to enable use of any additonal realtime data available beyond the orignal 75 This command supports.
If you send an "n" to the Serial port it will reply with,
1. A "n" confirming the received instruction (sent as 0x6E in hex (110 in DEC) ).
2. A single hex byte ,this value is the type of "n" command about to be sent. In this case the value is 0x32 in Hex.
3. A single hex byte , this value is the number of data bytes the port will be transmitting next as part ofthe command. At the time of writing (23/02/2020) this is 0x4B (75 dec)
if you send an "r" to the port you must also send 6 further additional bytes immediately after the "r".
These are the Speeduino TS canID,
The r type command 0x30(48 in decimal),
A 2 byte offset and a 2 byte length. the offset is the position in the realtime list you want the data returned to start from and the 2 byte length is the number of bytes you want returned. the bytes are sent LSB first .
1. A "r" confirming the received instruction (send as 0x72 in hex).
2. The port will now transmit a single byte in hex ,this is the type of the "r" type command about to be sent,This confirms what was requested (this is typically 0x30).
3. The port will then transmit the realtime data requested starting at the byte position set by the offset value for the number of bytes set by the length value.
You set the Source Can address(this is the address of the remote device that you wish to source the data value from.This is not used in direct Serial3 connections), input start byte number,input parameter number of bytes according to the sensor being accessed. Once enabled and configured Speeduino will periodically poll for that device on Serial3
2. Followed by the Can input channel that the data will be placed into.
3. Then the Can address the data is to be sourced from(this is sent in two bytes LSB first). As your remote device is connected directly to the Serial3 port then you can ignore the Can Address.
3. Then the Can input channel (this is the channel number that Speeduino issued with the request.
4. Then send 8 bytes of data. The Data you wish to send should be placed in bytes 0 and 1 (LSB and MSB respectively)if the data is two bytes long or in byte 0 if it is only a single byte long .
The remote device upon hearing its ID requested will respond to the Speeduino(at the address that was sent in the outgoing packet) with the Can input channel and 8 bytes of data.It is recommended that the Data you wish to send is placed in bytes 0 and 1 (LSB and MSB respectively)if it is two bytes long or in byte 0 if it is only a single byte long, but the data can be placed in any of the data bytes(just ensure that Speeduino is configured to read those bytes in the config table above.
The value sent is readable in Tunerstudio using the CanIN gauges