4

I am a new user of Arduino (I have a Arduino Due) and also I am a new user of BLE112 (Bluegiga module 112)

My teacher told me to make the BLE112 advertisable and furthermore he told me to look for information about UART@115K. (The Ble112 he gave me came with wires already soldered to the selected pins: I'm assuming I only need to use those.)

PIN NUMBER [PIN NAME] for BLE112

    2         AVDD                    (Supply voltage 2-3.6V)
    3         AVDD                    (Supply voltage 2-3.6V)
    4        [P2_2]  DC- Debug clock  (DIGITAL I/O)
    5        [P2_1]  DD- Debug data   (DIGITAL I/O)
    9        VDD_USB                  (Supply voltage 2-3.6V)
    20        DVDD                    (Supply voltage 2-3.6V)
    23       [P0_5]  RXD(Rx)          (DIGITAL I/O)
    24       [P0_4]  TXD(TX)          (DIGITAL I/O)
    25       [P0_3]  RTS              (DIGITAL I/O)
    26       [P0_2]  CTS              (DIGITAL I/O)
    29        RESET
    30         GND

I put:

BLE pins [2,3,9,20]    to     3.3v pin of Arduino 
BLE pin  [30]          to     GND pin of Arduino 

Then I found a picture (attached at the bottom of this post) that describes that I should put CTS of BLE on RTS of Arduino and vice versa. Where is the CTS on an Arduino board? I think I have to program one of the Digital pins.

I tried some other connections. I put:

BLE pin 26(CTS)   to    Arduino random digital pin 32, and 
BLE pin 25(RTS)         Arduino random digital pin 34.

BLE pin 24(TX)          Arduino RX pin 0
BLE pin 23(RX)          Arduino TX pin 1

I didn't connect DC(Debug clock), DD(Debug data) and Reset on the BLE112.

So then I found some more info on the web that if I use USART than I should use a wake up pin which is by the default P0_0(??) more about that in this PDF. (Search wake_up)

Now I should mention sleep mode Ble112 (there are three kinds of it) and I believe that the one I am after is MODE 3 (that means that it consumes the minimum (power) of them all)

I found some example named UART@115K

UART@115k This example configures the BLE112 or BLE113 Bluetooth Smart module to expose the BGAPI protocol over UART interface with the following settings: 115200 bps, 8n1 and hardware flow control enabled. The power mode 3 is enabled in this example and the wake-up pin is configured to P0_0 pin (P0_0 button on DKBLE112 and DKBLE113). When the power mode 3 is enabled the device will not be able to receive commands or data over UART unless the wake-up pin is asserted.

The example uses UART in the pin configuration channel 1 and alternate 1, which is the configuration used in the DKBLE112 and DKBLE113 development kits. If you try this example with DKBLE112 or DKBLE113 make sure the UART interface is enabled and the device is NOT powered with a CR2032 battery as it’s not able to power up the level shifter or UART to USB converter.

This is also the factory default configuration for BLE112 and BLE113 Bluetooth Smart Modules.

Connection shown

Source: https://bluegiga.zendesk.com/entries/22412436

  • The PDF link seems broken... it gives me this error: Sivua ei löytynyt! which translate into Page not found. Good think I know Finnish! (Just kidding: Google Translate) – Anonymous Penguin Mar 20 '14 at 15:30
  • First off all I am a new user of this forum so I make a mistake.. the reason i culd not answer sonner was that i got sick... <br /> Here is that PDF dl.dropboxusercontent.com/u/65932667/… <br /> And some more abut BLE112 (if you want more literature you need to registrate on their website (it's for free) Links: Ble112 Datasheet dl.dropboxusercontent.com/u/65932667/BLE112_Datasheet.pdf Ble112 Modul dl.dropboxusercontent.com/u/65932667/BLE112_Module.pdf – FirstTimeUser Mar 25 '14 at 7:54
  • @FirsTime No problem. Three things that I should tell you: 1.) <br /> doesn't work in comments (like this here), 2.) Next time edit the link in. I changed it for you 3.) Some people might be offended if you call it a forum. It doesn't really matter, but since this site is a different setup, it's generally called a "Q&A Site." Just a minor detail... :) I'll look at the PDFs and see if I can find anything out. – Anonymous Penguin Mar 25 '14 at 20:30
2

The most popular way to establish communication between an Arduino (I've used a Duemilanove) and a BLE module (I've used BLE113 that's on a DKBLE113) is through UART.

UART is a two wire interface (don't forget the common GND) with one RX and one TX. You can use the SoftwareSerial library to define your communication object on the Arduino. In contrast, the BLE113 uses four. The additional two are RTS and CTS (Request To Send and Clear To Send).

However, you can configure the UART in two ways using hardware.xml:

  1. Go to the <usart > tag and set flow = "false". This "disengages" the RTS and CTS allowing a traditional two wire interface.
  2. Had you set flow = "true", you need to connect the RTS and CTS as well, which I had a big problem with, though the two are both digital.

Further, in hardware.xml, you need to disable sleep mode by including <sleep enable="false" /> within the <hardware> tag. This will solve all your problems. If you intend to use sleep mode, you need to skip the previous step and instead govern the module's mode through the P0_0 pin. Moreover, there are additional definitions to be included in hardware.xml, which are documented by BG. These work nicely for the BLE112 too.

In my exercise, I'd established communication at 9600 baud. It worked the same way when I increased it to 115200 baud (this is a plus in the BLE113).

| improve this answer | |
  • Software serial would be important for an ATmega328 based Arduino with only one hardware serial port already used for loading. The Arduino Due of the question appears to have multiple hardware ports. – Chris Stratton Jul 28 '14 at 14:13
0

To communicate with the Arduino, it is only necessary to connect the RX and TX pins between the module and the Arduino.

Source: http://www.mkroll.mobi/?page_id=386

| improve this answer | |
0

I would connect TX and RX to one of the 3 extra serial ports on the Due. Pins 0 and 1 are used for the USB-Serial communication

| improve this answer | |
0

Well I found another way how to make it work, you just need to put CTS from BLE on GND, and RTS open "in the air" and that's it!

You can see these on this link: https://bluegiga.zendesk.com/entries/23143152--REFERENCE-Using-or-bypassing-flow-control-with-UART-communication

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.