Oh, I'm sorry, after re-reading, you were looking for diagnostic requests. From memory, the ground points turned out to be critical for stream reliability.
Good on ya

Code: Select all
L: 33
H: 15 - SOF
L: 17
H: 7 -This is first bit (0)
L: 9
H: 15 -This is second bit (1)
L: 9
H: 15 -This is third bit (1)
L: 17
H: 7 -This is fourth bit (0)
L: 18
H: 6 -This is fifth bit (0)
L: 10
H: 15 -This is sixth bit (1)
L: 17
H: 7 -This is seventh bit (0)
L: 17
H: 7 -This is eighth bit (0)
Code: Select all
L: 31
H: 17 -SOF
L: 7
H: 17 -This is first bit (1)
L: 8
H: 16 -This is second bit (1)
L: 16
H: 8 -This is third bit (0)
L: 16
H: 8 -This is fourth bit (0)
L: 16
H: 9 -This is fifth bit (0)
L: 7
H: 17 -This is sixth bit (1)
L: 15
H: 9 -This is seventh bit (0)
L: 15
H: 9 -This is eighth bit (0)
Code: Select all
@IBAction func buttontouch(_ sender: Any) {
var inputStream: InputStream!
var outputStream: OutputStream!
var readStream: Unmanaged<CFReadStream>?
var writeStream: Unmanaged<CFWriteStream>?
CFStreamCreatePairWithSocketToHost(kCFAllocatorDefault,
"192.168.4.1" as CFString,
23,
&readStream,
&writeStream)
inputStream = readStream!.takeRetainedValue()
outputStream = writeStream!.takeRetainedValue()
inputStream.schedule(in: .current, forMode: .common)
outputStream.schedule(in: .current, forMode: .common)
inputStream.open()
outputStream.open()
let data = "ATI\r".data(using: .utf8)!
data.withUnsafeBytes {
guard let pointer = $0.baseAddress?.assumingMemoryBound(to: UInt8.self) else {
print("Error joining chat")
return
}
outputStream.write(pointer, maxLength: data.count)
}
Code: Select all
CFReadStream readStream ;
CFWriteStream writeStream;
CoreFoundation.CFReadStream.CreatePairWithSocketToHost("192.168.4.1", 23, out readStream, out writeStream);
NSInputStream InputStream = ObjCRuntime.Runtime.GetNSObject<NSInputStream>(readStream.Handle);
NSOutputStream OutputStream = ObjCRuntime.Runtime.GetNSObject<NSOutputStream>(writeStream.Handle);
InputStream.Schedule(NSRunLoop.Current, NSRunLoopMode.Common);
OutputStream.Schedule(NSRunLoop.Current, NSRunLoopMode.Common);
InputStream.Open();
OutputStream.Open();
byte[] buffer = Encoding.ASCII.GetBytes("ATI\r");
OutputStream.Write(buffer);
I feel ya bro. It seems anything Microcrap these days turns into a headacheTazzi wrote:Not having alot of luck recently with Maui!
So something is not being handled correctly through the API wrapper that Microsoft has.
To say it's frustrating, is an understatement.
Nah, our OBDX tools are a ST processor, so its using the inbuilt CDC protocol that android supports.MudDuck514 wrote:Hi all;
Tazzi, are you now using an FTDI USB Interface?
Or does the Android OS now include support for others?
Mike