From: Craig H. <cr...@gu...> - 2007-09-25 21:24:42
|
Attached code is what I wrote to insert into hciattach.c, and it's =20 licensed to you under the MIT license. The code's main entrypoint is =20= the gumstix() function, and it gets in there with u->init_speed set =20 to 115200. The code basically tries to probe the serial port at a =20 bunch of different speeds. At each speed, it tries to see if there's =20= a module there is recognizes, from the set {ROK104001, PBA31307, =20 PBA31308} which are the 3 modules we've ever used on gumstix boards =20 through time. The multi-speed probing is for 2 reasons: first the =20 various modules default to different baud rates, and second, the =20 PBAs' baud rate changes are non-volatile, so if you changed the speed =20= on the thing before, it'll still be changed next time you try to =20 initialize the h/w. Let me know if there's any part of the code which needs more =20 explanation. There are calls out to various helper functions and =20 references to some #define symbols, but those should all be pretty =20 self-explanatory if you have a bluetooth reference doc on hand. =EF=BF=BC C On Sep 25, 2007, at 1:03 AM, Nate W wrote: > Thanks, Craig, I really appreciate your offer. If you could send =20 > me a copy under the MIT license (http://en.wikipedia.org/wiki/=20 > MIT_license), that would be great. > > Is there a command I can send to the bluetooth device (and a =20 > response I can expect) before changing baud rates, just to verify =20 > that it's awake? I've not been able to get any sort of response =20 > from it yet so it would be great to have a way to at least verify =20 > that the PXA and PBA are talking to each other to begin with. > > Thanks again! > > On 9/19/07, Craig Hughes <cr...@gu...> wrote: > On Sep 18, 2007, at 10:45 PM, Nate W wrote: > > > Hi folks, > > > > I'm trying to get the verdex bluetooth module working under Windows > > CE, and I think the only thing I'm missing is the correct GPIO > > configuration. > > The settings I'm using now are: > > > > TX: GPIO 43, AF 2 > > RX: GPIO 42, AF 1 > > RTS: GPIO 44, AF 1 > > CTS: GPIO 45, AF 2 > > Reset: GPIO 12, AF 0 > > > > Are these correct? > > If by "AF0" you mean "GPIO mode" then yes. > > > Should the reset be set or cleared? > > clear to enter reset, set to exit reset. If you hold the module in > reset, it's powered down. > > > Is there anything else I'm missing? > > The PBA31307 and PBA31308 have some issues you need to be careful > with if you want to change the baud rate while talking to them. I > wrote code which I added to hciattach in linux's bluez-utils to deal > with detecting and setting those modules up; you probably don't want > to look at it under GPL license, but I'd be happy to give you a copy > of all the code I myself wrote under whatever other standard license > (BSD?) that can work for you. It's pretty well commented to explain > what it's doing and why. Let me know what license would work for > you, and I'll send it over. > > C > > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > > > > --=20 > Nate Waddoups > Redmond WA USA > http://www.natew.com/ <=3D=3D for nerds > http://www.featherforum.com/ <=3D=3D for birds > ----------------------------------------------------------------------=20= > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/=20 > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users |