This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <termios.h> | |
#import <time.h> | |
#import <sys/ioctl.h> | |
@implementation NSString(UCS2Encoding) | |
- (NSString*)ucs2EncodingString{ | |
NSMutableString *result = [NSMutableString string]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <termios.h> | |
#import <time.h> | |
#import <sys/ioctl.h> | |
//UCS2编码支持 | |
@implementation NSString(UCS2Encoding) | |
- (NSString*)ucs2EncodingString{ | |
NSMutableString *result = [NSMutableString string]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <termios.h> | |
#import <time.h> | |
#import <sys/ioctl.h> | |
NSString *sendATCommand(NSFileHandle *baseBand, NSString *atCommand){ | |
NSLog(@"SEND AT: %@", atCommand); | |
[baseBand writeData:[atCommand dataUsingEncoding:NSASCIIStringEncoding]]; | |
NSMutableString *result = [NSMutableString string]; | |
NSData *resultData = [baseBand availableData]; |