Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

changing advertisement rate to 20ms for first 30 sec. on cc2540

$
0
0

I have developed an iphone app using Xcode which uses the connectBlue OLP425 module which includes the cc2540 chip.  I have everything working well; when the app is launched it pairs with the module (if in range and when it starts to advertise because of movement).  I get the battery level every 75ms and display it as well as other things happening in the app.  When the connection is lost the app does something and resets itself so that when the module comes back in range and moves it reconnects and start sending battery info etc.  I have most things working even when the app goes into the background.  

However if the app is in the background it will not connect to the bluetoothle module, nor will it reconnect if in the background.  I have read that the advertisement rate has to be around 20ms for the connection to be made.  I am not a coder.  I am a retired art teacher who has taught myself Xcode.  

My problem and question is how do I change the advertisement rate of the module?  I would like to have it advertise at 10 to 20 ms for the first 15 to 30 seconds and then slow way down to every 10 seconds (as long as it stays connected) just to get the battery level of the module.  The reason for this is that I saw in a stackoverflow forum that this worked to get the module to pair when iPhone was in background mode.

Can someone Please

1.  tell me what program I need to change the advertisement rate and the times constraints I have give.  I have the cc debugger kit and have windows xp on my mac.  I have downloaded smartRF Flash Programmer onto my computer and hooked everything up and I saw the cc2540 inside of smartRF Flash Programmer.  if this is what I need to use.  I am downloading SimpleBLEPeripheral app if I can use that.

2.  Explain to me how to go about using the correct interface software/hardware to accomplish this.  Sample code, tutorials with code, pictures, and or videos.  I am really at a loss.  

Thanks in advance to anyone that can help.


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>