Skip to contentSkip to conversation

STLC2500 Baud Rate & Address Setting

PATCH In review Denis KENZIOR 2 participants 5 messages Mar 29, 2007 – Apr 2, 2007 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 STLC2500 Baud Rate & Address Setting

Marcel,

The following patch does two things:

- Adds support for setting the baud rate on the STLC2500.
- Adds another optional argument to hciattach for use with stlc2500/bgb2xx devices that require initialization of the bdaddr. Basically if you specify this option on the command line, the address specified will be used during stlc2500/bgb2xx initialization. Otherwise a default will be used. The manpage has been updated as well.

Let me know if there are any issues!

-Denis

Index: hciattach.8
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.8,v retrieving revision 1.4

hciattach.8 +11 -0
diff -u -5 -r1.4 hciattach.8
@@ -9,10 +9,11 @@
 .IR timeout \|]
 .I tty
 .IR type \||\| id
 .I speed
 .I flow
+.I bdaddr
 .SH DESCRIPTION
 .LP
 Hciattach is used to attach a serial UART to the Bluetooth stack as HCI
 transport interface.
 .SH OPTIONS
@@ -103,9 +104,19 @@
 .B flow
 set by default. To force no flow control use
 .B noflow
 instead.
 
+.TP
+.I bdaddr
+The 
+.I bdaddr
+specifies the Bluetooth Address to use.  Some devices (like the STLC2500) 
+do not store the Bluetooth address in hardware memory.  Instead it must 
+be uploaded during the initialization process.  If this argument
+is specified, then the address will be used to initialize the device.
+Otherwise, a default address will be used.
+
 .SH AUTHORS
 Written by Maxim Krasnyansky <[email protected]>
 .PP
 Manual page by Nils Faerber <[email protected]>

Index: hciattach.c
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.c,v retrieving revision 1.43

hciattach.c +108 -28

235 lines not on this page · raw message

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#1 lore raw

Hi Denis,

Quoted 10 lines

The following patch does two things:

- Adds support for setting the baud rate on the STLC2500.
- Adds another optional argument to hciattach for use with stlc2500/bgb2xx devices that require initialization of the bdaddr. Basically if you specify this option on the command line, the address specified will be used during stlc2500/bgb2xx initialization. Otherwise a default will be used. The manpage has been updated as well.

Let me know if there are any issues!

the patch looks good. However please swap these two:

        int  (*init) (int fd, struct uart_t *u, struct termios *ti);

+ char *bdaddr;

The callbacks should come always last in a structure.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#2 lore raw

Marcel,

Here's the modified patch.

-Denis

Quoted 26 lines · Marcel Holtmann

Hi Denis,

Quoted 10 lines

The following patch does two things:

- Adds support for setting the baud rate on the STLC2500.
- Adds another optional argument to hciattach for use with stlc2500/bgb2xx devices that require initialization of the bdaddr. Basically if you specify this option on the command line, the address specified will be used during stlc2500/bgb2xx initialization. Otherwise a default will be used. The manpage has been updated as well.

Let me know if there are any issues!

the patch looks good. However please swap these two:

        int  (*init) (int fd, struct uart_t *u, struct termios *ti);

+ char *bdaddr;

The callbacks should come always last in a structure.

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Index: hciattach.8
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.8,v retrieving revision 1.4

hciattach.8 +11 -0
diff -u -5 -r1.4 hciattach.8
@@ -9,10 +9,11 @@
 .IR timeout \|]
 .I tty
 .IR type \||\| id
 .I speed
 .I flow
+.I bdaddr
 .SH DESCRIPTION
 .LP
 Hciattach is used to attach a serial UART to the Bluetooth stack as HCI
 transport interface.
 .SH OPTIONS
@@ -103,9 +104,19 @@
 .B flow
 set by default. To force no flow control use
 .B noflow
 instead.
 
+.TP
+.I bdaddr
+The 
+.I bdaddr
+specifies the Bluetooth Address to use.  Some devices (like the STLC2500) 
+do not store the Bluetooth address in hardware memory.  Instead it must 
+be uploaded during the initialization process.  If this argument
+is specified, then the address will be used to initialize the device.
+Otherwise, a default address will be used.
+
 .SH AUTHORS
 Written by Maxim Krasnyansky <[email protected]>
 .PP
 Manual page by Nils Faerber <[email protected]>

Index: hciattach.c
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.c,v retrieving revision 1.43

hciattach.c +108 -28

235 lines not on this page · raw message

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#3 lore raw

Hi Denis,

Quoted 1 line

Here's the modified patch.

you need to change the order in the uart_t table, too.

Regards

Marcel

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#4 lore raw

Marcel,

Try #3.

-Denis

Quoted 12 lines · Marcel Holtmann

Hi Denis,

Quoted 1 line

Here's the modified patch.

you need to change the order in the uart_t table, too.

Regards

Marcel

Quoted 9 lines

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

Index: hciattach.8
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.8,v retrieving revision 1.4

hciattach.8 +11 -0
diff -u -5 -r1.4 hciattach.8
@@ -9,10 +9,11 @@
 .IR timeout \|]
 .I tty
 .IR type \||\| id
 .I speed
 .I flow
+.I bdaddr
 .SH DESCRIPTION
 .LP
 Hciattach is used to attach a serial UART to the Bluetooth stack as HCI
 transport interface.
 .SH OPTIONS
@@ -103,9 +104,19 @@
 .B flow
 set by default. To force no flow control use
 .B noflow
 instead.
 
+.TP
+.I bdaddr
+The 
+.I bdaddr
+specifies the Bluetooth Address to use.  Some devices (like the STLC2500) 
+do not store the Bluetooth address in hardware memory.  Instead it must 
+be uploaded during the initialization process.  If this argument
+is specified, then the address will be used to initialize the device.
+Otherwise, a default address will be used.
+
 .SH AUTHORS
 Written by Maxim Krasnyansky <[email protected]>
 .PP
 Manual page by Nils Faerber <[email protected]>

Index: hciattach.c
===================================================================
RCS file: /cvsroot/bluez/utils/tools/hciattach.c,v retrieving revision 1.43

hciattach.c +105 -27

232 lines not on this page · raw message

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel