Tool/software: Code Composer Studio
Hello,
I need to implement a bluetooth remote controller for automotive use. The requirements are low power consumption and fast connection time.
I am using simple_central and simple_peripheral examples. Both with the same cc2640r2 processor.
Simple_peripheral is operating correctly. It is sending advertising every 1s when disconnected. After being connected, the peripheral sends a notification each time a key is pressed. This uses a cr2032 battery.
The problem is in simple_central. The connection time is too long. The central takes 15 seconds to connect to the peripheral. After being connected everything works correctly.
The strange thing is that when I run the code with breakpoints I can't find where the software is stuck.
The software works as follows:
1. After executing "SimpleCentral_init", the software waits for "GAP_DEVICE_INIT_DONE_EVENT" and starts the FSM.
2. The software waits 1s and sends "SC_EVT_SCAN_ENABLED" Search time for 1s.
3. The software waits for SC_EVT_SCAN_DISABLED and SC_EVT_ADV_REPORT. The UUID filter is enabled.
4. If the variable "numScanRes" is greater than 0, the event SC_EVT_CONNECT_ENABLED is generated.
5. If the variable "numConn" is greater than 0, the search for new devices is ended.
If the peripheral is switched off and on again, the reconnection time is the same.
The software is probably waiting for the wrong events to make the connection request. Does anyone know what the error is?
And is this application model the most suitable for a remote control?
simplelink_cc2640r2_sdk_4_20_00_04
Regards