Has anyone tried interfacing with the BLE112? I am trying to communicate with it through the MSP's UART (USCIA0), but am not receiving a response. Bluegiga provides a nice API to interface with the device (http://www.bluegiga.com/files/bluegiga/BLE%20shared/BLE_Stack_API_reference_v1.3.pdf) and all I am trying to do is send/receive a 'Hello'. This is done by transmitting 0x00000001 to the device, and it should respond with the same thing. I believe the default baud rate for the BLE112 is 115200, which is what I have configured the MSP to. As far as documentation for the BLE112 itself is concerned, there is not very much of it :(
Thanks!
I've got similar problem. My BLE112 module communicate with PC on UART (by adapter USB<->UART). I send comands by aplication BLEGUI. I flashed uartdemo project. When I send commands I don't receive any responce. I was able to comunicate with PC on USB, by I have to communicate on UART. Did you solve your problem and maybe coul you give me any advice?
I am facing the same issue. I can see the 'system boot' message coming from the module, but am trying to send the hello message and don't get a response.
I will post back if I figure it out.
Ok I got it to where I can talk to it - for me I had to turn off the sleeposc function (which is supposedly not permitted for the BLE112) and specify a wakeup pin. These don't seem to have to both be done, but this is what got me talking to it. A little playing with it should get you the right combination. I may post back when I get it all hammered out the right way, but this should at least get you going.
Here is my hardware.xml file
<?xml version="1.0" encoding="UTF-8" ?>
<hardware> <sleeposc enable="false" ppm="30" /> <usb enable="false" /> <txpower power="15" bias="5" /> <script enable="false" /> <usart channel="0" mode="uart" stop="high" start="low" stopbits="1" alternate="1" baud="57600" endpoint="api" flow="false" /> <port index="0" tristatemask="0" pull="down" /> <wakeup_pin enable="true" port="1" pin="0" /> <slow_clock enable="false" /></hardware>
Did you try it with USART 1 Alt. 2 (P1.7, P1.6, P1.5, P1.4 <-> RX, TX, RT, CT)?
I have just checked my USB<->UART adapter. When I use a terminal program (Realterm) to send any char I can observe process on oscilloscope, but when I send command from blegui I can see notthing. Did you have similar problem?
I'm facing the same problem.
It seem a problem related with the BL112 sleep mode.
In order to communicate with the module I have to assert the wakeup pin.... no good.
any advice?
Hello,
The "problem" is most likely that the you have the power mode (PM3) enabled in the hardware configuration. This can cause the BLE112 to go into PM3, from where you need to wake it up using a GPIO.
If you do not want this operation, you can also disable the PM3 from the hardware configuration and then the GPIO wake-up is not needed.
Regards,
-Mikko SavolainenBluegiga Technologies
I have a different Problem. I try to read an accelerometer via I2C. I already tried a lot to read it but I dont know where i have to put in the register Adress. I have the simple
call hardware_i2c_read(adress, length)(result, data_len, data_data) line where i dont know to put in my register adress. And the next problem i dont know how to enable the pull-up's on pin 1_6 and 1_7. It should be in the hardware.xml, but i dont know already. If anybody has an idea or better an example how to read and write to I2C sensors pls help....
Thanx a lot
Armin
Hello Armin,
Here's a code snipplet for you how to use the I2C and write a byte into a specific address:
# Write to address 128 one byte (0xf5). # written indicates how many bytes were successfully written. call hardware_i2c_write(128,1,"\xf5")(written)
You should not need to configure the I2C pins separately, just make sure UART or SPI are not configured for channel 1.
For more information, please have a look at the documentation on our web site.