Return-Path: Subject: Re: [Bluez-devel] rfcomm socket and rfcomm tty From: Marcel Holtmann To: BlueZ Mailing List In-Reply-To: References: Content-Type: text/plain Message-Id: <1104781933.8894.64.camel@pegasus> Mime-Version: 1.0 Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 03 Jan 2005 20:52:13 +0100 Hi, > int main(void) > { > int sock, client, alen; > struct sockaddr_rc addr; > > if (sock = socket(AF_BLUETOOTH, > SOCK_STREAM, BTPROTO_RFCOMM) < 0) { > perror("socket"); > exit(1); > } > > addr.rc_family = AF_BLUETOOTH; > bacpy(&addr.rc_bdaddr, BDADDR_ANY); > addr.rc_channel = htobs(CHANNEL); you don't need a byteswap here. The rc_channel is only uint8_t. Regards Marcel ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Bluez-devel mailing list Bluez-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bluez-devel