0
我想從elm327設備接收數據。第7行中的 我收到AT+BRSF=24\r
字符串,而不是速度字符串。從elm327設備接收數據
1.private async Task<string> GetSpeed()
2. {
3. string retVal;
4. _dataWriter.WriteString("010D\r"); // send pid for speed information
5. await _dataWriter.FlushAsync();
6. await _dataReader.LoadAsync(30); // get answer
7. String Message = _dataReader.ReadString(11);
8. retVal = Message;
9. if (retVal.Contains('<'))
10. {
11. retVal.Substring(0, retVal.IndexOf("<"));
12. }
13. return retVal.Replace("\n", "");
14. }
我使用SDP藍牙協議:
PeerFinder.AlternateIdentities["Bluetooth:SDP"] = "{00001101-0000-1000-8000-00805F9B34FB}";