aanon4 / BlueBasic

BASIC interpreter for CC2540 and CC2541 Bluetooth LE chips
https://gitlab.com/timwilkinson/BlueBasic
97 stars 55 forks source link

How do I install this? #1

Closed gregwinn closed 9 years ago

gregwinn commented 9 years ago

May be a stupid question but I would love to install and use this!

I have cloned the project but am not sure how to install or what to install...

gregwinn commented 9 years ago

Also note: I am on a mac.

aanon4 commented 9 years ago

I've not had chance to sit down and write the "Getting started" part of the Wiki - sorry about that. Assuming you have some CC2540/1 hardware and the TI CC Debugger to program it, you can use the TI SmartRF Flash Programmer app (free on their website) to program the appropriate target .hex file (in the HEX directory) onto the device. Once that's done, compile the Xcode BlueBasic Console program and, when you run that, you should see the device listed on the left side of the window (name will be BASIC#12 or some other number). Double click the name to connect.

Hope that's enough to get your started.

gregwinn commented 9 years ago

@aanon4 Great! That was perfect! I have connected to the cc2540 but when running the iBeacon example i am getting back "error"

10 REM A SIMPLE IBEACON SERVICE
20 DIM M(3)
30 REM MAJOR
40 M(0) = 0
50 REM MINOR
60 M(1) = 1
70 REM POWER
80 M(2) = 0XC8
90 ADVERT GENERAL
100 ADVERT CUSTOM "FF 4C 00 02 15" "74 27 8B DA B6 44 45 20 8F 0C 72 0E AF 05 99 35" "00 00" M "00"
110 ADVERT END
SAVE
AUTORUN ON
Error
OK

I may be doing something wrong? (Let me know if you want a separate ticket for this opened)

Also: Thanks for the quick feedback!

aanon4 commented 9 years ago

Much more likely my example is out of date. Let me check it out and update.

gregwinn commented 9 years ago

Very good, Another quick question. If i wanted to change the name and UUID, can i accomplish that with the program (If i can do you have an example??).

aanon4 commented 9 years ago

Just remove the SAVE line (bit of a hold over from when code was stored in RAM).

The UUID of the beacon is the string "74 27 8B DA B6 44 45 20 8F 0C 72 0E AF 05 99 35" which you can change for whatever you need. I'll update the example with a name.

gregwinn commented 9 years ago

Thank you very much, I am sure I will have more questions... Any place to give a donation??? :)

aanon4 commented 9 years ago

Ha :-) This is my "manager detox" project, so all for my own sanity.

gregwinn commented 9 years ago

Any way to "erase" what is on the chip using this? (Without using the TI Flashing tool)

aanon4 commented 9 years ago

Type "NEW"

gregwinn commented 9 years ago

Thank you! (Please let me know if you want any of the questions in separate tickets for other users)...

gregwinn commented 9 years ago

So far I am loving this BTW!

In the menu "File" I see two options (Load to Device & Upgrade Firmware)

Thus far I have been using a PC to flash the hex file you have provided using the TI Programmer... With one of the two options in the File menu can i do the same? Or will I alway need the TI Software to initially get the hex file to the chip? Can you tell me a little about what both of the menu options do?

aanon4 commented 9 years ago

Load to Device - sends a text file containing a BASIC program to the device. Upgrade Firmware - after you initially flash the hex file to the device, you may want to upgrade the BASIC later. You can do this from the console program (no cable required) using this option and using the .BIN file (rather than the .HEX file).