This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Ping to CC2540 Host Test App from Arduino?

Other Parts Discussed in Thread: CC2540

Hi TI Community:

I am unable to get a response from a CC2540. I would appreciate any assistance. Thanks, in advance.

I am building a new home entertainment system called Votsh Waves (Details at http://www.votsh.com). I have constructed a custom pc board that has an Atmel ATmega256RFR2 and CC2540. The CC2540 has the HostTestAPP installed. The pin connections are:

2540               ATmega256RFR2

37 P1_7 TX1 <--> PD3

38 P1_6 RX1  <--> PD2

I wrote a sketch in Arduino IDE as:

#include <Arduino.h>    // Arduino main libraries
#include <SPI.h>        // Serial Device Interface 
#include <Wire.h>       // TWI/I2C library for Wiring & Arduino

unsigned long time = 0;
int firsttime = 1;

void setup(){

  Serial1.begin( 115200 );
 
  Serial.begin( 115200 );

  time = millis();

}

void loop(){

  while ( Serial1.available() )
  {
    Serial.print( "Received " );
    byte data0 = Serial1.read();
    Serial.print( data0 );
    Serial.println( "." );
  }

  if ( firsttime )
  {
    firsttime = 0;
    Serial.println( "BLE Experiment Started" );
  }

  // Do this every 1 second
  if ( ( time + 2000 ) < millis() )
  {
    time = millis();

    Serial.println("Sending command");
    byte buf[] = { 0x01, 0x09, 0x10, 0x00 };
    Serial1.write(buf, 4);
  
  }  
}

I chose the commands (x01, x09, x10, x00) from notes I found at http://e2e.ti.com/support/wireless_connectivity/f/538/t/206742.aspx. These command bytes should return the board address, according to the forum page.

I download the sketch to the Arduino, open the Serial Monitor and see:

BLE Experiment Started
Sending command
Sending command
Sending command
Sending command

There is no response from the 2540.

Any assistance would be greatly appreciated. Thank you.

-Frank