Problems with rfcomm event listener
site_archiver@lists.apple.com Delivered-To: bluetooth-dev@lists.apple.com Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=teuPu4qSmVayPj4733s0T1ICJMmhKcgzb0fTgoJfrX4/XISD4yliTD3GplJTDQuQweqaUI4rjw9LfKk2W1PGc31fpZ1r6S4EwqQJ6+O3be+7LNI+camdTMmxVhhJIAfmh9FKtxMBlgoaLcsrgoW176nHoNdr5tRMJFj3hqY0VLo= Hi! I want to do something like this, pseudo code: rfcommeventlistener() { on new Data event: data = event->u.data.dataPtr if ( data == 0xFA ) display ( " detection on sensor x") else if ( data == 0xFB ) display ( "detection on sensor y" ) } What I CAN do is, pseudo code again: rfcommeventlistener() { on new Data event: data = event->u.data.dataPtr display ( data ) } What should I do to get the comparation work? _______________________________________________ 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... We're building a robot in school and I'm writing a Carbon application in C++ to get and display data from the robot. I've successfully established a connection and I get data from the robot. We use the bluetooth rfcomm as a 8 bit serial cable. Everything works except the comparation between data and a constant. The data block pointed on by event->u.data.dataPtr seems to be somewhat random in size and not 8 bits as i expect (wrong?). This email sent to site_archiver@lists.apple.com
participants (1)
-
Erik Juto