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.

Read the values I transmit (CC2540mini)

Hello,


I am trying to develop a device where I connect two CC2540mini (SLAVE has a modified SimpleBLEperipheral and MASTER SimpleBLECentral) where the SLAVE will get the values from the UART and then sent them to the MASTER.

When I use the SLAVE with the USB toggle, I get the values I want and the system works fine. The slave reads values and then sent them on the MASTER were I can read it on the BTool 1.4.0

Now, I want to do the same with two keyfobs.

I manage to connect them together but then I have the following problems:

1) I sent the GATT_WriteCharValue( 0x0000,&req,simpleBLETaskId ); from the host

with the following

 attWriteReq_t req;           
 req.handle = 0x0037;     
 req.len = 0x06;                
 req.value[2]=0x01,0x00;               
 req.sig = 0;       
 req.cmd = 0;  

Just like i am doing with the USB toggle. But I have no Idea whether this is set and I dont know how to test it.

2) The second is, my MASTER, goes in sleep as soon as it gets connected

3) I dont know how to read the HCI external event, were the values should be contained from the slave

PS1. The SimpleBleperipheral is only modified to:

a)read the values from UART,

b) Write its connection state (Discoverable, disconnected, Connected ) on an SPI LCD (not the official one)

c) Set it in discoverable as soon as power up

But I know that this one works as I want it because I can test it with the PC.

PS 2. The simple central Is modified for :

a) Connect to my SLAVE (MAC address is pre-set) when RIGHT button is pressed

c) Sent the GATT_WriteCharValue( 0x0000,&req,simpleBLETaskId )

b) Disconnect (DC) from slave when LEFT is pressed

Besides the point (a) which I know it works, the other two I don’t know whether is set ok or not. but I know that when press LEFT button it doesn’t DC because when I pause it I can see it goes in SLEEP as soon as it connects


Please advice,

Thanks in advance

Constantinos