|
|
#1 |
|
NSString format & xtra characters
I'm trying to send an ASCII string with CRLF appended, to a device via a serial port.
Code:
NSString *sendString = [[inputTextField stringValue] stringByAppendingString:@"\n\r"];
//[inputTextField stringValue] is "AP1090;".
if([self.port isOpen]) { // in case an error occured while opening the port
[self.port writeString:sendString usingEncoding:NSUTF8StringEncoding error:NULL];
}
Code:
sendString __NSCFString * 0x0000000101917800@"AP1090;\n\r\x0e\x19\x10" The device is not responding. Last edited by dejo; Dec 21, 2012 at 12:54 PM. Reason: Please use [code] tags. |
|
|
|
0
|
«
Previous Thread
|
Next Thread
»
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
All times are GMT -5. The time now is 08:39 AM.







Threaded Mode