TI E2E Community
Bluetooth® Low Energy Forum
Linux BLE scripts
at the wiki:
We can already find two python scripts which will ease minor TI's BLE solution tests under this operative system. The links are:
Thanks to everybody who has helped to this little experiment.
Please click the Verify Answer button on a post if it answers your question! :)
Im testing an aproach to the comunication with the cc2540, with the keyfob exactly (Mini Dev Kit), using python. The scripts in those links are fantastic, I really want to thank the developper for publishing them. I succeeded with the first script, however, I cannot get the LinuxHostTest2 to work.
I have flashed the hosTestRealease on the dongle and the SimplePeripheral to the keyfob
I can discover and connect to the device but I cannot receive data, and if I try to activate all the notifications the program crashes and write on console:
"WHAT!?! SHOULDNT HAPPEN!!!!"
I believe I am using the wrong profile on the KeyFob, that was not intended to be used with this script.
I want to make my own python script but first I wanted to see it works well, so if you could help me it would be great.
Thank you in advance,
I developed the first script and got in touch with the author of the second one. Unfortunately, I think the second one does not work nowadays but just because of the change in the handles TI applied some time ago. Check this link for related info:
And please feel free to upload an updated version of the second script if you succeed! :)
Yes, you were right. The problem is simply a wrong handle number for the Accelerometer Enable. Its easily fixed by changing the Handle value in the BTDevices.py, activateAccelerometer function, from \x21\x00 to \x33\x00.
I will upload this modified version to my files, in my TI account. I don't know where is the correct place to upload this, or if it would be enough just to add a note on the wiki page explaining this. What do you think is best?
Wow! Is it really THAT easy?
I did not wanted to change the code of another person but I do not think it is wrong to do a single modification... argh.
See you in 10 minutes.
PS: Everybody, the change has already been applied. If there are new modifications to be made, do not hesitate posting here. Bye!
looking for some help with this keyfob dev kit. had some questions for you. not sure how to send you a PM. please message me: email@example.com
thanks in advance
I am not a TI member and this is not my job so I do this for fun. I do not accept private messages, since I cannot guarantee I can help. I just try to.
So post around the forum and we'll try our best. TI guys are much better prepared than me.
Kindly add me as your friend in Ti.E2E forum and when ever you are posting queries , send a notification to me so that i can help you ,if i can.
May I ask the some code as below against red word.
I want add humidity for this script , how can I do?
Because more doc I cannot found.
def activateAccelerometer(self): #Write Command st = '\x01' #command st = st+'\x12\xFD' #0xFD12 (ATT_WriteReq) st = st+'\x07' #datalength st = st+self.connHandle #handle st = st+'\x00' #Signature off st = st+'\x00' #command off st = st+'\x33\x00' #CHANGED from \x21\x00! attribute Address st = st+'\x01' #AttrValue self.ser.write(st)
#wir setzen hier nur die bewegung in gang, HCIEvents wird den rest der pakete schicken parsen etc. def setUpXAccNotifications(self): st='\x01' #command st=st+'\x88\xFD' # 0xFD88 (GATT_DiscCharsByUUID) st=st+'\x08' #data length st=st+'\x00\x00' #connectionhandle st=st+'\x01\x00' #Starting handle st=st+'\xFF\xFF' #end handle st=st+'\xA3\xFF' #UUID we are searching for (X) self.ser.write(st) def setUpYAccNotifications(self): st='\x01' #command st=st+'\x88\xFD' # 0xFD88 (GATT_DiscCharsByUUID) st=st+'\x08' #data length st=st+'\x00\x00' #connectionhandle st=st+'\x01\x00' #Starting handle st=st+'\xFF\xFF' #end handle st=st+'\xA4\xFF' #UUID we are searching for (Y) self.ser.write(st) def setUpZAccNotifications(self): st='\x01' #command st=st+'\x88\xFD' # 0xFD88 (GATT_DiscCharsByUUID) st=st+'\x08' #data length st=st+'\x00\x00' #connectionhandle st=st+'\x01\x00' #Starting handle st=st+'\xFF\xFF' #end handle st=st+'\xA5\xFF' #UUID we are searching for (Z) self.ser.write(st)
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.