Main Site Documentation

Project - Bluetooth Driver for Bluetooth Bee (XBee) on Cerbuino and Gadgeteer


#1

I just posted Bluetooth Driver for Bluetooth Bee (XBee) on Cerbuino and Gadgeteer on Codeshare. Feel free to discuss and make suggestions here.


#2

realy good job…

can you explain the soldering and change of the pins a little bit more then in the
header ?

Daniel


#3

@ VB-Daniel -
Thank you daniel,
always not so easy for me to express things understandable in English.
Which signals do we need to control the Seeed Bluetooth Bee Module with the driver:

http://www.seeedstudio.com/wiki/Bluetooth_Bee#Connecting_to_Arduino_with_XBee_Shield

TX (Pin 2)
RX (Pin 3)
RST (Pin 5) to reset the module
PIO1 (Pin 6) to read the connect-state

Now we must distinguish, whether we use the Seeed Bluetooth Bee Module on the Cerbuino Bee XBee socket or on the XBee socket on the GHI-XBee-Adapter Module.

  1. Cerbuino Bee XBee Socket:

Which pins of the Cerbuino Bee XBee Socket are connected to the CPU?

Pin 2 (TX) - PC7/UART6_RX (for COM1 no change needed)
Pin 3 (RX) - PC6/UART6_TX (for COM1 no change needed)
Pin 5 (RST) - PB0/ADC12_IN8 (accessed as (Cpu.Pin)0x10 must be OutputPort)
Pin 6 (PIO1) - is not connected to the CPU.
Pin 9 (PCMIN) - XBEE_SLEEP_PC13 (accessed as (Cpu.Pin)0x2D)
not more Pins of the Cerbuino Bee XBee Socket are connected to the CPU

So we must disconnect Pin 9 of the the Seeed Bluetooth Bee (bend away or cut the pin, so that it is not plugged in the socket) from the socket and plug one end of a cable in the now free female connector of the socket and solder the other end of the cable on pin 6 (PIO1) of the Seeed Bluetooth Bee Module (see picture). Be careful and fix the cable with some glue to avoid shortcuts.

Now we can access the Pin 5 (RST) and Pin 6 (PIO1) in the driver with:

 
// Pin of Cerbuino Bee to reset the Seed Bluetooth Bee Module
const Cpu.Pin ResetPin = (Cpu.Pin)0x10;
this.reset = new OutputPort(ResetPin, true);
// Pin of Cerbuino Bee to read the connect-status of the bluetooth module
this.statusInt = new InterruptPort((Cpu.Pin)0x2D, false, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeBoth);
   
  1. GHI XBee-Adapter-Module:

Which pins of the Cerbuino Bee XBee Socket are connected to the CPU?

Pin 2 (TX) - Gadgeteer Socket Pin 5 (no change needed)
Pin 3 (RX) - Gadgeteer Socket Pin 4 (no change needed)
Pin 5 (RST) - Gadgeteer Socket Pin 3 (change in driver code needed)
Pin 6 (PIO1) - is not connected to the CPU via Gadgeteer socket.
Pin 21 (CTS) - Gadgeteer Socket Pin 7 (not used)
Pin 25 (RTS) - Gadgeteer Socket Pin 6

Since Pin 6 (PIO1) is not connected to the Gadgeteer Socket we must take one of the not needed two that are connected (CTS and RTS). I took RTS. Of course handshake can no longer be used.

So we must disconnect Pin 25 of the the Seeed Bluetooth Bee (Pin 16 of the XBee socket) (bend away or cut the pin, so that it is not plugged in the socket) from the socket and plug one end of a cable in the now free female connector of the socket and solder the other end of the cable on pin 6 (PIO1) of the Seeed Bluetooth Bee Module (see picture). Be careful and fix the cable with some glue to avoid shortcuts.

Now we can access the Pin 5 (RST) and Pin 6 (PIO1) in the driver with:

 
this.reset = GTI.DigitalOutputFactory.Create(socket, Socket.Pin.Three, false, this);
this.statusInt = GTI.InterruptInputFactory.Create(socket, Socket.Pin.Six, GTI.GlitchFilterMode.Off, GTI.ResistorMode.Disabled, GTI.InterruptMode.RisingAndFallingEdge, this);

   

#4

@ RoSchmi -
Thankx…

and it is not really easier to understand after retranslate the text :slight_smile:

Gruß Daniel