armadsen / ORSSerialPort

Serial port library for Objective-C and Swift macOS apps
MIT License
751 stars 183 forks source link

Debug transmission #150

Closed jdelaune closed 2 years ago

jdelaune commented 4 years ago

Hi thanks for the great library.

I'm having issues with a particular serial device. Using CoolTerm or SwiftSerial I can send commands to it fine. However using ORSSerialPort it never works. I checked all the port settings and I've checked the raw data I pass to send() and its exactly what is sent using CoolTerm and SwiftSerial. So I'm wondering if something else is being sent as well in the internals, and how I can debug this? ORSSerialPort works fine with all other serial devices I've used it with in the past. It's just this one device which is a bit sensitive it seems.

Any pointers appreciated.

armadsen commented 4 years ago

Can you tell me details of the device? Also, does it just silently fail to send anything? Or does it send garbage? Something else?

jdelaune commented 4 years ago

It's a Tenma 72-2540 bench power supply. Just trying a simple example of sending OUT1 ascii encoded. Which should turn it on. send() returns true. Unfortunately the Tenma doesn't have anything for me to see what is happening which is why I wondered if I can debug what is being sent.

It might not be in the send command, it could be something which is sent or setup during open() I guess. I just know the device is very sensitive, send it something it's not expecting it will lock up :)

Thanks