site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Hello In general command is the first and the second buckle ... After several tests it no longer works at all. Thank you for assistance. Sincerely Interface Protocol General definition Characters The DISTOTM plus5 also terminates the response with <cr><lf>. Definition: terminator <trm> = <cr><lf>. Input Every command consists of one or more characters and the terminator Examples: Function: Switch Laser on (pointing) or off Input: o<trm> Laser on p<trm> Laser off Output: ?<trm> or @Exxx<trm> /// Cordialement - Gilles @+ gillesrobert@free.fr _______________________________________________ Do not post admin requests to the list. They will be ignored. Bluetooth-dev mailing list (Bluetooth-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/bluetooth-dev/site_archiver%40lists.a... All characters of the ASCII-Code from 32 (0x20) up to 127 (0x7F) are permitted. A command is terminated with the control character <cr><lf> Carriage Return, Line Feed -> 13,10 (0x0D, 0x0A). - (BOOL)envoiSurDisto:(NSString *) message // @"o" { NSLog(@"le message en NSString : %@, taille %d, channel MTU = % i",message,[message length],(int)[mChannel getMTU]); BOOL ret ; unsigned longueur ; NSString * caractere = [[message stringByAppendingString:@"\r\n"] retain]; // NSData * Commande = [NSData dataWithData:[caractere dataUsingEncoding:NSASCIIStringEncoding]]; longueur = [Commande length]; ret = [mChannel writeSync:[Commande bytes] length:longueur]; NSLog(@"apres writeSync caractere = %@",caractere); NSLog(@"Resultat %d",ret); [Commande release]; return ret ; [mChannel setSerialParameters:9600 dataBits:8 parity:kBluetoothRFCOMMParityTypeNoParity stopBits:1]; Les Logs Citation: 2008-02-12 12:08:57.927 distotest[1117] le message en NSString : o, taille 1, channel MTU = 667 2008-02-12 12:08:57.935 distotest[1117] apres writeSync caractere = o 2008-02-12 12:08:57.935 distotest[1117] Resultat 0 This email sent to site_archiver@lists.apple.com