From: "Daniel Ribeiro" <drwyrm@gmail.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] [PATCH] BCM2035 on UART at higher speeds + Support for setting bdaddr.
Date: Fri, 22 Jun 2007 11:49:56 +0000 [thread overview]
Message-ID: <6669365c0706220449u1b7848a6j984c0ef00f0ebbf2@mail.gmail.com> (raw)
In-Reply-To: <6669365c0706210944m23ffe64kde10851d85edf3f0@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 142 bytes --]
2007/6/21, Daniel Ribeiro <drwyrm@gmail.com>:
> Sending again as Marcel requested.
Corrections as requested on IRC..
--
EOF
Daniel Ribeiro
[-- Attachment #2: bluez-bcm2035.patch --]
[-- Type: text/x-diff, Size: 1628 bytes --]
Correct baudrate parameters for bcm2035 on uart and set bdaddr.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Index: bluez-utils-3.10/tools/hciattach.c
===================================================================
--- bluez-utils-3.10.orig/tools/hciattach.c 2007-05-12 13:16:38.000000000 -0300
+++ bluez-utils-3.10/tools/hciattach.c 2007-06-21 18:42:07.000000000 -0300
@@ -951,6 +951,31 @@
return -1;
}
+ if (u->bdaddr != NULL) {
+ /* set bdaddr */
+ memset(cmd, 0, sizeof(cmd));
+ memset(resp, 0, sizeof(resp));
+ cmd[0] = HCI_COMMAND_PKT;
+ cmd[1] = 0x01;
+ cmd[2] = 0xfc;
+ cmd[3] = 0x06;
+
+ str2ba(u->bdaddr, (bdaddr_t *) (cmd + 4));
+
+ /* Send command */
+ if (write(fd, cmd, 10) != 10) {
+ fprintf(stderr, "Failed to write \"set bdaddr\" "
+ "command\n");
+ return -1;
+ }
+
+ /* Read reply */
+ if ((n = read_hci_event(fd, resp, 10)) < 0) {
+ fprintf(stderr, "Failed to set bdaddr\n");
+ return -1;
+ }
+ }
+
/* Read the local version info */
memset(cmd, 0, sizeof(cmd));
memset(resp, 0, sizeof(resp));
@@ -1010,11 +1035,11 @@
cmd[5] = 0xfa;
break;
case 460800:
- cmd[4] = 0x11;
+ cmd[4] = 0x22;
cmd[5] = 0xfd;
break;
case 921600:
- cmd[4] = 0x65;
+ cmd[4] = 0x55;
cmd[5] = 0xff;
break;
default:
@@ -1103,7 +1128,7 @@
{ "billionton", 0x0279, 0x950b, HCI_UART_BCSP, 115200, 115200, 0, NULL, bcsp },
/* Broadcom BCM2035 */
- { "bcm2035", 0x0A5C, 0x2035, HCI_UART_H4, 115200, 115200, 0, NULL, bcm2035 },
+ { "bcm2035", 0x0A5C, 0x2035, HCI_UART_H4, 115200, 460800, FLOW_CTL, NULL, bcm2035 },
{ NULL, 0 }
};
[-- Attachment #3: Type: text/plain, Size: 286 bytes --]
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
[-- Attachment #4: Type: text/plain, Size: 164 bytes --]
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
prev parent reply other threads:[~2007-06-22 11:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-21 16:44 [Bluez-devel] [PATCH] BCM2035 on UART at higher speeds + Support for setting bdaddr Daniel Ribeiro
2007-06-22 11:49 ` Daniel Ribeiro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6669365c0706220449u1b7848a6j984c0ef00f0ebbf2@mail.gmail.com \
--to=drwyrm@gmail.com \
--cc=bluez-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox