From: Andrew T. <and...@gm...> - 2007-06-23 22:33:06
|
Hi everybody, One "gotcha" I just discovered that I thought should be shared: I'm using a connex-bt with a breakout-gs, and I'd like to use the HWUART for communicating with another device. So I followed the instructions on the wiki and in Bruce Fortnam's Jan 9 2007 post, namely: 1) modify /etc/default/bluetooth, changing the HCI_ATTACH_TTY line: HCIATTACH_TTY=ttyS1 2) configure the GPIO pins: modprobe proc_gpio # BTUART on GP[42:45] echo AF1 in > /proc/gpio/GPIO42 echo AF2 out > /proc/gpio/GPIO43 echo AF1 in > /proc/gpio/GPIO44 echo AF2 out > /proc/gpio/GPIO45 # HWUART on GP[48:51] echo AF1 out > /proc/gpio/GPIO48 echo AF1 in > /proc/gpio/GPIO49 echo AF1 in > /proc/gpio/GPIO50 echo AF1 out > /proc/gpio/GPIO51 I wanted this to be the default on startup, so I put the GPIO commands into a new script called S25uarts in the /etc/init.d directory, so that the GPIO pins would get configured before the bluetooth script (S30bluetooth) ran. It turns out, however, that in S30bluetooth, when the following line executes: /sbin/modprobe gumstix-bluetooth the GPIO assignments for [42:45] get changed back to AF3. The workaround is simple: don't configure the GPIO pins before S30bluetooth; instead, configure them within S30bluetooth, immediately after the /sbin/modprobe gumstix-bluetooth command. Cheers, - Andrew Tinka |