├── firmware └── Blinky │ ├── CC2541DB │ ├── CC2541 │ │ └── .gitignore │ ├── buildConfig.cfg │ ├── settings │ │ ├── SimpleBLEPeripheral.dni │ │ ├── SimpleBLEPeripheral.cspy.bat │ │ ├── SimpleBLEPeripheral.wsdt │ │ └── SimpleBLEPeripheral.dbgdt │ ├── SimpleBLEPeripheral.eww │ ├── SimpleBLEPeripheral.ewd │ └── SimpleBLEPeripheral.dep │ └── Source │ ├── HM-10.h │ ├── BlinkyPeripheral.h │ ├── Macros.h │ ├── BlinkyPeripheral_Main.c │ ├── blinkyProfile.h │ ├── devinfoservice.h │ ├── OSAL_BlinkyPeripheral.c │ ├── blinkyProfile.c │ ├── BlinkyPeripheral.c │ └── devinfoservice.c ├── images ├── top.png ├── bottom.png ├── HM-10 Pins.ai ├── hm-10-back.jpg ├── hm-10-front.jpg └── hm-10-pinout.png ├── client-software ├── rssi-probe │ ├── rssiprobe.xcodeproj │ │ ├── xcuserdata │ │ │ └── nickwalker.xcuserdatad │ │ │ │ ├── xcdebugger │ │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ │ └── xcschemes │ │ │ │ └── xcschememanagement.plist │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcuserdata │ │ │ │ └── nickwalker.xcuserdatad │ │ │ │ ├── UserInterfaceState.xcuserstate │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── project.pbxproj │ ├── rssi-probe │ │ └── Images.xcassets │ │ │ ├── LaunchImage.launchimage │ │ │ └── Contents.json │ │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── classes │ │ ├── Images.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── AppDelegate.swift │ │ ├── Log.swift │ │ ├── AverageBuffer.swift │ │ ├── Base.lproj │ │ │ ├── LaunchScreen.xib │ │ │ └── Main.storyboard │ │ └── ViewController.swift │ └── rssiprobe Tests │ │ ├── Info.plist │ │ └── AverageBufferTests.swift └── README.md ├── hardware ├── README.md └── hm-10 breakout │ └── README.md ├── .gitignore └── README.md /firmware/Blinky/CC2541DB/CC2541/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | 3 | !.gitignore -------------------------------------------------------------------------------- /images/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/top.png -------------------------------------------------------------------------------- /images/bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/bottom.png -------------------------------------------------------------------------------- /images/HM-10 Pins.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/HM-10 Pins.ai -------------------------------------------------------------------------------- /images/hm-10-back.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/hm-10-back.jpg -------------------------------------------------------------------------------- /images/hm-10-front.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/hm-10-front.jpg -------------------------------------------------------------------------------- /images/hm-10-pinout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/images/hm-10-pinout.png -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/buildConfig.cfg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/firmware/Blinky/CC2541DB/buildConfig.cfg -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/xcuserdata/nickwalker.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /hardware/README.md: -------------------------------------------------------------------------------- 1 | ### Who are These Boards For? 2 | 3 | Two groups of people: Those wanting to get breadboard, quasi-UART-over-BLE through the modules’ firmware and those wanting a cheaper, more flexible alternative to TI's CC2541 dev kits. -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/project.xcworkspace/xcuserdata/nickwalker.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nickswalker/ble-dev-kit/HEAD/client-software/rssi-probe/rssiprobe.xcodeproj/project.xcworkspace/xcuserdata/nickwalker.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /firmware/Blinky/Source/HM-10.h: -------------------------------------------------------------------------------- 1 | #ifndef HM_10 2 | #define HM_10 3 | 4 | #define PIN0 P1_3 5 | #define PIN1 P1_2 6 | #define PIN2 P1_1 7 | #define PIN3 P1_0 8 | 9 | #define PIN4 P0_7 10 | #define PIN5 P0_6 11 | #define PIN6 P0_5 12 | #define PIN7 P0_4 13 | #define PIN8 P0_3 14 | #define PIN9 P0_2 15 | #define PIN10 P0_1 16 | #define PIN11 P0_0 17 | 18 | #endif /* HM-10 */ -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | CC2541/* 2 | CC2540/* 3 | 4 | # Xcode 5 | .DS_Store 6 | build/ 7 | *.pbxuser 8 | !default.pbxuser 9 | *.mode1v3 10 | !default.mode1v3 11 | *.mode2v3 12 | !default.mode2v3 13 | *.perspectivev3 14 | !default.perspectivev3 15 | *.xcworkspace 16 | !default.xcworkspace 17 | xcuserdata 18 | profile 19 | *.moved-aside 20 | DerivedData 21 | .idea/ 22 | # Pods - for those of you who use CocoaPods 23 | Pods 24 | -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/project.xcworkspace/xcuserdata/nickwalker.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /client-software/rssi-probe/rssi-probe/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "minimum-system-version" : "7.0", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "orientation" : "portrait", 11 | "idiom" : "iphone", 12 | "minimum-system-version" : "7.0", 13 | "subtype" : "retina4", 14 | "scale" : "2x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /client-software/README.md: -------------------------------------------------------------------------------- 1 | Client Software 2 | ==== 3 | 4 | RSSI Probe 5 | ------ 6 | 7 | An iOS app that displays the RSSI values of three devices. Load a profile that advertises at a regular interval onto some HM-10s and then code their UUIDs into the source. Experiment with interesting arrangements and configurations. Includes a useful CSV logging capability so you can work with the data. Just plug your device into iTunes when your done and copy the log from the applications pane. Note that the app will not compile in the simulator; CoreBluetooth requires an actual device. 8 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/BlinkyPeripheral.h: -------------------------------------------------------------------------------- 1 | #ifndef BLINKYPERIPHERAL_H 2 | #define BLINKYPERIPHERAL_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | // Simple BLE Peripheral Task Events 10 | #define SBP_START_DEVICE_EVT 0x0001 11 | #define SBP_PERIODIC_EVT 0x0002 12 | 13 | extern void BlinkyPeripheral_Init( uint8 task_id ); 14 | 15 | extern uint16 BlinkyPeripheral_ProcessEvent( uint8 task_id, uint16 events ); 16 | 17 | 18 | #ifdef __cplusplus 19 | } 20 | #endif 21 | 22 | #endif /* SIMPLEBLEPERIPHERAL_H */ 23 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/settings/SimpleBLEPeripheral.dni: -------------------------------------------------------------------------------- 1 | [DebugChecksum] 2 | Checksum=-385318432 3 | [Stack] 4 | FillEnabled=0 5 | OverflowWarningsEnabled=1 6 | WarningThreshold=90 7 | SpWarningsEnabled=1 8 | WarnLogOnly=1 9 | UseTrigger=1 10 | TriggerName=main 11 | LimitSize=0 12 | ByteLimit=50 13 | [CallStack] 14 | ShowArgs=0 15 | [Disassembly] 16 | MixedMode=1 17 | [Log file] 18 | LoggingEnabled=_ 0 19 | LogFile=_ "" 20 | Category=_ 0 21 | [TermIOLog] 22 | LoggingEnabled=_ 0 23 | LogFile=_ "" 24 | [Breakpoints] 25 | Bp0=_ "STD_CODE" "LogicalCode:0x2D7C1" 0 0 0 0 "" 0 "" 26 | Count=1 27 | [ChipconEmu] 28 | Stop timers on halt=0 29 | Leave target running=1 30 | [Aliases] 31 | Count=0 32 | SuppressDialog=0 33 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /client-software/rssi-probe/rssi-probe/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | us.nickwalker.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/xcuserdata/nickwalker.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | rssiprobe.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D423FA9D1A50D2E000AA51FB 16 | 17 | primary 18 | 19 | 20 | D4A36A7919DBB38D00648691 21 | 22 | primary 23 | 24 | 25 | D4A36A8E19DBB38D00648691 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | *Note*: I have ceased working on projects with the HM-10 and the CC2541. The difficulties of dealing with the IAR toolchain are too great. I now recommend [ARM mbed solutions](https://developer.mbed.org/platforms/Nordic-nRF51822/) if you intend to pursue developing a BLE peripheral. I am leaving the resources I was able to gather online in case someone has use for them, but I cannot provide support. 2 | 3 | BLE Dev Kit 4 | ==== 5 | 6 | Getting into low power Bluetooth peripheral prototyping can get expensive quickly. This project aims to chart out and the document the cheapest, easiest way to create a true, custom peripheral with its own profile. Head on over the [wiki](https://github.com/nickswalker/ble-dev-kit/wiki) to read more. 7 | 8 | Hardware 9 | ---- 10 | A sub ten dollar CC2541 development board based on the HM-10 module. This board is a fork of Ladvien's excellent work with the module. 11 | 12 | Firmware 13 | ---- 14 | On-board application and profile examples. 15 | 16 | Software 17 | ---- 18 | Client application examples (iOS). 19 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/Macros.h: -------------------------------------------------------------------------------- 1 | #ifndef BLE_MACROS 2 | #define BLE_MACROS 3 | 4 | #include "att.h" 5 | #include "gatt_uuid.h" 6 | 7 | #define BLE_PRIMARY_SERVICE(permissions, valuePtr) \ 8 | { \ 9 | { ATT_BT_UUID_SIZE, primaryServiceUUID }, \ 10 | permissions, \ 11 | 0, \ 12 | valuePtr \ 13 | } 14 | 15 | #define BLE_START_CHARACTERISTIC(description, permissions, valuePtr) \ 16 | /* description is unused intentionally, it's for code-readability at the call-site */ \ 17 | { { 2, characterUUID }, \ 18 | permissions, \ 19 | 0, \ 20 | valuePtr \ 21 | } 22 | 23 | #define BLE_CHARACTERISTIC_VALUE(permissions, uuid, valuePtr) \ 24 | { \ 25 | { 2, uuid }, \ 26 | permissions, \ 27 | 0, \ 28 | valuePtr \ 29 | } 30 | 31 | #define BLE_CHARACTERISTIC_CLIENT_CONFIG(permissions, valuePtr) \ 32 | { \ 33 | { 2, clientCharCfgUUID }, \ 34 | permissions, \ 35 | 0, \ 36 | valuePtr \ 37 | } 38 | 39 | #define BLE_CHARACTERISTIC_USER_DESCRIPTION(permissions, valuePtr) \ 40 | { \ 41 | { 2, charUserDescUUID }, \ 42 | permissions, \ 43 | 0, \ 44 | valuePtr \ 45 | } 46 | 47 | #endif /* BLE_MACROS */ -------------------------------------------------------------------------------- /firmware/Blinky/Source/BlinkyPeripheral_Main.c: -------------------------------------------------------------------------------- 1 | /* Hal Drivers */ 2 | #include "hal_types.h" 3 | #include "hal_key.h" 4 | #include "hal_timer.h" 5 | #include "hal_drivers.h" 6 | #include "hal_led.h" 7 | 8 | /* OSAL */ 9 | #include "OSAL.h" 10 | #include "OSAL_Tasks.h" 11 | #include "OSAL_PwrMgr.h" 12 | #include "osal_snv.h" 13 | 14 | /************************************************************************************************** 15 | * FUNCTIONS 16 | **************************************************************************************************/ 17 | 18 | /* This callback is triggered when a key is pressed */ 19 | void MSA_Main_KeyCallback(uint8 keys, uint8 state); 20 | 21 | int main(void) 22 | { 23 | /* Initialize hardware */ 24 | HAL_BOARD_INIT(); 25 | 26 | /* Initialze the HAL driver */ 27 | HalDriverInit(); 28 | 29 | /* Initialize NV system */ 30 | osal_snv_init(); 31 | 32 | /* Initialize the operating system */ 33 | osal_init_system(); 34 | 35 | /* Enable interrupts */ 36 | HAL_ENABLE_INTERRUPTS(); 37 | 38 | #if defined ( POWER_SAVING ) 39 | osal_pwrmgr_device( PWRMGR_BATTERY ); 40 | #endif 41 | 42 | /* Start OSAL */ 43 | osal_start_system(); // No Return from here 44 | 45 | return 0; 46 | } -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/SimpleBLEPeripheral.eww: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | $WS_DIR$\SimpleBLEPeripheral.ewp 6 | 7 | 8 | 9 | All 10 | 11 | SimpleBLEPeripheral 12 | CC2541 13 | 14 | 15 | SimpleBLEPeripheral 16 | CC2541DK-MINI Keyfob 17 | 18 | 19 | SimpleBLEPeripheral 20 | CC2541-OAD-ImgA 21 | 22 | 23 | SimpleBLEPeripheral 24 | CC2541-OAD-ImgB 25 | 26 | 27 | SimpleBLEPeripheral 28 | CC2541-OAD-Encrypted-ImgA 29 | 30 | 31 | SimpleBLEPeripheral 32 | CC2541-OAD-Encrypted-ImgB 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/blinkyProfile.h: -------------------------------------------------------------------------------- 1 | #ifndef BLINKYPROFILE_H 2 | #define BLINKYPROFILE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | // Profile Parameters 10 | #define BLINKYPROFILE_ON 0 // RW uint8 - Profile Characteristic 1 value 11 | 12 | // Simple Profile Service UUID 13 | #define BLINKYPROFILE_SERV_UUID 0xFFE0 14 | 15 | // Key Pressed UUID 16 | #define BLINKYPROFILE_ON_UUID 0xFFF1 17 | 18 | // Simple Keys Profile Services bit fields 19 | #define BLINKYPROFILE_SERVICE 0x00000001 20 | 21 | // Callback when a characteristic value has changed 22 | typedef void (*blinkyProfileChange_t)( uint8 paramID ); 23 | 24 | typedef struct 25 | { 26 | blinkyProfileChange_t pfnSimpleProfileChange; // Called when characteristic value changes 27 | } blinkyProfileCBs_t; 28 | 29 | 30 | extern bStatus_t BlinkyProfile_AddService( uint32 services ); 31 | extern bStatus_t BlinkyProfile_RegisterAppCBs( blinkyProfileCBs_t *appCallbacks ); 32 | extern bStatus_t BlinkyProfile_SetParameter( uint8 param, uint8 len, void *value ); 33 | extern bStatus_t BlinkyProfile_GetParameter( uint8 param, void *value ); 34 | 35 | 36 | #ifdef __cplusplus 37 | } 38 | #endif 39 | 40 | #endif /* SIMPLEGATTPROFILE_H */ 41 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | us.nickwalker.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIFileSharingEnabled 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UIRequiredDeviceCapabilities 32 | 33 | armv7 34 | 35 | UISupportedInterfaceOrientations 36 | 37 | UIInterfaceOrientationPortrait 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/devinfoservice.h: -------------------------------------------------------------------------------- 1 | #ifndef DEVINFOSERVICE_H 2 | #define DEVINFOSERVICE_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" 6 | { 7 | #endif 8 | 9 | /********************************************************************* 10 | * INCLUDES 11 | */ 12 | 13 | /********************************************************************* 14 | * CONSTANTS 15 | */ 16 | 17 | // Device Information Service Parameters 18 | #define DEVINFO_SYSTEM_ID 0 19 | #define DEVINFO_MODEL_NUMBER 1 20 | #define DEVINFO_SERIAL_NUMBER 2 21 | #define DEVINFO_FIRMWARE_REV 3 22 | #define DEVINFO_HARDWARE_REV 4 23 | #define DEVINFO_SOFTWARE_REV 5 24 | #define DEVINFO_MANUFACTURER_NAME 6 25 | #define DEVINFO_11073_CERT_DATA 7 26 | #define DEVINFO_PNP_ID 8 27 | 28 | // IEEE 11073 authoritative body values 29 | #define DEVINFO_11073_BODY_EMPTY 0 30 | #define DEVINFO_11073_BODY_IEEE 1 31 | #define DEVINFO_11073_BODY_CONTINUA 2 32 | #define DEVINFO_11073_BODY_EXP 254 33 | 34 | // System ID length 35 | #define DEVINFO_SYSTEM_ID_LEN 8 36 | 37 | // PnP ID length 38 | #define DEVINFO_PNP_ID_LEN 7 39 | 40 | extern bStatus_t DevInfo_AddService( void ); 41 | bStatus_t DevInfo_SetParameter( uint8 param, uint8 len, void *value ); 42 | extern bStatus_t DevInfo_GetParameter( uint8 param, void *value ); 43 | 44 | /********************************************************************* 45 | *********************************************************************/ 46 | 47 | #ifdef __cplusplus 48 | } 49 | #endif 50 | 51 | #endif /* DEVINFOSERVICE_H */ 52 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/settings/SimpleBLEPeripheral.cspy.bat: -------------------------------------------------------------------------------- 1 | @REM This batch file has been generated by the IAR Embedded Workbench 2 | @REM C-SPY Debugger, as an aid to preparing a command line for running 3 | @REM the cspybat command line utility using the appropriate settings. 4 | @REM 5 | @REM Note that this file is generated every time a new debug session 6 | @REM is initialized, so you may want to move or rename the file before 7 | @REM making changes. 8 | @REM 9 | @REM You can launch cspybat by typing the name of this batch file followed 10 | @REM by the name of the debug file (usually an ELF/DWARF or UBROF file). 11 | @REM 12 | @REM Read about available command line parameters in the C-SPY Debugging 13 | @REM Guide. Hints about additional command line parameters that may be 14 | @REM useful in specific cases: 15 | @REM --download_only Downloads a code image without starting a debug 16 | @REM session afterwards. 17 | @REM --silent Omits the sign-on message. 18 | @REM --timeout Limits the maximum allowed execution time. 19 | @REM 20 | 21 | 22 | "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\common\bin\cspybat" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\8051\bin\8051proc.dll" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\8051\bin\8051emu_cc.dll" %1 --plugin "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\8051\bin\8051bat.dll" --backend -B "--proc_core" "plain" "--proc_code_model" "banked" "--proc_nr_virtual_regs" "16" "--proc_pdata_bank_reg_addr" "0x93" "--proc_dptr_nr_of" "1" "--proc_codebank_reg" "0x9F" "--proc_codebank_start" "0x8000" "--proc_codebank_end" "0xFFFF" "--proc_codebank_mask" "0xFF" "--proc_data_model" "large" "-p" "C:\Program Files (x86)\IAR Systems\Embedded Workbench 6.5\8051\config\devices\Texas Instruments\ioCC2541F256.ddf" "--proc_exclude_exit_breakpoint" "--proc_driver" "chipcon" "--erase_flash" "--verify_download" "use_crc16" "--stack_overflow" "--number_of_banks" "4" 23 | 24 | 25 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | 3 | @UIApplicationMain 4 | class AppDelegate: UIResponder, UIApplicationDelegate { 5 | 6 | var window: UIWindow? 7 | 8 | func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject:AnyObject]?) -> Bool { 9 | // Override point for customization after application launch. 10 | return true 11 | } 12 | 13 | func applicationWillResignActive(application: UIApplication) { 14 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 15 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 16 | } 17 | 18 | func applicationDidEnterBackground(application: UIApplication) { 19 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 20 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 21 | } 22 | 23 | func applicationWillEnterForeground(application: UIApplication) { 24 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 25 | } 26 | 27 | func applicationDidBecomeActive(application: UIApplication) { 28 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 29 | } 30 | 31 | func applicationWillTerminate(application: UIApplication) { 32 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 33 | } 34 | 35 | 36 | } 37 | 38 | -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe Tests/AverageBufferTests.swift: -------------------------------------------------------------------------------- 1 | import rssiprobe 2 | import UIKit 3 | import XCTest 4 | 5 | class AverageBufferTests: XCTestCase { 6 | private var buffer = AverageBuffer(bufferSize: 10) 7 | override func setUp() { 8 | super.setUp() 9 | buffer = AverageBuffer(bufferSize: 10) 10 | // Put setup code here. This method is called before the invocation of each test method in the class. 11 | } 12 | 13 | override func tearDown() { 14 | // Put teardown code here. This method is called after the invocation of each test method in the class. 15 | super.tearDown() 16 | } 17 | 18 | func testAverage() { 19 | XCTAssertNil(buffer.average, "Average should be nil when buffer is empty") 20 | buffer.add(100) 21 | XCTAssertEqual(buffer.average!, 100.0, "Average should be 50.0") 22 | buffer.add(50) 23 | XCTAssertEqual(buffer.average!.distanceTo(75.0), 0) 24 | buffer.add(100) 25 | XCTAssertLessThan(buffer.average!.distanceTo(250.0 / 3), 0.0001) 26 | } 27 | 28 | func testAveragingZero() { 29 | buffer.add(100) 30 | buffer.add(10) 31 | buffer.add(0) 32 | XCTAssertEqual(0.0, buffer.average!.distanceTo(110.0 / 3.0)) 33 | } 34 | 35 | func testNegativeAveraging() { 36 | buffer.add(-60) 37 | buffer.add(-50) 38 | buffer.add(-40) 39 | XCTAssertEqual(buffer.average!, -50.0) 40 | } 41 | 42 | func testContinuousBuffering() { 43 | for var i = 1; i < 11; i++ { 44 | buffer.add(i) 45 | } 46 | //Buffer should average 89...99 47 | XCTAssertLessThan(buffer.average!.distanceTo(5.5), 0.00001) 48 | } 49 | 50 | 51 | func testBufferRemovingExcess() { 52 | for var i = 0; i < 10; i++ { 53 | buffer.add(0) 54 | } 55 | buffer.add(10) 56 | XCTAssertEqual(buffer.average!, 1.0, "Buffer should remove a zero and add a ten") 57 | 58 | for var i = 0; i < 9; i++ { 59 | buffer.add(10) 60 | } 61 | 62 | XCTAssertEqual(buffer.average!, 10.0, "Buffer should remove all zero and have all tens") 63 | 64 | for var i = 0; i < 10; i++ { 65 | buffer.add(0) 66 | } 67 | XCTAssertEqual(buffer.average!, 0.0, "Buffer should remove all tens") 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /hardware/hm-10 breakout/README.md: -------------------------------------------------------------------------------- 1 | HM-10 Breakout Board 2 | ==================== 3 | 4 | 5 | 6 | 7 | This is a slight modification of [Ladvien's board](https://github.com/Ladvien/HM-10). This version has more accurate pin notations and removes routes to unused pins on the HM-10, thereby shrinking the overall footprint of the board. 8 | The HM-10's on board TI CC2541 is fully programmable with CC-Debugger or SmartRF04EB. See this repo's [wiki](https://github.com/nickswalker/HM-10-breakout-board/wiki) for more resources. 9 | 10 | 11 | ## Bill of Materials 12 | 13 | If you are planning on ordering the PCB through OSHPark, keep in mind that you will receive three copies. You may want to go ahead and order three times as many components. Digi-Key numbers are provided as a courtesy; check eBay or any other preferred supplier for better pricing. As long as the component matches the packaging a specifications, it should be fine. 14 | 15 | At a bare minimum, the PCB and the HM-10 module are required. If you want to use UART but only have the capability of providing 5v, you will want to populate the level conversion components. However, this is /grossly/ inefficient and defeats the purpose of using a low power connection technology. Bridge the solder jumper to bypass the regulator circuit. You may consider simply regulating off board for development, using a cheap level converter like [this one](http://www.ebay.com/itm/1PC-New-5V-3V-IIC-UART-Level-Converter-Module-Adapter-4-Way-For-Arduino-/251384699933?pt=LH_DefaultDomain_0&hash=item3a87b21c1d). 16 | 17 | Part (Digi-Key #) | Quantity | Optional (Required For) 18 | :---------------- | :-------:| :---------------------- 19 | [Breakout PCB](https://oshpark.com/shared_projects/A6hoH6Fi) | 1 | No 20 | [HM-10 Module](http://www.fasttech.com/products/0/10004051/1292002-ti-cc2540-bluetooth-40-ble-2540-transparent-serial) | 1 | No 21 | [0805 20kΩ Resistor](http://www.digikey.com/product-detail/en/RMCF0805JT20K0/RMCF0805JT20K0CT-ND/1942580) (RMCF0805JT20K0CT-ND) | 1 | Yes (UART level conversion) 22 | [0805 10kΩ Resistor](http://www.digikey.com/product-detail/en/RMCF0805FT10K0/RMCF0805FT10K0DKR-ND/1943341) (RMCF0805FT10K0CT-ND) | 3 | Yes (UART level conversion) 23 | [0603 LED](http://www.digikey.com/product-detail/en/LTST-C191KRKT/160-1447-1-ND/386836) (160-1447-1-ND) | 1 | Yes (LEDs) 24 | [0603 LED (>3v drop)](http://www.digikey.com/product-detail/en/APT1608QBC%2FD/754-1434-1-ND/2163792) (754-1434-1-ND) | 2 | Yes (LEDs) 25 | [0805 470Ω Resistor](http://www.digikey.com/product-detail/en/RMCF0805JG470R/RMCF0805JG470RCT-ND/4425246) (RMCF0805JG470RCT-ND) | 3 | Yes (LEDs) 26 | [SOT-23 MCP1700 Voltage Regulator](http://www.digikey.com/product-detail/en/MCP1700T-3302E%2FTT/MCP1700T3302ETTCT-ND/652677) (MCP1700T3302ETTCT-ND) | 1 | Yes (voltage regulator) 27 | [0805 1uF Capacitor](http://www.digikey.com/product-detail/en/JMK105BJ105KV-F/587-1231-1-ND/931008) (587-1231-1-ND) | 1 | Yes (Voltage regulator) 28 | 29 | The silkscreen doesn't include values, so be sure to have it open in front of you while you assemble. 30 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/Log.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import UIKit 3 | 4 | typealias LogEntry = (date:NSDate, rssi:Int) 5 | 6 | 7 | class Log { 8 | //Key is a device UUID, stores a tuple of the date and the RSSI 9 | private var log = Dictionary() 10 | private let dateFormatString = "MM-dd-yyyy HHmmss" 11 | 12 | func getDocumentsDirectory() -> String { 13 | return NSSearchPathForDirectoriesInDomains(.DocumentDirectory, .UserDomainMask, true)[0] as String 14 | } 15 | 16 | func logToString() -> (String) { 17 | let dateFormatter = NSDateFormatter() 18 | dateFormatter.dateFormat = dateFormatString 19 | var logString = "" 20 | for (uuid, events) in log { 21 | logString += "\(uuid)\n"; 22 | for logEvent in events { 23 | logString += "\(dateFormatter.stringFromDate(logEvent.date)) \(logEvent.rssi) \n" 24 | } 25 | } 26 | return logString 27 | } 28 | 29 | func logToCSVStringWithoutTime() -> (String) { 30 | var rows: [String] = [] 31 | 32 | for (uuid, events) in log { 33 | //Add the uuid as the column header 34 | if 0 == rows.endIndex { 35 | rows.append("\(uuid),") 36 | } else { 37 | rows[0] += "\(uuid)," 38 | } 39 | for var i = 0; i < events.count; i++ { 40 | if i + 1 < rows.count { 41 | rows[i + 1] += "\(events[i].rssi.description)," 42 | } else { 43 | rows.append("\(events[i].rssi.description),") 44 | } 45 | } 46 | } 47 | 48 | var logString = "" 49 | for row in rows { 50 | logString += "\(row.substringToIndex(row.endIndex.predecessor()))\n" 51 | } 52 | return logString 53 | } 54 | 55 | func getMaxNumberOfEntries() -> Int { 56 | var max = 0; 57 | for (uuid, events) in log { 58 | max = (events.count > max) ? events.count : max 59 | } 60 | return max; 61 | } 62 | 63 | func addToLog(uuid: String, timeStamp: NSDate, rssi: Int) { 64 | //If the log array doesn't exist for this device, 65 | //make it. 66 | if log[uuid] == nil { 67 | log[uuid] = [] 68 | } 69 | let arrayForUUID = log[uuid] 70 | log[uuid]!.append(date: timeStamp, rssi: rssi) 71 | 72 | } 73 | 74 | func saveLogToFile(name: String) { 75 | let dateFormatter = NSDateFormatter() 76 | dateFormatter.dateFormat = dateFormatString 77 | let logString = logToCSVStringWithoutTime() 78 | println(logString) 79 | let documentsDirectory = getDocumentsDirectory() 80 | var fileName = dateFormatter.stringFromDate(NSDate()) 81 | fileName += " \(name).csv" 82 | let path = documentsDirectory.stringByAppendingPathComponent(fileName) 83 | println(path) 84 | logString.writeToFile(path, atomically: true, encoding: NSUTF8StringEncoding, error: nil) 85 | 86 | clearLog() 87 | } 88 | 89 | func clearLog() { 90 | log = Dictionary() 91 | } 92 | } -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/AverageBuffer.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | //Add to the front. Supports up to constant limit, then removes from the back. 4 | //Once it contains bufferSize elements, it is guranteed to contain exactly bufferSize items for the rest of its life 5 | //Supports fast averaging 6 | 7 | public class AverageBuffer { 8 | let bufferSize: Int 9 | private var list = LinkedList() 10 | public var average: Double? 11 | 12 | public init(bufferSize: Int) { 13 | self.bufferSize = bufferSize 14 | } 15 | 16 | public func add(value: Int) { 17 | list.prepend(value) 18 | if list.size == 1 { 19 | average = Double(list.head!.value) 20 | } else if list.size > bufferSize { 21 | let removed = list.removeLast()! 22 | let change = Double(removed.value) / Double(bufferSize) 23 | average! -= change 24 | average! += Double(value) / Double(bufferSize) 25 | } else if list.size <= bufferSize { 26 | let oldComponent = average! * Double(list.size - 1) / Double(list.size) 27 | let newComponent = Double(value) / Double(list.size) 28 | average = oldComponent + newComponent 29 | } 30 | 31 | 32 | } 33 | } 34 | 35 | private class LinkedList { 36 | var head: LinkedListNode? 37 | private var tail: LinkedListNode? 38 | var size: Int = 0 39 | 40 | init() { 41 | 42 | } 43 | 44 | init(value: V) { 45 | //Prepend, append, for the first, it doesn't matter 46 | append(value) 47 | } 48 | 49 | func prepend(value: V) { 50 | size++ 51 | let nextNode = head 52 | head = LinkedListNode(value: value, next: nextNode, prev: nil) 53 | handleSingleton() 54 | } 55 | 56 | func append(value: V) { 57 | size++ 58 | let prevNode = tail 59 | tail = LinkedListNode(value: value, next: nil, prev: prevNode) 60 | 61 | handleSingleton() 62 | } 63 | 64 | func removeLast() -> (LinkedListNode?) { 65 | size-- 66 | let removed = tail 67 | tail = removed!.prev 68 | tail!.next = nil 69 | handleSingleton() 70 | return removed 71 | } 72 | 73 | func removeFirst() -> (LinkedListNode?) { 74 | size-- 75 | let removed = head 76 | head = removed!.next 77 | head!.prev = nil 78 | handleSingleton() 79 | return removed 80 | } 81 | 82 | private func handleSingleton() { 83 | if size == 1 { 84 | if tail != nil { 85 | head = tail 86 | } else { 87 | tail = head 88 | } 89 | } 90 | } 91 | } 92 | 93 | private class LinkedListNode { 94 | var value: V 95 | var next: LinkedListNode? 96 | var prev: LinkedListNode? 97 | init(value: V, next: LinkedListNode?, prev: LinkedListNode?) { 98 | self.value = value 99 | self.next = next 100 | self.prev = prev 101 | if next != nil { 102 | self.next!.prev = self 103 | } 104 | if prev != nil { 105 | self.prev!.next = self 106 | } 107 | } 108 | } -------------------------------------------------------------------------------- /firmware/Blinky/Source/OSAL_BlinkyPeripheral.c: -------------------------------------------------------------------------------- 1 | #include "hal_types.h" 2 | #include "OSAL.h" 3 | #include "OSAL_Tasks.h" 4 | #include "hal_drivers.h" 5 | #include "ll.h" 6 | #include "hci_tl.h" 7 | 8 | #if defined ( OSAL_CBTIMER_NUM_TASKS ) 9 | #include "osal_cbTimer.h" 10 | #endif 11 | 12 | #include "l2cap.h" 13 | 14 | #include "gap.h" 15 | #include "gapgattserver.h" 16 | #include "gapbondmgr.h" 17 | 18 | #include "gatt.h" 19 | 20 | #include "gattservapp.h" 21 | #include "peripheral.h" 22 | #include "BlinkyPeripheral.h" 23 | 24 | /********************************************************************* 25 | * GLOBAL VARIABLES 26 | */ 27 | 28 | // The order in this table must be identical to the task initialization calls below in osalInitTask. 29 | const pTaskEventHandlerFn tasksArr[] = 30 | { 31 | LL_ProcessEvent, // task 0 32 | Hal_ProcessEvent, // task 1 33 | HCI_ProcessEvent, // task 2 34 | #if defined ( OSAL_CBTIMER_NUM_TASKS ) 35 | OSAL_CBTIMER_PROCESS_EVENT( osal_CbTimerProcessEvent ), // task 3 36 | #endif 37 | L2CAP_ProcessEvent, // task 4 38 | GAP_ProcessEvent, // task 5 39 | GATT_ProcessEvent, // task 6 40 | SM_ProcessEvent, // task 7 41 | GAPRole_ProcessEvent, // task 8 42 | GAPBondMgr_ProcessEvent, // task 9 43 | GATTServApp_ProcessEvent, // task 10 44 | BlinkyPeripheral_ProcessEvent // task 11 45 | }; 46 | 47 | const uint8 tasksCnt = sizeof( tasksArr ) / sizeof( tasksArr[0] ); 48 | uint16 *tasksEvents; 49 | 50 | /********************************************************************* 51 | * FUNCTIONS 52 | *********************************************************************/ 53 | 54 | /********************************************************************* 55 | * @fn osalInitTasks 56 | * 57 | * @brief This function invokes the initialization function for each task. 58 | * 59 | * @param void 60 | * 61 | * @return none 62 | */ 63 | void osalInitTasks( void ) 64 | { 65 | uint8 taskID = 0; 66 | 67 | tasksEvents = (uint16 *)osal_mem_alloc( sizeof( uint16 ) * tasksCnt); 68 | osal_memset( tasksEvents, 0, (sizeof( uint16 ) * tasksCnt)); 69 | 70 | /* LL Task */ 71 | LL_Init( taskID++ ); 72 | 73 | /* Hal Task */ 74 | Hal_Init( taskID++ ); 75 | 76 | /* HCI Task */ 77 | HCI_Init( taskID++ ); 78 | 79 | #if defined ( OSAL_CBTIMER_NUM_TASKS ) 80 | /* Callback Timer Tasks */ 81 | osal_CbTimerInit( taskID ); 82 | taskID += OSAL_CBTIMER_NUM_TASKS; 83 | #endif 84 | 85 | /* L2CAP Task */ 86 | L2CAP_Init( taskID++ ); 87 | 88 | /* GAP Task */ 89 | GAP_Init( taskID++ ); 90 | 91 | /* GATT Task */ 92 | GATT_Init( taskID++ ); 93 | 94 | /* SM Task */ 95 | SM_Init( taskID++ ); 96 | 97 | /* Profiles */ 98 | GAPRole_Init( taskID++ ); 99 | GAPBondMgr_Init( taskID++ ); 100 | 101 | GATTServApp_Init( taskID++ ); 102 | 103 | /* Application */ 104 | BlinkyPeripheral_Init( taskID ); 105 | } 106 | 107 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/Base.lproj/LaunchScreen.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 20 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/settings/SimpleBLEPeripheral.wsdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | SimpleBLEPeripheral/CC2541 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 389272727 16 | 17 | 18 | 19 | 20 | 21 | 22 | 45274072091524461 23 | 24 | 4487364 25 | 26 | 27 | 28 | 29 | 30 | 31 | TabID-32092-17754 32 | Workspace 33 | Workspace 34 | 35 | 36 | SimpleBLEPeripheralSimpleBLEPeripheral/APPSimpleBLEPeripheral/HALSimpleBLEPeripheral/INCLUDESimpleBLEPeripheral/LIBSimpleBLEPeripheral/PROFILESSimpleBLEPeripheral/TOOLS 37 | 38 | 39 | 40 | 0TabID-27120-17684BuildBuild0 41 | 42 | 43 | 44 | 45 | 46 | TextEditor$WS_DIR$\..\..\Profiles\DevInfo\devinfoservice.c000003900TextEditor$WS_DIR$\..\Source\devinfoservice.c00000130544454441TextEditor$WS_DIR$\..\Source\SimpleBLEPeripheral_Main.c000000841841TextEditor$WS_DIR$\..\Source\simpleBLEPeripheral.c00000252996999690100000010000001 47 | 48 | 49 | 50 | 51 | 52 | 53 | iaridepm.enu1debuggergui.enu1-2-2980484-2-22632941369792859922531259552530021-2-2527407756198200200104167194553104167194553 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/settings/SimpleBLEPeripheral.dbgdt: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 300Build201221 10 | 11 | 12 | 13 | 14 | 15 | 20915244614537441 16 | 17 | 18 | 19 | 20 | 21 | 22 | 203272727 23 | 24 | 25 | 26 | 27 | 28 | Disassembly_I0 29 | 30 | 31 | 32 | 50020 33 | 34 | 35 | 36 | 11 37 | 664941138664941138 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | TabID-1186-17924 46 | Workspace 47 | Workspace 48 | 49 | 50 | SimpleBLEPeripheralSimpleBLEPeripheral/APPSimpleBLEPeripheral/OSALSimpleBLEPeripheral/OutputSimpleBLEPeripheral/PROFILESSimpleBLEPeripheral/PROFILES/gap.c 51 | 52 | 53 | 54 | 0 55 | 56 | 57 | TabID-11934-17927 58 | Disassembly 59 | Disassembly 60 | 61 | 62 | 63 | 64 | 0TabID-23354-3427Debug LogDebug-LogTabID-5376-3746Find in FilesFind-in-FilesTabID-14096-4196Find All ReferencesFind-All-References0 65 | 66 | 67 | 68 | 69 | 70 | TextEditor$WS_DIR$\..\..\Profiles\DevInfo\devinfoservice.c000003900TextEditor$WS_DIR$\..\Source\devinfoservice.c00000130544454441TextEditor$WS_DIR$\..\Source\SimpleBLEPeripheral_Main.c000004841841TextEditor$WS_DIR$\..\Source\simpleBLEPeripheral.c00000252996999690100000010000001 71 | 72 | 73 | 74 | 75 | 76 | 77 | iaridepm.enu1debuggergui.enu1-2-2758298-2-2300303156250294747156250739300-2-2758298-2-2300303156250294747156250739300-2-21981922-2-219242001002083194553104167194553 78 | 79 | 80 | 81 | 82 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/ViewController.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import CoreBluetooth 3 | 4 | class ViewController: UIViewController, CBCentralManagerDelegate { 5 | @IBOutlet private var scanningSwitch: UISwitch? 6 | @IBOutlet private var loggingButton: UIButton? 7 | @IBOutlet private var nodeLabelOne: UILabel? 8 | @IBOutlet private var nodeLabelTwo: UILabel? 9 | @IBOutlet private var nodeLabelThree: UILabel? 10 | @IBOutlet private var maxLogCountLabel: UILabel? 11 | @IBOutlet private var logProgressIndicator: UIProgressView? 12 | 13 | private let numberForUUID: [String:UInt8] = ["5637417B-E93B-DE78-45F5-B7888477AAEF": 1, 14 | "2F51A3B5-7657-D122-3960-B3DA5F55F912": 2, 15 | "6FBDD05B-D61E-0F5B-2AB4-A3FF5B4A3315": 3] 16 | 17 | var centralManager: CBCentralManager? 18 | 19 | private var scanning = false 20 | private var logging = false 21 | private var log = Log() 22 | private var buffers = [String: AverageBuffer]() 23 | //Our central will only report data from devices broadcasting this service 24 | //in their advertising data 25 | private let permissibaleUUID = CBUUID(string: "FFE0") 26 | 27 | required init(coder aDecoder: NSCoder) { 28 | super.init(coder: aDecoder) 29 | commonInit() 30 | } 31 | 32 | override func viewDidLoad() { 33 | super.viewDidLoad() 34 | commonInit() 35 | } 36 | 37 | override func viewDidAppear(animated: Bool) { 38 | loggingButton!.enabled = false 39 | } 40 | 41 | func commonInit() { 42 | let options = [CBCentralManagerScanOptionAllowDuplicatesKey: true] 43 | centralManager = CBCentralManager(delegate: self, queue: nil, options: options) 44 | 45 | } 46 | 47 | @IBAction func scanningSwitchFlipped(sender: UISwitch) { 48 | 49 | if scanning { 50 | stopScanning() 51 | //Simulate a tap on the logging button to wind that stuff down 52 | if logging { 53 | loggingButtonPressed(loggingButton!) 54 | } 55 | loggingButton!.enabled = false 56 | nodeLabelOne!.text = "Node One" 57 | nodeLabelTwo!.text = "Node Two" 58 | nodeLabelThree!.text = "Node Three" 59 | scanning = false 60 | UIApplication.sharedApplication().idleTimerDisabled = false 61 | } else { 62 | scanning = true 63 | UIApplication.sharedApplication().idleTimerDisabled = true 64 | loggingButton!.enabled = true 65 | let options = [CBCentralManagerScanOptionAllowDuplicatesKey: true] 66 | centralManager!.scanForPeripheralsWithServices([permissibaleUUID], options: options) 67 | } 68 | } 69 | 70 | @IBAction func loggingButtonPressed(sender: UIButton) { 71 | if !logging { 72 | //May want to put a timeout here in the future 73 | //NSTimer.scheduledTimerWithTimeInterval(7200.0, 74 | //target: self, selector: Selector("stopScanning"), userInfo: nil, repeats: false) 75 | println("Started logging.") 76 | logging = true 77 | //Relabel the button 78 | sender.setTitle("Stop logging", forState: nil) 79 | } else { 80 | //Relabel the button 81 | sender.setTitle("Start logging", forState: nil) 82 | logging = false 83 | println("Stopped logging.") 84 | promptToNameLogFile() 85 | 86 | } 87 | 88 | } 89 | 90 | func updateLabel(uuid: String) { 91 | var average: Int? 92 | if scanning || logging { 93 | let buffer = buffers[uuid] 94 | if buffer != nil { 95 | average = Int(buffer!.average!) 96 | } 97 | } 98 | let peripheralNumber = numberForUUID[uuid] 99 | var labelForPeripheral: UILabel? 100 | if peripheralNumber != nil { 101 | switch peripheralNumber! { 102 | case 1: labelForPeripheral = nodeLabelOne 103 | case 2: labelForPeripheral = nodeLabelTwo 104 | case 3: labelForPeripheral = nodeLabelThree 105 | default: 106 | println("Woops") 107 | } 108 | } 109 | if labelForPeripheral != nil { 110 | labelForPeripheral!.text = average!.description 111 | } 112 | let max = log.getMaxNumberOfEntries() 113 | 114 | maxLogCountLabel!.text = max.description 115 | logProgressIndicator!.progress = Float(max) / 400.0 116 | logProgressIndicator!.setNeedsDisplay() 117 | } 118 | 119 | func centralManager(central: CBCentralManager!, didDiscoverPeripheral peripheral: CBPeripheral!, 120 | advertisementData: [NSObject:AnyObject]!, RSSI: NSNumber!) { 121 | //The TI BLE stack uses this to indicate a hardware error in retrieving the RSSI. 122 | //Usually caused by advertising faster than the information can be surfaced. 123 | if RSSI == 127 { 124 | //We'll just ignore this data. 125 | return 126 | } 127 | let timeStamp = NSDate() 128 | let uuid = peripheral.identifier.UUIDString 129 | let rssi = RSSI as Int 130 | 131 | if buffers[uuid] == nil { 132 | buffers[uuid] = AverageBuffer(bufferSize: 10) 133 | } 134 | buffers[uuid]!.add(rssi) 135 | println(rssi) 136 | //See if the user wants us to log stuff 137 | if logging { 138 | //Add an event 139 | log.addToLog(uuid, timeStamp: timeStamp as NSDate, rssi: rssi) 140 | 141 | if log.getMaxNumberOfEntries() > 399 { 142 | loggingButtonPressed(loggingButton!) 143 | } 144 | } 145 | 146 | updateLabel(uuid) 147 | 148 | } 149 | /** 150 | Show an alert with a textfield and ask the user to name the file or discard it. 151 | */ 152 | func promptToNameLogFile() { 153 | var alert = UIAlertController(title: "Log Name", 154 | message: "Enter a name to describe what was just logged", 155 | preferredStyle: UIAlertControllerStyle.Alert) 156 | 157 | alert.addTextFieldWithConfigurationHandler({ 158 | (textField) in 159 | textField.placeholder = "Name" 160 | }) 161 | alert.addAction(UIAlertAction(title: "OK", style: .Default, handler: { 162 | (alertAction: UIAlertAction!) in 163 | let field = alert.textFields![0] as UITextField 164 | self.log.saveLogToFile(field.text) 165 | })) 166 | alert.addAction(UIAlertAction(title: "Discard", style: .Destructive, handler: { 167 | (alertAction: UIAlertAction!) in 168 | let field = alert.textFields![0] as UITextField 169 | self.log.clearLog() 170 | })) 171 | 172 | self.presentViewController(alert, animated: true, completion: nil) 173 | } 174 | 175 | func centralManagerDidUpdateState(central: CBCentralManager!) { 176 | //Required to implement the protocol. Not needed for us. 177 | } 178 | 179 | func stopScanning() { 180 | centralManager!.stopScan() 181 | } 182 | 183 | } 184 | 185 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/blinkyProfile.c: -------------------------------------------------------------------------------- 1 | #include "bcomdef.h" 2 | #include "OSAL.h" 3 | #include "linkdb.h" 4 | #include "att.h" 5 | #include "gatt.h" 6 | #include "gatt_uuid.h" 7 | #include "gattservapp.h" 8 | #include "gapbondmgr.h" 9 | 10 | #include "blinkyProfile.h" 11 | #include "Macros.h" 12 | 13 | #define SERVAPP_NUM_ATTR_SUPPORTED 4 14 | 15 | // Simple GATT Profile Service UUID: 0xFFF0 16 | CONST uint8 blinkyProfileServUUID[ATT_BT_UUID_SIZE] = 17 | { 18 | LO_UINT16(BLINKYPROFILE_SERV_UUID), HI_UINT16(BLINKYPROFILE_SERV_UUID) 19 | }; 20 | 21 | // Characteristic 1 UUID: 0xFFF1 22 | CONST uint8 blinkyProfileOnUUID[ATT_BT_UUID_SIZE] = 23 | { 24 | LO_UINT16(BLINKYPROFILE_ON_UUID), HI_UINT16(BLINKYPROFILE_ON_UUID) 25 | }; 26 | 27 | 28 | static blinkyProfileCBs_t *blinkyProfile_AppCBs = NULL; 29 | 30 | /********************************************************************* 31 | * Profile Attributes - variables 32 | */ 33 | 34 | // Simple Profile Service attribute 35 | static CONST gattAttrType_t blinkyProfileService = { ATT_BT_UUID_SIZE, blinkyProfileServUUID }; 36 | 37 | // Simple Profile Characteristic 1 Properties 38 | static uint8 blinkyProfileOnProps = GATT_PROP_READ | GATT_PROP_WRITE; 39 | static uint8 blinkyProfileOn = 0; 40 | static uint8 blinkyProfileOnUserDescription[8] = "LED On\0"; 41 | 42 | 43 | 44 | /********************************************************************* 45 | * Profile Attributes - Table 46 | */ 47 | 48 | static gattAttribute_t blinkyProfileAttrTbl[SERVAPP_NUM_ATTR_SUPPORTED] = 49 | { 50 | BLE_PRIMARY_SERVICE(GATT_PERMIT_READ, (uint8 *)&blinkyProfileService), 51 | 52 | BLE_START_CHARACTERISTIC("On", GATT_PERMIT_READ, &blinkyProfileOnProps), 53 | BLE_CHARACTERISTIC_VALUE(GATT_PERMIT_READ | GATT_PERMIT_WRITE, blinkyProfileOnUUID, &blinkyProfileOn), 54 | BLE_CHARACTERISTIC_USER_DESCRIPTION(GATT_PERMIT_READ, blinkyProfileOnUserDescription), 55 | 56 | }; 57 | 58 | 59 | /********************************************************************* 60 | * LOCAL FUNCTIONS 61 | */ 62 | static uint8 blinkyProfile_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 63 | uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ); 64 | static bStatus_t blinkyProfile_WriteAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 65 | uint8 *pValue, uint8 len, uint16 offset ); 66 | 67 | 68 | 69 | /********************************************************************* 70 | * PROFILE CALLBACKS 71 | */ 72 | // Simple Profile Service Callbacks 73 | CONST gattServiceCBs_t blinkyProfileCBs = 74 | { 75 | blinkyProfile_ReadAttrCB, // Read callback function pointer 76 | blinkyProfile_WriteAttrCB, // Write callback function pointer 77 | NULL // Authorization callback function pointer 78 | }; 79 | 80 | /********************************************************************* 81 | * PUBLIC FUNCTIONS 82 | */ 83 | 84 | bStatus_t BlinkyProfile_AddService( uint32 services ) 85 | { 86 | uint8 status = SUCCESS; 87 | 88 | // Initialize Client Characteristic Configuration attributes 89 | //GATTServApp_InitCharCfg( INVALID_CONNHANDLE, blinkyProfileChar4Config ); 90 | 91 | 92 | if ( services & BLINKYPROFILE_SERVICE ) 93 | { 94 | // Register GATT attribute list and CBs with GATT Server App 95 | status = GATTServApp_RegisterService( blinkyProfileAttrTbl, 96 | GATT_NUM_ATTRS( blinkyProfileAttrTbl ), 97 | &blinkyProfileCBs ); 98 | } 99 | 100 | return ( status ); 101 | } 102 | 103 | 104 | /********************************************************************* 105 | * @fn BlinkyProfile_RegisterAppCBs 106 | * 107 | * @brief Registers the application callback function. Only call 108 | * this function once. 109 | * 110 | * @param callbacks - pointer to application callbacks. 111 | * 112 | * @return SUCCESS or bleAlreadyInRequestedMode 113 | */ 114 | bStatus_t BlinkyProfile_RegisterAppCBs( blinkyProfileCBs_t *appCallbacks ) 115 | { 116 | if ( appCallbacks ) 117 | { 118 | blinkyProfile_AppCBs = appCallbacks; 119 | 120 | return ( SUCCESS ); 121 | } 122 | else 123 | { 124 | return ( bleAlreadyInRequestedMode ); 125 | } 126 | } 127 | 128 | bStatus_t BlinkyProfile_SetParameter( uint8 param, uint8 len, void *value ) 129 | { 130 | bStatus_t ret = SUCCESS; 131 | switch ( param ) 132 | { 133 | case BLINKYPROFILE_ON: 134 | if ( len == sizeof ( uint8 ) ) 135 | { 136 | blinkyProfileOn = *((uint8*)value); 137 | } 138 | else 139 | { 140 | ret = bleInvalidRange; 141 | } 142 | break; 143 | 144 | default: 145 | ret = INVALIDPARAMETER; 146 | break; 147 | } 148 | 149 | return ( ret ); 150 | } 151 | 152 | bStatus_t BlinkyProfile_GetParameter( uint8 param, void *value ) 153 | { 154 | bStatus_t ret = SUCCESS; 155 | switch ( param ) 156 | { 157 | case BLINKYPROFILE_ON: 158 | *((uint8*)value) = blinkyProfileOn; 159 | break; 160 | 161 | default: 162 | ret = INVALIDPARAMETER; 163 | break; 164 | } 165 | 166 | return ( ret ); 167 | } 168 | 169 | static uint8 blinkyProfile_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 170 | uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ) 171 | { 172 | bStatus_t status = SUCCESS; 173 | if ( gattPermitAuthorRead( pAttr->permissions ) ){ 174 | return ( ATT_ERR_INSUFFICIENT_AUTHOR ); 175 | } 176 | 177 | // Make sure it's not a blob operation (no attributes in the profile are long) 178 | if ( offset > 0 ){ 179 | return ( ATT_ERR_ATTR_NOT_LONG ); 180 | } 181 | 182 | if ( pAttr->type.len == ATT_BT_UUID_SIZE ){ 183 | // 16-bit UUID 184 | uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]); 185 | switch ( uuid ) 186 | { 187 | // No need for "GATT_SERVICE_UUID" or "GATT_CLIENT_CHAR_CFG_UUID" cases; 188 | // gattserverapp handles those reads 189 | 190 | case BLINKYPROFILE_ON_UUID: 191 | *pLen = 1; 192 | pValue[0] = *pAttr->pValue; 193 | break; 194 | default: 195 | *pLen = 0; 196 | status = ATT_ERR_ATTR_NOT_FOUND; 197 | break; 198 | } 199 | } 200 | else 201 | { 202 | // 128-bit UUID 203 | *pLen = 0; 204 | status = ATT_ERR_INVALID_HANDLE; 205 | } 206 | 207 | return ( status ); 208 | } 209 | 210 | static bStatus_t blinkyProfile_WriteAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 211 | uint8 *pValue, uint8 len, uint16 offset ) 212 | { 213 | bStatus_t status = SUCCESS; 214 | uint8 notifyApp = 0xFF; 215 | 216 | if ( gattPermitAuthorWrite( pAttr->permissions ) ){ 217 | return ( ATT_ERR_INSUFFICIENT_AUTHOR ); 218 | } 219 | 220 | if ( pAttr->type.len == ATT_BT_UUID_SIZE ) 221 | { 222 | // 16-bit UUID 223 | uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]); 224 | switch ( uuid ){ 225 | case BLINKYPROFILE_ON_UUID: 226 | 227 | //Validate the value 228 | // Make sure it's not a blob oper 229 | if ( offset == 0 ){ 230 | if ( len != 1 ){ 231 | status = ATT_ERR_INVALID_VALUE_SIZE; 232 | } 233 | } 234 | else{ 235 | status = ATT_ERR_ATTR_NOT_LONG; 236 | } 237 | 238 | //Write the value 239 | if ( status == SUCCESS ){ 240 | uint8 *pCurValue = (uint8 *)pAttr->pValue; 241 | *pCurValue = pValue[0]; 242 | notifyApp = BLINKYPROFILE_ON; 243 | } 244 | 245 | break; 246 | 247 | case GATT_CLIENT_CHAR_CFG_UUID: 248 | status = GATTServApp_ProcessCCCWriteReq( connHandle, pAttr, pValue, len, 249 | offset, GATT_CLIENT_CFG_NOTIFY ); 250 | break; 251 | 252 | default: 253 | // Should never get here! (characteristics 2 and 4 do not have write permissions) 254 | status = ATT_ERR_ATTR_NOT_FOUND; 255 | break; 256 | } 257 | } 258 | else 259 | { 260 | // 128-bit UUID 261 | status = ATT_ERR_INVALID_HANDLE; 262 | } 263 | 264 | // If a charactersitic value changed then callback function to notify application of change 265 | if ( (notifyApp != 0xFF ) && blinkyProfile_AppCBs && blinkyProfile_AppCBs->pfnSimpleProfileChange ) 266 | { 267 | blinkyProfile_AppCBs->pfnSimpleProfileChange( notifyApp ); 268 | } 269 | 270 | return ( status ); 271 | } 272 | -------------------------------------------------------------------------------- /client-software/rssi-probe/classes/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 28 | 34 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/BlinkyPeripheral.c: -------------------------------------------------------------------------------- 1 | #include "bcomdef.h" 2 | #include "OSAL.h" 3 | #include "OSAL_PwrMgr.h" 4 | 5 | #include "OnBoard.h" 6 | #include "hal_adc.h" 7 | #include "hal_led.h" 8 | #include "hal_key.h" 9 | #include "hal_lcd.h" 10 | 11 | #include "gatt.h" 12 | 13 | #include "hci.h" 14 | 15 | #include "gapgattserver.h" 16 | #include "gattservapp.h" 17 | #include "devinfoservice.h" 18 | #include "blinkyProfile.h" 19 | 20 | #include "peripheral.h" 21 | 22 | #include "gapbondmgr.h" 23 | 24 | #include "BlinkyPeripheral.h" 25 | 26 | #if defined FEATURE_OAD 27 | #include "oad.h" 28 | #include "oad_target.h" 29 | #endif 30 | 31 | #include "HM-10.h" 32 | 33 | /********************************************************************* 34 | * CONSTANTS 35 | */ 36 | 37 | // How often to perform periodic event 38 | #define SBP_PERIODIC_EVT_PERIOD 500 39 | 40 | // What is the advertising interval when device is discoverable (units of 625us, 160=100ms) 41 | #define DEFAULT_ADVERTISING_INTERVAL 160 42 | 43 | // Limited discoverable mode advertises for 30.72s, and then stops 44 | // General discoverable mode advertises indefinitely 45 | 46 | #define DEFAULT_DISCOVERABLE_MODE GAP_ADTYPE_FLAGS_GENERAL 47 | 48 | 49 | // Minimum connection interval (units of 1.25ms, 80=100ms) if automatic parameter update request is enabled 50 | #define DEFAULT_DESIRED_MIN_CONN_INTERVAL 80 51 | 52 | // Maximum connection interval (units of 1.25ms, 800=1000ms) if automatic parameter update request is enabled 53 | #define DEFAULT_DESIRED_MAX_CONN_INTERVAL 800 54 | 55 | // Slave latency to use if automatic parameter update request is enabled 56 | #define DEFAULT_DESIRED_SLAVE_LATENCY 0 57 | 58 | // Supervision timeout value (units of 10ms, 1000=10s) if automatic parameter update request is enabled 59 | #define DEFAULT_DESIRED_CONN_TIMEOUT 1000 60 | 61 | // Whether to enable automatic parameter update request when a connection is formed 62 | #define DEFAULT_ENABLE_UPDATE_REQUEST TRUE 63 | 64 | // Connection Pause Peripheral time value (in seconds) 65 | #define DEFAULT_CONN_PAUSE_PERIPHERAL 6 66 | 67 | // Company Identifier: Texas Instruments Inc. (13) 68 | #define TI_COMPANY_ID 0x000D 69 | 70 | #define INVALID_CONNHANDLE 0xFFFF 71 | 72 | // Length of bd addr as a string 73 | #define B_ADDR_STR_LEN 15 74 | 75 | /********************************************************************* 76 | * LOCAL VARIABLES 77 | */ 78 | static uint8 simpleBLEPeripheral_TaskID; // Task ID for internal task/event processing 79 | 80 | static gaprole_States_t gapProfileState = GAPROLE_INIT; 81 | 82 | // GAP - SCAN RSP data (max size = 31 bytes) 83 | static uint8 scanRspData[] = 84 | { 85 | // complete name 86 | 0x07, // length of this data 87 | GAP_ADTYPE_LOCAL_NAME_COMPLETE, 88 | 0x42, // 'B' 89 | 0x6c, // 'l' 90 | 0x69, // 'i' 91 | 0x6e, // 'n' 92 | 0x6b, // 'k' 93 | 0x79, // 'y' 94 | 95 | // connection interval range 96 | 0x05, // length of this data 97 | GAP_ADTYPE_SLAVE_CONN_INTERVAL_RANGE, 98 | LO_UINT16( DEFAULT_DESIRED_MIN_CONN_INTERVAL ), // 100ms 99 | HI_UINT16( DEFAULT_DESIRED_MIN_CONN_INTERVAL ), 100 | LO_UINT16( DEFAULT_DESIRED_MAX_CONN_INTERVAL ), // 1s 101 | HI_UINT16( DEFAULT_DESIRED_MAX_CONN_INTERVAL ), 102 | 103 | // Tx power level 104 | 0x02, // length of this data 105 | GAP_ADTYPE_POWER_LEVEL, 106 | 0 // 0dBm 107 | }; 108 | 109 | // GAP - Advertisement data (max size = 31 bytes, though this is 110 | // best kept short to conserve power while advertisting) 111 | static uint8 advertData[] = 112 | { 113 | // Flags; this sets the device to use limited discoverable 114 | // mode (advertises for 30 seconds at a time) instead of general 115 | // discoverable mode (advertises indefinitely) 116 | 0x02, // length of this data 117 | GAP_ADTYPE_FLAGS, 118 | DEFAULT_DISCOVERABLE_MODE | GAP_ADTYPE_FLAGS_BREDR_NOT_SUPPORTED, 119 | 120 | // service UUID, to notify central devices what services are included 121 | // in this peripheral 122 | 0x03, // length of this data 123 | GAP_ADTYPE_16BIT_MORE, // some of the UUID's, but not all 124 | LO_UINT16( BLINKYPROFILE_SERV_UUID ), 125 | HI_UINT16( BLINKYPROFILE_SERV_UUID ), 126 | 127 | }; 128 | 129 | // GAP GATT Attributes 130 | static uint8 attDeviceName[GAP_DEVICE_NAME_LEN] = "Simple BLE Peripheral"; 131 | 132 | /********************************************************************* 133 | * LOCAL FUNCTIONS 134 | */ 135 | static void simpleBLEPeripheral_ProcessOSALMsg( osal_event_hdr_t *pMsg ); 136 | static void peripheralStateNotificationCB( gaprole_States_t newState ); 137 | static void performPeriodicTask( void ); 138 | static void blinkyProfileChangeCB( uint8 paramID ); 139 | 140 | 141 | /********************************************************************* 142 | * PROFILE CALLBACKS 143 | */ 144 | 145 | // GAP Role Callbacks 146 | static gapRolesCBs_t simpleBLEPeripheral_PeripheralCBs = 147 | { 148 | peripheralStateNotificationCB, // Profile State Change Callbacks 149 | NULL // When a valid RSSI is read from controller (not used by application) 150 | }; 151 | 152 | // GAP Bond Manager Callbacks 153 | static gapBondCBs_t simpleBLEPeripheral_BondMgrCBs = 154 | { 155 | NULL, // Passcode callback (not used by application) 156 | NULL // Pairing / Bonding state Callback (not used by application) 157 | }; 158 | 159 | // Simple GATT Profile Callbacks 160 | static blinkyProfileCBs_t simpleBLEPeripheral_BlinkyProfileCBs = 161 | { 162 | blinkyProfileChangeCB // Charactersitic value change callback 163 | }; 164 | /********************************************************************* 165 | * PUBLIC FUNCTIONS 166 | */ 167 | 168 | /********************************************************************* 169 | * @fn BlinkyPeripheral_Init 170 | * 171 | * @brief Initialization function for the Simple BLE Peripheral App Task. 172 | * This is called during initialization and should contain 173 | * any application specific initialization (ie. hardware 174 | * initialization/setup, table initialization, power up 175 | * notificaiton ... ). 176 | * 177 | * @param task_id - the ID assigned by OSAL. This ID should be 178 | * used to send messages and set timers. 179 | * 180 | * @return none 181 | */ 182 | void BlinkyPeripheral_Init( uint8 task_id ) 183 | { 184 | simpleBLEPeripheral_TaskID = task_id; 185 | 186 | // Setup the GAP 187 | VOID GAP_SetParamValue( TGAP_CONN_PAUSE_PERIPHERAL, DEFAULT_CONN_PAUSE_PERIPHERAL ); 188 | 189 | // Setup the GAP Peripheral Role Profile 190 | { 191 | 192 | uint8 initial_advertising_enable = TRUE; 193 | 194 | // By setting this to zero, the device will go into the waiting state after 195 | // being discoverable for 30.72 second, and will not being advertising again 196 | // until the enabler is set back to TRUE 197 | uint16 gapRole_AdvertOffTime = 0; 198 | 199 | uint8 enable_update_request = DEFAULT_ENABLE_UPDATE_REQUEST; 200 | uint16 desired_min_interval = DEFAULT_DESIRED_MIN_CONN_INTERVAL; 201 | uint16 desired_max_interval = DEFAULT_DESIRED_MAX_CONN_INTERVAL; 202 | uint16 desired_slave_latency = DEFAULT_DESIRED_SLAVE_LATENCY; 203 | uint16 desired_conn_timeout = DEFAULT_DESIRED_CONN_TIMEOUT; 204 | 205 | // Set the GAP Role Parameters 206 | GAPRole_SetParameter( GAPROLE_ADVERT_ENABLED, sizeof( uint8 ), &initial_advertising_enable ); 207 | GAPRole_SetParameter( GAPROLE_ADVERT_OFF_TIME, sizeof( uint16 ), &gapRole_AdvertOffTime ); 208 | 209 | GAPRole_SetParameter( GAPROLE_SCAN_RSP_DATA, sizeof ( scanRspData ), scanRspData ); 210 | GAPRole_SetParameter( GAPROLE_ADVERT_DATA, sizeof( advertData ), advertData ); 211 | 212 | GAPRole_SetParameter( GAPROLE_PARAM_UPDATE_ENABLE, sizeof( uint8 ), &enable_update_request ); 213 | GAPRole_SetParameter( GAPROLE_MIN_CONN_INTERVAL, sizeof( uint16 ), &desired_min_interval ); 214 | GAPRole_SetParameter( GAPROLE_MAX_CONN_INTERVAL, sizeof( uint16 ), &desired_max_interval ); 215 | GAPRole_SetParameter( GAPROLE_SLAVE_LATENCY, sizeof( uint16 ), &desired_slave_latency ); 216 | GAPRole_SetParameter( GAPROLE_TIMEOUT_MULTIPLIER, sizeof( uint16 ), &desired_conn_timeout ); 217 | } 218 | 219 | // Set the GAP Characteristics 220 | GGS_SetParameter( GGS_DEVICE_NAME_ATT, GAP_DEVICE_NAME_LEN, attDeviceName ); 221 | 222 | // Set advertising interval 223 | { 224 | uint16 advInt = DEFAULT_ADVERTISING_INTERVAL; 225 | 226 | GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MIN, advInt ); 227 | GAP_SetParamValue( TGAP_LIM_DISC_ADV_INT_MAX, advInt ); 228 | GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MIN, advInt ); 229 | GAP_SetParamValue( TGAP_GEN_DISC_ADV_INT_MAX, advInt ); 230 | } 231 | 232 | // Setup the GAP Bond Manager 233 | { 234 | uint32 passkey = 0; // passkey "000000" 235 | uint8 pairMode = GAPBOND_PAIRING_MODE_WAIT_FOR_REQ; 236 | uint8 mitm = TRUE; 237 | uint8 ioCap = GAPBOND_IO_CAP_DISPLAY_ONLY; 238 | uint8 bonding = TRUE; 239 | GAPBondMgr_SetParameter( GAPBOND_DEFAULT_PASSCODE, sizeof ( uint32 ), &passkey ); 240 | GAPBondMgr_SetParameter( GAPBOND_PAIRING_MODE, sizeof ( uint8 ), &pairMode ); 241 | GAPBondMgr_SetParameter( GAPBOND_MITM_PROTECTION, sizeof ( uint8 ), &mitm ); 242 | GAPBondMgr_SetParameter( GAPBOND_IO_CAPABILITIES, sizeof ( uint8 ), &ioCap ); 243 | GAPBondMgr_SetParameter( GAPBOND_BONDING_ENABLED, sizeof ( uint8 ), &bonding ); 244 | } 245 | 246 | // Initialize GATT attributes 247 | GGS_AddService( GATT_ALL_SERVICES ); // GAP 248 | GATTServApp_AddService( GATT_ALL_SERVICES ); // GATT attributes 249 | DevInfo_AddService(); // Device Information Service 250 | BlinkyProfile_AddService( GATT_ALL_SERVICES ); // Simple GATT Profile 251 | #if defined FEATURE_OAD 252 | VOID OADTarget_AddService(); // OAD Profile 253 | #endif 254 | 255 | // Setup the BlinkyProfile Characteristic Values 256 | { 257 | uint8 charValue1 = 1; 258 | BlinkyProfile_SetParameter( BLINKYPROFILE_ON, sizeof ( uint8 ), &charValue1 ); 259 | } 260 | DevInfo_SetParameter(DEVINFO_MANUFACTURER_NAME, 16, "Nick Walker"); 261 | DevInfo_SetParameter(DEVINFO_MODEL_NUMBER, 16, "BLE Dev Kit 1.0"); 262 | DevInfo_SetParameter(DEVINFO_FIRMWARE_REV, 3, "1.0"); 263 | DevInfo_SetParameter(DEVINFO_HARDWARE_REV, 3, "1.0"); 264 | DevInfo_SetParameter(DEVINFO_SOFTWARE_REV, 3, "1.0"); 265 | DevInfo_SetParameter(DEVINFO_SERIAL_NUMBER, 7, "NSW0001"); 266 | // Register callback with SimpleGATTprofile 267 | VOID BlinkyProfile_RegisterAppCBs( &simpleBLEPeripheral_BlinkyProfileCBs ); 268 | 269 | // Enable clock divide on halt 270 | // This reduces active current while radio is active and CC254x MCU 271 | // is halted 272 | HCI_EXT_ClkDivOnHaltCmd( HCI_EXT_ENABLE_CLK_DIVIDE_ON_HALT ); 273 | 274 | #if defined ( DC_DC_P0_7 ) 275 | 276 | // Enable stack to toggle bypass control on TPS62730 (DC/DC converter) 277 | HCI_EXT_MapPmIoPortCmd( HCI_EXT_PM_IO_PORT_P0, HCI_EXT_PM_IO_PORT_PIN7 ); 278 | 279 | #endif // defined ( DC_DC_P0_7 ) 280 | 281 | // Setup a delayed profile startup 282 | osal_set_event( simpleBLEPeripheral_TaskID, SBP_START_DEVICE_EVT ); 283 | 284 | P0SEL = 0; // Configure Port 0 as GPIO 285 | P1SEL = 0; // Configure Port 1 as GPIO 286 | P2SEL = 0; // Configure Port 2 as GPIO 287 | 288 | P1DIR = 0xFF; // All port 1 pins (P1.0-P1.7) as output 289 | P2DIR = 0x1F; // All port 1 pins (P2.0-P2.4) as output 290 | 291 | P0 = 0; 292 | P1 = 0; 293 | P2 = 0; 294 | } 295 | 296 | uint16 BlinkyPeripheral_ProcessEvent( uint8 task_id, uint16 events ) 297 | { 298 | 299 | VOID task_id; // OSAL required parameter that isn't used in this function 300 | 301 | if ( events & SYS_EVENT_MSG ) 302 | { 303 | uint8 *pMsg; 304 | 305 | if ( (pMsg = osal_msg_receive( simpleBLEPeripheral_TaskID )) != NULL ) 306 | { 307 | simpleBLEPeripheral_ProcessOSALMsg( (osal_event_hdr_t *)pMsg ); 308 | 309 | // Release the OSAL message 310 | VOID osal_msg_deallocate( pMsg ); 311 | } 312 | 313 | // return unprocessed events 314 | return (events ^ SYS_EVENT_MSG); 315 | } 316 | 317 | if ( events & SBP_START_DEVICE_EVT ) 318 | { 319 | // Start the Device 320 | VOID GAPRole_StartDevice( &simpleBLEPeripheral_PeripheralCBs ); 321 | 322 | // Start Bond Manager 323 | VOID GAPBondMgr_Register( &simpleBLEPeripheral_BondMgrCBs ); 324 | 325 | // Set timer for first periodic event 326 | osal_start_timerEx( simpleBLEPeripheral_TaskID, SBP_PERIODIC_EVT, SBP_PERIODIC_EVT_PERIOD ); 327 | 328 | return ( events ^ SBP_START_DEVICE_EVT ); 329 | } 330 | 331 | if ( events & SBP_PERIODIC_EVT ) 332 | { 333 | // Restart timer 334 | if ( SBP_PERIODIC_EVT_PERIOD ) 335 | { 336 | osal_start_timerEx( simpleBLEPeripheral_TaskID, SBP_PERIODIC_EVT, SBP_PERIODIC_EVT_PERIOD ); 337 | } 338 | 339 | // Perform periodic application task 340 | performPeriodicTask(); 341 | 342 | return (events ^ SBP_PERIODIC_EVT); 343 | } 344 | 345 | // Discard unknown events 346 | return 0; 347 | } 348 | static void simpleBLEPeripheral_ProcessOSALMsg( osal_event_hdr_t *pMsg ) 349 | { 350 | switch ( pMsg->event ) 351 | { 352 | 353 | default: 354 | // do nothing 355 | break; 356 | } 357 | } 358 | 359 | static void peripheralStateNotificationCB( gaprole_States_t newState ) 360 | { 361 | switch ( newState ) 362 | { 363 | case GAPROLE_STARTED: 364 | { 365 | uint8 ownAddress[B_ADDR_LEN]; 366 | uint8 systemId[DEVINFO_SYSTEM_ID_LEN]; 367 | 368 | GAPRole_GetParameter(GAPROLE_BD_ADDR, ownAddress); 369 | 370 | // use 6 bytes of device address for 8 bytes of system ID value 371 | systemId[0] = ownAddress[0]; 372 | systemId[1] = ownAddress[1]; 373 | systemId[2] = ownAddress[2]; 374 | 375 | // set middle bytes to zero 376 | systemId[4] = 0x00; 377 | systemId[3] = 0x00; 378 | 379 | // shift three bytes up 380 | systemId[7] = ownAddress[5]; 381 | systemId[6] = ownAddress[4]; 382 | systemId[5] = ownAddress[3]; 383 | 384 | DevInfo_SetParameter(DEVINFO_SYSTEM_ID, DEVINFO_SYSTEM_ID_LEN, systemId); 385 | 386 | } 387 | break; 388 | 389 | case GAPROLE_ADVERTISING: 390 | { 391 | 392 | } 393 | break; 394 | 395 | case GAPROLE_CONNECTED: 396 | { 397 | 398 | } 399 | break; 400 | 401 | case GAPROLE_CONNECTED_ADV: 402 | { 403 | 404 | } 405 | break; 406 | case GAPROLE_WAITING: 407 | { 408 | } 409 | break; 410 | 411 | case GAPROLE_WAITING_AFTER_TIMEOUT: 412 | { 413 | 414 | } 415 | break; 416 | 417 | case GAPROLE_ERROR: 418 | { 419 | 420 | } 421 | break; 422 | 423 | default: 424 | { 425 | } 426 | break; 427 | 428 | } 429 | 430 | gapProfileState = newState; 431 | 432 | #if !defined( CC2540_MINIDK ) 433 | VOID gapProfileState; // added to prevent compiler warning with 434 | // "CC2540 Slave" configurations 435 | #endif 436 | 437 | 438 | } 439 | 440 | static void performPeriodicTask( void ){ 441 | uint8 value; 442 | BlinkyProfile_GetParameter( BLINKYPROFILE_ON, &value ); 443 | if(value != 0) { 444 | PIN1 = !PIN1; 445 | } 446 | else{ 447 | PIN1 = 0; 448 | } 449 | } 450 | 451 | static void blinkyProfileChangeCB( uint8 paramID ) 452 | { 453 | uint8 newValue; 454 | 455 | switch( paramID ) 456 | { 457 | case BLINKYPROFILE_ON: 458 | BlinkyProfile_GetParameter( BLINKYPROFILE_ON, &newValue ); 459 | 460 | #if (defined HAL_LCD) && (HAL_LCD == TRUE) 461 | HalLcdWriteStringValue( "Char 1:", (uint16)(newValue), 10, HAL_LCD_LINE_3 ); 462 | #endif // (defined HAL_LCD) && (HAL_LCD == TRUE) 463 | 464 | break; 465 | 466 | default: 467 | // should not reach here! 468 | break; 469 | } 470 | } -------------------------------------------------------------------------------- /client-software/rssi-probe/rssiprobe.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | D423FAA31A50D2E000AA51FB /* AverageBufferTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D423FAA21A50D2E000AA51FB /* AverageBufferTests.swift */; }; 11 | D43C100019F4BDF900C3CAC4 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D43C0FFF19F4BDF900C3CAC4 /* Images.xcassets */; }; 12 | D48A33081A50C5C1008BC7AA /* AverageBuffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = D425EACB1A4E01EA004B6B1F /* AverageBuffer.swift */; }; 13 | D48A330B1A50CBA7008BC7AA /* Log.swift in Sources */ = {isa = PBXBuildFile; fileRef = D48A330A1A50CBA7008BC7AA /* Log.swift */; }; 14 | D48A330C1A50D005008BC7AA /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = D4A36A8819DBB38D00648691 /* LaunchScreen.xib */; }; 15 | D48A330D1A50D00A008BC7AA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D4A36A8319DBB38D00648691 /* Main.storyboard */; }; 16 | D4A36A8019DBB38D00648691 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4A36A7F19DBB38D00648691 /* AppDelegate.swift */; }; 17 | D4CFADBB1A4C9C4000EFC518 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4A36A8119DBB38D00648691 /* ViewController.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | D423FAA41A50D2E000AA51FB /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = D4A36A7219DBB38D00648691 /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = D4A36A7919DBB38D00648691; 26 | remoteInfo = rssiprobe; 27 | }; 28 | /* End PBXContainerItemProxy section */ 29 | 30 | /* Begin PBXFileReference section */ 31 | D423FA9E1A50D2E000AA51FB /* rssiprobe Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "rssiprobe Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 32 | D423FAA11A50D2E000AA51FB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 33 | D423FAA21A50D2E000AA51FB /* AverageBufferTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AverageBufferTests.swift; sourceTree = ""; }; 34 | D425EACB1A4E01EA004B6B1F /* AverageBuffer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AverageBuffer.swift; sourceTree = ""; }; 35 | D43C0FFF19F4BDF900C3CAC4 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "rssi-probe/Images.xcassets"; sourceTree = ""; }; 36 | D48A330A1A50CBA7008BC7AA /* Log.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Log.swift; sourceTree = ""; }; 37 | D4A36A7A19DBB38D00648691 /* rssiprobe.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = rssiprobe.app; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | D4A36A7E19DBB38D00648691 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 39 | D4A36A7F19DBB38D00648691 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AppDelegate.swift; path = ../classes/AppDelegate.swift; sourceTree = ""; }; 40 | D4A36A8119DBB38D00648691 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ViewController.swift; path = ../classes/ViewController.swift; sourceTree = ""; }; 41 | D4A36A8419DBB38D00648691 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | D4A36A8919DBB38D00648691 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; 43 | /* End PBXFileReference section */ 44 | 45 | /* Begin PBXFrameworksBuildPhase section */ 46 | D423FA9B1A50D2E000AA51FB /* Frameworks */ = { 47 | isa = PBXFrameworksBuildPhase; 48 | buildActionMask = 2147483647; 49 | files = ( 50 | ); 51 | runOnlyForDeploymentPostprocessing = 0; 52 | }; 53 | D4A36A7719DBB38D00648691 /* Frameworks */ = { 54 | isa = PBXFrameworksBuildPhase; 55 | buildActionMask = 2147483647; 56 | files = ( 57 | ); 58 | runOnlyForDeploymentPostprocessing = 0; 59 | }; 60 | /* End PBXFrameworksBuildPhase section */ 61 | 62 | /* Begin PBXGroup section */ 63 | D423FA9F1A50D2E000AA51FB /* rssiprobe Tests */ = { 64 | isa = PBXGroup; 65 | children = ( 66 | D423FAA21A50D2E000AA51FB /* AverageBufferTests.swift */, 67 | D423FAA01A50D2E000AA51FB /* Supporting Files */, 68 | ); 69 | path = "rssiprobe Tests"; 70 | sourceTree = ""; 71 | }; 72 | D423FAA01A50D2E000AA51FB /* Supporting Files */ = { 73 | isa = PBXGroup; 74 | children = ( 75 | D423FAA11A50D2E000AA51FB /* Info.plist */, 76 | ); 77 | name = "Supporting Files"; 78 | sourceTree = ""; 79 | }; 80 | D4A36A7119DBB38D00648691 = { 81 | isa = PBXGroup; 82 | children = ( 83 | D43C0FFF19F4BDF900C3CAC4 /* Images.xcassets */, 84 | D4A36A7C19DBB38D00648691 /* classes */, 85 | D423FA9F1A50D2E000AA51FB /* rssiprobe Tests */, 86 | D4A36A7B19DBB38D00648691 /* Products */, 87 | ); 88 | sourceTree = ""; 89 | }; 90 | D4A36A7B19DBB38D00648691 /* Products */ = { 91 | isa = PBXGroup; 92 | children = ( 93 | D4A36A7A19DBB38D00648691 /* rssiprobe.app */, 94 | D423FA9E1A50D2E000AA51FB /* rssiprobe Tests.xctest */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | D4A36A7C19DBB38D00648691 /* classes */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | D48A330A1A50CBA7008BC7AA /* Log.swift */, 103 | D425EACB1A4E01EA004B6B1F /* AverageBuffer.swift */, 104 | D4A36A7F19DBB38D00648691 /* AppDelegate.swift */, 105 | D4A36A8119DBB38D00648691 /* ViewController.swift */, 106 | D4A36A8319DBB38D00648691 /* Main.storyboard */, 107 | D4A36A8819DBB38D00648691 /* LaunchScreen.xib */, 108 | D4A36A7D19DBB38D00648691 /* Supporting Files */, 109 | ); 110 | path = classes; 111 | sourceTree = ""; 112 | }; 113 | D4A36A7D19DBB38D00648691 /* Supporting Files */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | D4A36A7E19DBB38D00648691 /* Info.plist */, 117 | ); 118 | name = "Supporting Files"; 119 | sourceTree = ""; 120 | }; 121 | /* End PBXGroup section */ 122 | 123 | /* Begin PBXNativeTarget section */ 124 | D423FA9D1A50D2E000AA51FB /* rssiprobe Tests */ = { 125 | isa = PBXNativeTarget; 126 | buildConfigurationList = D423FAA81A50D2E000AA51FB /* Build configuration list for PBXNativeTarget "rssiprobe Tests" */; 127 | buildPhases = ( 128 | D423FA9A1A50D2E000AA51FB /* Sources */, 129 | D423FA9B1A50D2E000AA51FB /* Frameworks */, 130 | D423FA9C1A50D2E000AA51FB /* Resources */, 131 | ); 132 | buildRules = ( 133 | ); 134 | dependencies = ( 135 | D423FAA51A50D2E000AA51FB /* PBXTargetDependency */, 136 | ); 137 | name = "rssiprobe Tests"; 138 | productName = "rssiprobe Tests"; 139 | productReference = D423FA9E1A50D2E000AA51FB /* rssiprobe Tests.xctest */; 140 | productType = "com.apple.product-type.bundle.unit-test"; 141 | }; 142 | D4A36A7919DBB38D00648691 /* rssiprobe */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = D4A36A9919DBB38D00648691 /* Build configuration list for PBXNativeTarget "rssiprobe" */; 145 | buildPhases = ( 146 | D4A36A7619DBB38D00648691 /* Sources */, 147 | D4A36A7719DBB38D00648691 /* Frameworks */, 148 | D4A36A7819DBB38D00648691 /* Resources */, 149 | ); 150 | buildRules = ( 151 | ); 152 | dependencies = ( 153 | ); 154 | name = rssiprobe; 155 | productName = mapper; 156 | productReference = D4A36A7A19DBB38D00648691 /* rssiprobe.app */; 157 | productType = "com.apple.product-type.application"; 158 | }; 159 | /* End PBXNativeTarget section */ 160 | 161 | /* Begin PBXProject section */ 162 | D4A36A7219DBB38D00648691 /* Project object */ = { 163 | isa = PBXProject; 164 | attributes = { 165 | LastUpgradeCheck = 0600; 166 | ORGANIZATIONNAME = "Nick Walker"; 167 | TargetAttributes = { 168 | D423FA9D1A50D2E000AA51FB = { 169 | CreatedOnToolsVersion = 6.1.1; 170 | TestTargetID = D4A36A7919DBB38D00648691; 171 | }; 172 | D4A36A7919DBB38D00648691 = { 173 | CreatedOnToolsVersion = 6.0; 174 | }; 175 | }; 176 | }; 177 | buildConfigurationList = D4A36A7519DBB38D00648691 /* Build configuration list for PBXProject "rssiprobe" */; 178 | compatibilityVersion = "Xcode 3.2"; 179 | developmentRegion = English; 180 | hasScannedForEncodings = 0; 181 | knownRegions = ( 182 | en, 183 | Base, 184 | ); 185 | mainGroup = D4A36A7119DBB38D00648691; 186 | productRefGroup = D4A36A7B19DBB38D00648691 /* Products */; 187 | projectDirPath = ""; 188 | projectRoot = ""; 189 | targets = ( 190 | D4A36A7919DBB38D00648691 /* rssiprobe */, 191 | D423FA9D1A50D2E000AA51FB /* rssiprobe Tests */, 192 | ); 193 | }; 194 | /* End PBXProject section */ 195 | 196 | /* Begin PBXResourcesBuildPhase section */ 197 | D423FA9C1A50D2E000AA51FB /* Resources */ = { 198 | isa = PBXResourcesBuildPhase; 199 | buildActionMask = 2147483647; 200 | files = ( 201 | ); 202 | runOnlyForDeploymentPostprocessing = 0; 203 | }; 204 | D4A36A7819DBB38D00648691 /* Resources */ = { 205 | isa = PBXResourcesBuildPhase; 206 | buildActionMask = 2147483647; 207 | files = ( 208 | D48A330D1A50D00A008BC7AA /* Main.storyboard in Resources */, 209 | D48A330C1A50D005008BC7AA /* LaunchScreen.xib in Resources */, 210 | D43C100019F4BDF900C3CAC4 /* Images.xcassets in Resources */, 211 | ); 212 | runOnlyForDeploymentPostprocessing = 0; 213 | }; 214 | /* End PBXResourcesBuildPhase section */ 215 | 216 | /* Begin PBXSourcesBuildPhase section */ 217 | D423FA9A1A50D2E000AA51FB /* Sources */ = { 218 | isa = PBXSourcesBuildPhase; 219 | buildActionMask = 2147483647; 220 | files = ( 221 | D423FAA31A50D2E000AA51FB /* AverageBufferTests.swift in Sources */, 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | }; 225 | D4A36A7619DBB38D00648691 /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | D4CFADBB1A4C9C4000EFC518 /* ViewController.swift in Sources */, 230 | D4A36A8019DBB38D00648691 /* AppDelegate.swift in Sources */, 231 | D48A330B1A50CBA7008BC7AA /* Log.swift in Sources */, 232 | D48A33081A50C5C1008BC7AA /* AverageBuffer.swift in Sources */, 233 | ); 234 | runOnlyForDeploymentPostprocessing = 0; 235 | }; 236 | /* End PBXSourcesBuildPhase section */ 237 | 238 | /* Begin PBXTargetDependency section */ 239 | D423FAA51A50D2E000AA51FB /* PBXTargetDependency */ = { 240 | isa = PBXTargetDependency; 241 | target = D4A36A7919DBB38D00648691 /* rssiprobe */; 242 | targetProxy = D423FAA41A50D2E000AA51FB /* PBXContainerItemProxy */; 243 | }; 244 | /* End PBXTargetDependency section */ 245 | 246 | /* Begin PBXVariantGroup section */ 247 | D4A36A8319DBB38D00648691 /* Main.storyboard */ = { 248 | isa = PBXVariantGroup; 249 | children = ( 250 | D4A36A8419DBB38D00648691 /* Base */, 251 | ); 252 | name = Main.storyboard; 253 | path = ../classes; 254 | sourceTree = ""; 255 | }; 256 | D4A36A8819DBB38D00648691 /* LaunchScreen.xib */ = { 257 | isa = PBXVariantGroup; 258 | children = ( 259 | D4A36A8919DBB38D00648691 /* Base */, 260 | ); 261 | name = LaunchScreen.xib; 262 | path = ../classes; 263 | sourceTree = ""; 264 | }; 265 | /* End PBXVariantGroup section */ 266 | 267 | /* Begin XCBuildConfiguration section */ 268 | D423FAA61A50D2E000AA51FB /* Debug */ = { 269 | isa = XCBuildConfiguration; 270 | buildSettings = { 271 | BUNDLE_LOADER = "$(TEST_HOST)"; 272 | FRAMEWORK_SEARCH_PATHS = ( 273 | "$(SDKROOT)/Developer/Library/Frameworks", 274 | "$(inherited)", 275 | ); 276 | GCC_PREPROCESSOR_DEFINITIONS = ( 277 | "DEBUG=1", 278 | "$(inherited)", 279 | ); 280 | INFOPLIST_FILE = "rssiprobe Tests/Info.plist"; 281 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 282 | PRODUCT_NAME = "$(TARGET_NAME)"; 283 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rssiprobe.app/rssiprobe"; 284 | }; 285 | name = Debug; 286 | }; 287 | D423FAA71A50D2E000AA51FB /* Release */ = { 288 | isa = XCBuildConfiguration; 289 | buildSettings = { 290 | BUNDLE_LOADER = "$(TEST_HOST)"; 291 | FRAMEWORK_SEARCH_PATHS = ( 292 | "$(SDKROOT)/Developer/Library/Frameworks", 293 | "$(inherited)", 294 | ); 295 | INFOPLIST_FILE = "rssiprobe Tests/Info.plist"; 296 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 297 | PRODUCT_NAME = "$(TARGET_NAME)"; 298 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/rssiprobe.app/rssiprobe"; 299 | }; 300 | name = Release; 301 | }; 302 | D4A36A9719DBB38D00648691 /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 307 | CLANG_CXX_LIBRARY = "libc++"; 308 | CLANG_ENABLE_MODULES = YES; 309 | CLANG_ENABLE_OBJC_ARC = YES; 310 | CLANG_WARN_BOOL_CONVERSION = YES; 311 | CLANG_WARN_CONSTANT_CONVERSION = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 313 | CLANG_WARN_EMPTY_BODY = YES; 314 | CLANG_WARN_ENUM_CONVERSION = YES; 315 | CLANG_WARN_INT_CONVERSION = YES; 316 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 317 | CLANG_WARN_UNREACHABLE_CODE = YES; 318 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 319 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 320 | COPY_PHASE_STRIP = NO; 321 | ENABLE_STRICT_OBJC_MSGSEND = YES; 322 | GCC_C_LANGUAGE_STANDARD = gnu99; 323 | GCC_DYNAMIC_NO_PIC = NO; 324 | GCC_OPTIMIZATION_LEVEL = 0; 325 | GCC_PREPROCESSOR_DEFINITIONS = ( 326 | "DEBUG=1", 327 | "$(inherited)", 328 | ); 329 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 330 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 331 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 332 | GCC_WARN_UNDECLARED_SELECTOR = YES; 333 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 334 | GCC_WARN_UNUSED_FUNCTION = YES; 335 | GCC_WARN_UNUSED_VARIABLE = YES; 336 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 337 | MTL_ENABLE_DEBUG_INFO = YES; 338 | ONLY_ACTIVE_ARCH = YES; 339 | SDKROOT = iphoneos; 340 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 341 | }; 342 | name = Debug; 343 | }; 344 | D4A36A9819DBB38D00648691 /* Release */ = { 345 | isa = XCBuildConfiguration; 346 | buildSettings = { 347 | ALWAYS_SEARCH_USER_PATHS = NO; 348 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 349 | CLANG_CXX_LIBRARY = "libc++"; 350 | CLANG_ENABLE_MODULES = YES; 351 | CLANG_ENABLE_OBJC_ARC = YES; 352 | CLANG_WARN_BOOL_CONVERSION = YES; 353 | CLANG_WARN_CONSTANT_CONVERSION = YES; 354 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 355 | CLANG_WARN_EMPTY_BODY = YES; 356 | CLANG_WARN_ENUM_CONVERSION = YES; 357 | CLANG_WARN_INT_CONVERSION = YES; 358 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = YES; 363 | ENABLE_NS_ASSERTIONS = NO; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | GCC_C_LANGUAGE_STANDARD = gnu99; 366 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 367 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 368 | GCC_WARN_UNDECLARED_SELECTOR = YES; 369 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 370 | GCC_WARN_UNUSED_FUNCTION = YES; 371 | GCC_WARN_UNUSED_VARIABLE = YES; 372 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 373 | MTL_ENABLE_DEBUG_INFO = NO; 374 | SDKROOT = iphoneos; 375 | VALIDATE_PRODUCT = YES; 376 | }; 377 | name = Release; 378 | }; 379 | D4A36A9A19DBB38D00648691 /* Debug */ = { 380 | isa = XCBuildConfiguration; 381 | buildSettings = { 382 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 383 | INFOPLIST_FILE = "$(SRCROOT)/classes/Info.plist"; 384 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 385 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 386 | PRODUCT_NAME = rssiprobe; 387 | }; 388 | name = Debug; 389 | }; 390 | D4A36A9B19DBB38D00648691 /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | buildSettings = { 393 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 394 | INFOPLIST_FILE = "$(SRCROOT)/classes/Info.plist"; 395 | IPHONEOS_DEPLOYMENT_TARGET = 8.1; 396 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 397 | PRODUCT_NAME = rssiprobe; 398 | }; 399 | name = Release; 400 | }; 401 | /* End XCBuildConfiguration section */ 402 | 403 | /* Begin XCConfigurationList section */ 404 | D423FAA81A50D2E000AA51FB /* Build configuration list for PBXNativeTarget "rssiprobe Tests" */ = { 405 | isa = XCConfigurationList; 406 | buildConfigurations = ( 407 | D423FAA61A50D2E000AA51FB /* Debug */, 408 | D423FAA71A50D2E000AA51FB /* Release */, 409 | ); 410 | defaultConfigurationIsVisible = 0; 411 | }; 412 | D4A36A7519DBB38D00648691 /* Build configuration list for PBXProject "rssiprobe" */ = { 413 | isa = XCConfigurationList; 414 | buildConfigurations = ( 415 | D4A36A9719DBB38D00648691 /* Debug */, 416 | D4A36A9819DBB38D00648691 /* Release */, 417 | ); 418 | defaultConfigurationIsVisible = 0; 419 | defaultConfigurationName = Release; 420 | }; 421 | D4A36A9919DBB38D00648691 /* Build configuration list for PBXNativeTarget "rssiprobe" */ = { 422 | isa = XCConfigurationList; 423 | buildConfigurations = ( 424 | D4A36A9A19DBB38D00648691 /* Debug */, 425 | D4A36A9B19DBB38D00648691 /* Release */, 426 | ); 427 | defaultConfigurationIsVisible = 0; 428 | defaultConfigurationName = Release; 429 | }; 430 | /* End XCConfigurationList section */ 431 | }; 432 | rootObject = D4A36A7219DBB38D00648691 /* Project object */; 433 | } 434 | -------------------------------------------------------------------------------- /firmware/Blinky/Source/devinfoservice.c: -------------------------------------------------------------------------------- 1 | #include "bcomdef.h" 2 | #include "OSAL.h" 3 | #include "linkdb.h" 4 | #include "att.h" 5 | #include "gatt.h" 6 | #include "gatt_uuid.h" 7 | #include "gatt_profile_uuid.h" 8 | #include "gattservapp.h" 9 | 10 | #include "devinfoservice.h" 11 | 12 | /********************************************************************* 13 | * GLOBAL VARIABLES 14 | */ 15 | // Device information service 16 | CONST uint8 devInfoServUUID[ATT_BT_UUID_SIZE] = 17 | { 18 | LO_UINT16(DEVINFO_SERV_UUID), HI_UINT16(DEVINFO_SERV_UUID) 19 | }; 20 | 21 | // System ID 22 | CONST uint8 devInfoSystemIdUUID[ATT_BT_UUID_SIZE] = 23 | { 24 | LO_UINT16(SYSTEM_ID_UUID), HI_UINT16(SYSTEM_ID_UUID) 25 | }; 26 | 27 | // Model Number String 28 | CONST uint8 devInfoModelNumberUUID[ATT_BT_UUID_SIZE] = 29 | { 30 | LO_UINT16(MODEL_NUMBER_UUID), HI_UINT16(MODEL_NUMBER_UUID) 31 | }; 32 | 33 | // Serial Number String 34 | CONST uint8 devInfoSerialNumberUUID[ATT_BT_UUID_SIZE] = 35 | { 36 | LO_UINT16(SERIAL_NUMBER_UUID), HI_UINT16(SERIAL_NUMBER_UUID) 37 | }; 38 | 39 | // Firmware Revision String 40 | CONST uint8 devInfoFirmwareRevUUID[ATT_BT_UUID_SIZE] = 41 | { 42 | LO_UINT16(FIRMWARE_REV_UUID), HI_UINT16(FIRMWARE_REV_UUID) 43 | }; 44 | 45 | // Hardware Revision String 46 | CONST uint8 devInfoHardwareRevUUID[ATT_BT_UUID_SIZE] = 47 | { 48 | LO_UINT16(HARDWARE_REV_UUID), HI_UINT16(HARDWARE_REV_UUID) 49 | }; 50 | 51 | // Software Revision String 52 | CONST uint8 devInfoSoftwareRevUUID[ATT_BT_UUID_SIZE] = 53 | { 54 | LO_UINT16(SOFTWARE_REV_UUID), HI_UINT16(SOFTWARE_REV_UUID) 55 | }; 56 | 57 | // Manufacturer Name String 58 | CONST uint8 devInfoMfrNameUUID[ATT_BT_UUID_SIZE] = 59 | { 60 | LO_UINT16(MANUFACTURER_NAME_UUID), HI_UINT16(MANUFACTURER_NAME_UUID) 61 | }; 62 | 63 | // IEEE 11073-20601 Regulatory Certification Data List 64 | CONST uint8 devInfo11073CertUUID[ATT_BT_UUID_SIZE] = 65 | { 66 | LO_UINT16(IEEE_11073_CERT_DATA_UUID), HI_UINT16(IEEE_11073_CERT_DATA_UUID) 67 | }; 68 | 69 | // PnP ID 70 | CONST uint8 devInfoPnpIdUUID[ATT_BT_UUID_SIZE] = 71 | { 72 | LO_UINT16(PNP_ID_UUID), HI_UINT16(PNP_ID_UUID) 73 | }; 74 | 75 | 76 | /********************************************************************* 77 | * EXTERNAL VARIABLES 78 | */ 79 | 80 | /********************************************************************* 81 | * EXTERNAL FUNCTIONS 82 | */ 83 | 84 | /********************************************************************* 85 | * LOCAL VARIABLES 86 | */ 87 | 88 | /********************************************************************* 89 | * Profile Attributes - variables 90 | */ 91 | 92 | // Device Information Service attribute 93 | static CONST gattAttrType_t devInfoService = { ATT_BT_UUID_SIZE, devInfoServUUID }; 94 | 95 | // System ID characteristic 96 | static uint8 devInfoSystemIdProps = GATT_PROP_READ; 97 | static uint8 devInfoSystemId[DEVINFO_SYSTEM_ID_LEN] = {0, 0, 0, 0, 0, 0, 0, 0}; 98 | 99 | // Model Number String characteristic 100 | static uint8 devInfoModelNumberProps = GATT_PROP_READ; 101 | static const uint8 devInfoModelNumber[] = "BLE Dev Kit"; 102 | 103 | // Serial Number String characteristic 104 | static uint8 devInfoSerialNumberProps = GATT_PROP_READ; 105 | static const uint8 devInfoSerialNumber[] = "NSW001"; 106 | 107 | // Firmware Revision String characteristic 108 | static uint8 devInfoFirmwareRevProps = GATT_PROP_READ; 109 | static const uint8 devInfoFirmwareRev[] = "1.0"; 110 | 111 | // Hardware Revision String characteristic 112 | static uint8 devInfoHardwareRevProps = GATT_PROP_READ; 113 | static const uint8 devInfoHardwareRev[] = "1.2"; 114 | 115 | // Software Revision String characteristic 116 | static uint8 devInfoSoftwareRevProps = GATT_PROP_READ; 117 | static const uint8 devInfoSoftwareRev[] = "1.0"; 118 | 119 | // Manufacturer Name String characteristic 120 | static uint8 devInfoMfrNameProps = GATT_PROP_READ; 121 | static const uint8 devInfoMfrName[] = "Nick Walker"; 122 | 123 | // IEEE 11073-20601 Regulatory Certification Data List characteristic 124 | static uint8 devInfo11073CertProps = GATT_PROP_READ; 125 | static const uint8 devInfo11073Cert[] = 126 | { 127 | DEVINFO_11073_BODY_EXP, // authoritative body type 128 | 0x00, // authoritative body structure type 129 | // authoritative body data follows below: 130 | 'e', 'x', 'p', 'e', 'r', 'i', 'm', 'e', 'n', 't', 'a', 'l' 131 | }; 132 | 133 | // System ID characteristic 134 | static uint8 devInfoPnpIdProps = GATT_PROP_READ; 135 | static uint8 devInfoPnpId[DEVINFO_PNP_ID_LEN] = 136 | { 137 | 1, // Vendor ID source (1=Bluetooth SIG) 138 | LO_UINT16(0x000D), HI_UINT16(0x000D), // Vendor ID (Texas Instruments) 139 | LO_UINT16(0x0000), HI_UINT16(0x0000), // Product ID (vendor-specific) 140 | LO_UINT16(0x0110), HI_UINT16(0x0110) // Product version (JJ.M.N) 141 | }; 142 | 143 | /********************************************************************* 144 | * Profile Attributes - Table 145 | */ 146 | 147 | static gattAttribute_t devInfoAttrTbl[] = 148 | { 149 | // Device Information Service 150 | { 151 | { ATT_BT_UUID_SIZE, primaryServiceUUID }, /* type */ 152 | GATT_PERMIT_READ, /* permissions */ 153 | 0, /* handle */ 154 | (uint8 *)&devInfoService /* pValue */ 155 | }, 156 | 157 | // System ID Declaration 158 | { 159 | { ATT_BT_UUID_SIZE, characterUUID }, 160 | GATT_PERMIT_READ, 161 | 0, 162 | &devInfoSystemIdProps 163 | }, 164 | 165 | // System ID Value 166 | { 167 | { ATT_BT_UUID_SIZE, devInfoSystemIdUUID }, 168 | GATT_PERMIT_READ, 169 | 0, 170 | (uint8 *) devInfoSystemId 171 | }, 172 | 173 | // Model Number String Declaration 174 | { 175 | { ATT_BT_UUID_SIZE, characterUUID }, 176 | GATT_PERMIT_READ, 177 | 0, 178 | &devInfoModelNumberProps 179 | }, 180 | 181 | // Model Number Value 182 | { 183 | { ATT_BT_UUID_SIZE, devInfoModelNumberUUID }, 184 | GATT_PERMIT_READ, 185 | 0, 186 | (uint8 *) devInfoModelNumber 187 | }, 188 | 189 | // Serial Number String Declaration 190 | { 191 | { ATT_BT_UUID_SIZE, characterUUID }, 192 | GATT_PERMIT_READ, 193 | 0, 194 | &devInfoSerialNumberProps 195 | }, 196 | 197 | // Serial Number Value 198 | { 199 | { ATT_BT_UUID_SIZE, devInfoSerialNumberUUID }, 200 | GATT_PERMIT_READ, 201 | 0, 202 | (uint8 *) devInfoSerialNumber 203 | }, 204 | 205 | // Firmware Revision String Declaration 206 | { 207 | { ATT_BT_UUID_SIZE, characterUUID }, 208 | GATT_PERMIT_READ, 209 | 0, 210 | &devInfoFirmwareRevProps 211 | }, 212 | 213 | // Firmware Revision Value 214 | { 215 | { ATT_BT_UUID_SIZE, devInfoFirmwareRevUUID }, 216 | GATT_PERMIT_READ, 217 | 0, 218 | (uint8 *) devInfoFirmwareRev 219 | }, 220 | 221 | // Hardware Revision String Declaration 222 | { 223 | { ATT_BT_UUID_SIZE, characterUUID }, 224 | GATT_PERMIT_READ, 225 | 0, 226 | &devInfoHardwareRevProps 227 | }, 228 | 229 | // Hardware Revision Value 230 | { 231 | { ATT_BT_UUID_SIZE, devInfoHardwareRevUUID }, 232 | GATT_PERMIT_READ, 233 | 0, 234 | (uint8 *) devInfoHardwareRev 235 | }, 236 | 237 | // Software Revision String Declaration 238 | { 239 | { ATT_BT_UUID_SIZE, characterUUID }, 240 | GATT_PERMIT_READ, 241 | 0, 242 | &devInfoSoftwareRevProps 243 | }, 244 | 245 | // Software Revision Value 246 | { 247 | { ATT_BT_UUID_SIZE, devInfoSoftwareRevUUID }, 248 | GATT_PERMIT_READ, 249 | 0, 250 | (uint8 *) devInfoSoftwareRev 251 | }, 252 | 253 | // Manufacturer Name String Declaration 254 | { 255 | { ATT_BT_UUID_SIZE, characterUUID }, 256 | GATT_PERMIT_READ, 257 | 0, 258 | &devInfoMfrNameProps 259 | }, 260 | 261 | // Manufacturer Name Value 262 | { 263 | { ATT_BT_UUID_SIZE, devInfoMfrNameUUID }, 264 | GATT_PERMIT_READ, 265 | 0, 266 | (uint8 *) devInfoMfrName 267 | }, 268 | 269 | // IEEE 11073-20601 Regulatory Certification Data List Declaration 270 | { 271 | { ATT_BT_UUID_SIZE, characterUUID }, 272 | GATT_PERMIT_READ, 273 | 0, 274 | &devInfo11073CertProps 275 | }, 276 | 277 | // IEEE 11073-20601 Regulatory Certification Data List Value 278 | { 279 | { ATT_BT_UUID_SIZE, devInfo11073CertUUID }, 280 | GATT_PERMIT_READ, 281 | 0, 282 | (uint8 *) devInfo11073Cert 283 | }, 284 | 285 | // PnP ID Declaration 286 | { 287 | { ATT_BT_UUID_SIZE, characterUUID }, 288 | GATT_PERMIT_READ, 289 | 0, 290 | &devInfoPnpIdProps 291 | }, 292 | 293 | // PnP ID Value 294 | { 295 | { ATT_BT_UUID_SIZE, devInfoPnpIdUUID }, 296 | GATT_PERMIT_READ, 297 | 0, 298 | (uint8 *) devInfoPnpId 299 | } 300 | }; 301 | 302 | 303 | /********************************************************************* 304 | * LOCAL FUNCTIONS 305 | */ 306 | static uint8 devInfo_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 307 | uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ); 308 | 309 | /********************************************************************* 310 | * PROFILE CALLBACKS 311 | */ 312 | // Device Info Service Callbacks 313 | CONST gattServiceCBs_t devInfoCBs = 314 | { 315 | devInfo_ReadAttrCB, // Read callback function pointer 316 | NULL, // Write callback function pointer 317 | NULL // Authorization callback function pointer 318 | }; 319 | 320 | /********************************************************************* 321 | * NETWORK LAYER CALLBACKS 322 | */ 323 | 324 | /********************************************************************* 325 | * PUBLIC FUNCTIONS 326 | */ 327 | 328 | /********************************************************************* 329 | * @fn DevInfo_AddService 330 | * 331 | * @brief Initializes the Device Information service by registering 332 | * GATT attributes with the GATT server. 333 | * 334 | * @return Success or Failure 335 | */ 336 | bStatus_t DevInfo_AddService( void ) 337 | { 338 | // Register GATT attribute list and CBs with GATT Server App 339 | return GATTServApp_RegisterService( devInfoAttrTbl, 340 | GATT_NUM_ATTRS( devInfoAttrTbl ), 341 | &devInfoCBs ); 342 | } 343 | 344 | /********************************************************************* 345 | * @fn DevInfo_SetParameter 346 | * 347 | * @brief Set a Device Information parameter. 348 | * 349 | * @param param - Profile parameter ID 350 | * @param len - length of data to write 351 | * @param value - pointer to data to write. This is dependent on 352 | * the parameter ID and WILL be cast to the appropriate 353 | * data type (example: data type of uint16 will be cast to 354 | * uint16 pointer). 355 | * 356 | * @return bStatus_t 357 | */ 358 | bStatus_t DevInfo_SetParameter( uint8 param, uint8 len, void *value ) 359 | { 360 | bStatus_t ret = SUCCESS; 361 | 362 | switch ( param ) 363 | { 364 | case DEVINFO_SYSTEM_ID: 365 | osal_memcpy(devInfoSystemId, value, len); 366 | break; 367 | default: 368 | ret = INVALIDPARAMETER; 369 | break; 370 | } 371 | 372 | return ( ret ); 373 | } 374 | 375 | /********************************************************************* 376 | * @fn DevInfo_GetParameter 377 | * 378 | * @brief Get a Device Information parameter. 379 | * 380 | * @param param - Profile parameter ID 381 | * @param value - pointer to data to get. This is dependent on 382 | * the parameter ID and WILL be cast to the appropriate 383 | * data type (example: data type of uint16 will be cast to 384 | * uint16 pointer). 385 | * 386 | * @return bStatus_t 387 | */ 388 | bStatus_t DevInfo_GetParameter( uint8 param, void *value ) 389 | { 390 | bStatus_t ret = SUCCESS; 391 | 392 | switch ( param ) 393 | { 394 | case DEVINFO_SYSTEM_ID: 395 | osal_memcpy(value, devInfoSystemId, sizeof(devInfoSystemId)); 396 | break; 397 | 398 | case DEVINFO_MODEL_NUMBER: 399 | osal_memcpy(value, devInfoModelNumber, sizeof(devInfoModelNumber)); 400 | break; 401 | case DEVINFO_SERIAL_NUMBER: 402 | osal_memcpy(value, devInfoSerialNumber, sizeof(devInfoSerialNumber)); 403 | break; 404 | 405 | case DEVINFO_FIRMWARE_REV: 406 | osal_memcpy(value, devInfoFirmwareRev, sizeof(devInfoFirmwareRev)); 407 | break; 408 | 409 | case DEVINFO_HARDWARE_REV: 410 | osal_memcpy(value, devInfoHardwareRev, sizeof(devInfoHardwareRev)); 411 | break; 412 | 413 | case DEVINFO_SOFTWARE_REV: 414 | osal_memcpy(value, devInfoSoftwareRev, sizeof(devInfoSoftwareRev)); 415 | break; 416 | 417 | case DEVINFO_MANUFACTURER_NAME: 418 | osal_memcpy(value, devInfoMfrName, sizeof(devInfoMfrName)); 419 | break; 420 | 421 | case DEVINFO_11073_CERT_DATA: 422 | osal_memcpy(value, devInfo11073Cert, sizeof(devInfo11073Cert)); 423 | break; 424 | 425 | case DEVINFO_PNP_ID: 426 | osal_memcpy(value, devInfoPnpId, sizeof(devInfoPnpId)); 427 | break; 428 | 429 | default: 430 | ret = INVALIDPARAMETER; 431 | break; 432 | } 433 | 434 | return ( ret ); 435 | } 436 | 437 | /********************************************************************* 438 | * @fn devInfo_ReadAttrCB 439 | * 440 | * @brief Read an attribute. 441 | * 442 | * @param connHandle - connection message was received on 443 | * @param pAttr - pointer to attribute 444 | * @param pValue - pointer to data to be read 445 | * @param pLen - length of data to be read 446 | * @param offset - offset of the first octet to be read 447 | * @param maxLen - maximum length of data to be read 448 | * 449 | * @return Success or Failure 450 | */ 451 | static uint8 devInfo_ReadAttrCB( uint16 connHandle, gattAttribute_t *pAttr, 452 | uint8 *pValue, uint8 *pLen, uint16 offset, uint8 maxLen ) 453 | { 454 | bStatus_t status = SUCCESS; 455 | uint16 uuid = BUILD_UINT16( pAttr->type.uuid[0], pAttr->type.uuid[1]); 456 | 457 | switch (uuid) 458 | { 459 | case SYSTEM_ID_UUID: 460 | // verify offset 461 | if (offset >= sizeof(devInfoSystemId)) 462 | { 463 | status = ATT_ERR_INVALID_OFFSET; 464 | } 465 | else 466 | { 467 | // determine read length 468 | *pLen = MIN(maxLen, (sizeof(devInfoSystemId) - offset)); 469 | 470 | // copy data 471 | osal_memcpy(pValue, &devInfoSystemId[offset], *pLen); 472 | } 473 | break; 474 | 475 | case MODEL_NUMBER_UUID: 476 | // verify offset 477 | if (offset >= (sizeof(devInfoModelNumber) - 1)) 478 | { 479 | status = ATT_ERR_INVALID_OFFSET; 480 | } 481 | else 482 | { 483 | // determine read length (exclude null terminating character) 484 | *pLen = MIN(maxLen, ((sizeof(devInfoModelNumber) - 1) - offset)); 485 | 486 | // copy data 487 | osal_memcpy(pValue, &devInfoModelNumber[offset], *pLen); 488 | } 489 | break; 490 | 491 | case SERIAL_NUMBER_UUID: 492 | // verify offset 493 | if (offset >= (sizeof(devInfoSerialNumber) - 1)) 494 | { 495 | status = ATT_ERR_INVALID_OFFSET; 496 | } 497 | else 498 | { 499 | // determine read length (exclude null terminating character) 500 | *pLen = MIN(maxLen, ((sizeof(devInfoSerialNumber) - 1) - offset)); 501 | 502 | // copy data 503 | osal_memcpy(pValue, &devInfoSerialNumber[offset], *pLen); 504 | } 505 | break; 506 | 507 | case FIRMWARE_REV_UUID: 508 | // verify offset 509 | if (offset >= (sizeof(devInfoFirmwareRev) - 1)) 510 | { 511 | status = ATT_ERR_INVALID_OFFSET; 512 | } 513 | else 514 | { 515 | // determine read length (exclude null terminating character) 516 | *pLen = MIN(maxLen, ((sizeof(devInfoFirmwareRev) - 1) - offset)); 517 | 518 | // copy data 519 | osal_memcpy(pValue, &devInfoFirmwareRev[offset], *pLen); 520 | } 521 | break; 522 | 523 | case HARDWARE_REV_UUID: 524 | // verify offset 525 | if (offset >= (sizeof(devInfoHardwareRev) - 1)) 526 | { 527 | status = ATT_ERR_INVALID_OFFSET; 528 | } 529 | else 530 | { 531 | // determine read length (exclude null terminating character) 532 | *pLen = MIN(maxLen, ((sizeof(devInfoHardwareRev) - 1) - offset)); 533 | 534 | // copy data 535 | osal_memcpy(pValue, &devInfoHardwareRev[offset], *pLen); 536 | } 537 | break; 538 | 539 | case SOFTWARE_REV_UUID: 540 | // verify offset 541 | if (offset >= (sizeof(devInfoSoftwareRev) - 1)) 542 | { 543 | status = ATT_ERR_INVALID_OFFSET; 544 | } 545 | else 546 | { 547 | // determine read length (exclude null terminating character) 548 | *pLen = MIN(maxLen, ((sizeof(devInfoSoftwareRev) - 1) - offset)); 549 | 550 | // copy data 551 | osal_memcpy(pValue, &devInfoSoftwareRev[offset], *pLen); 552 | } 553 | break; 554 | 555 | case MANUFACTURER_NAME_UUID: 556 | // verify offset 557 | if (offset >= (sizeof(devInfoMfrName) - 1)) 558 | { 559 | status = ATT_ERR_INVALID_OFFSET; 560 | } 561 | else 562 | { 563 | // determine read length (exclude null terminating character) 564 | *pLen = MIN(maxLen, ((sizeof(devInfoMfrName) - 1) - offset)); 565 | 566 | // copy data 567 | osal_memcpy(pValue, &devInfoMfrName[offset], *pLen); 568 | } 569 | break; 570 | 571 | case IEEE_11073_CERT_DATA_UUID: 572 | // verify offset 573 | if (offset >= sizeof(devInfo11073Cert)) 574 | { 575 | status = ATT_ERR_INVALID_OFFSET; 576 | } 577 | else 578 | { 579 | // determine read length 580 | *pLen = MIN(maxLen, (sizeof(devInfo11073Cert) - offset)); 581 | 582 | // copy data 583 | osal_memcpy(pValue, &devInfo11073Cert[offset], *pLen); 584 | } 585 | break; 586 | 587 | case PNP_ID_UUID: 588 | // verify offset 589 | if (offset >= sizeof(devInfoPnpId)) 590 | { 591 | status = ATT_ERR_INVALID_OFFSET; 592 | } 593 | else 594 | { 595 | // determine read length 596 | *pLen = MIN(maxLen, (sizeof(devInfoPnpId) - offset)); 597 | 598 | // copy data 599 | osal_memcpy(pValue, &devInfoPnpId[offset], *pLen); 600 | } 601 | break; 602 | 603 | default: 604 | *pLen = 0; 605 | status = ATT_ERR_ATTR_NOT_FOUND; 606 | break; 607 | } 608 | 609 | return ( status ); 610 | } 611 | 612 | 613 | /********************************************************************* 614 | *********************************************************************/ 615 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/SimpleBLEPeripheral.ewd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | 6 | CC2541 7 | 8 | 8051 9 | 10 | 1 11 | 12 | C-SPY 13 | 2 14 | 15 | 8 16 | 1 17 | 1 18 | 22 | 26 | 30 | 34 | 38 | 42 | 46 | 50 | 54 | 58 | 62 | 66 | 70 | 74 | 78 | 82 | 86 | 90 | 94 | 98 | 102 | 106 | 110 | 114 | 118 | 122 | 126 | 130 | 134 | 138 | 142 | 146 | 150 | 154 | 158 | 159 | 160 | 161 | _3RD_ID 162 | 1 163 | 164 | 0 165 | 1 166 | 1 167 | 171 | 175 | 179 | 183 | 184 | 185 | 186 | CHIPCON_ID 187 | 2 188 | 189 | 4 190 | 1 191 | 1 192 | 196 | 200 | 204 | 208 | 212 | 216 | 220 | 224 | 229 | 233 | 237 | 242 | 246 | 250 | 254 | 258 | 262 | 266 | 270 | 274 | 278 | 282 | 286 | 287 | 288 | 289 | FS2_ID 290 | 1 291 | 292 | 0 293 | 1 294 | 1 295 | 299 | 304 | 308 | 312 | 316 | 320 | 324 | 328 | 332 | 333 | 334 | 335 | INFINEON_ID 336 | 1 337 | 338 | 2 339 | 1 340 | 1 341 | 345 | 349 | 353 | 357 | 361 | 365 | 369 | 373 | 377 | 381 | 385 | 390 | 394 | 398 | 399 | 400 | 401 | NS_ID 402 | 1 403 | 404 | 0 405 | 1 406 | 1 407 | 411 | 415 | 419 | 420 | 421 | 422 | ROM_ID 423 | 1 424 | 425 | 2 426 | 1 427 | 1 428 | 432 | 436 | 440 | 444 | 449 | 454 | 459 | 464 | 469 | 474 | 478 | 482 | 486 | 490 | 491 | 492 | 493 | AD2_ID 494 | 2 495 | 496 | 6 497 | 1 498 | 1 499 | 503 | 507 | 512 | 517 | 521 | 525 | 529 | 533 | 537 | 541 | 542 | 543 | 544 | CYGNAL_ID 545 | 2 546 | 547 | 2 548 | 1 549 | 1 550 | 554 | 558 | 562 | 566 | 571 | 576 | 580 | 584 | 588 | 592 | 596 | 600 | 604 | 608 | 612 | 616 | 617 | 618 | 619 | SIM_ID 620 | 1 621 | 622 | 2 623 | 1 624 | 1 625 | 629 | 633 | 637 | 641 | 642 | 643 | 644 | 645 | $EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ENU.ewplugin 646 | 1 647 | 648 | 649 | $EW_DIR$\common\plugins\Orti\Orti.ENU.ewplugin 650 | 0 651 | 652 | 653 | $EW_DIR$\common\plugins\SymList\SymList.ENU.ewplugin 654 | 1 655 | 656 | 657 | $EW_DIR$\common\plugins\uCProbe\uCProbePlugin.ENU.ewplugin 658 | 0 659 | 660 | 661 | 662 | 663 | 664 | 665 | -------------------------------------------------------------------------------- /firmware/Blinky/CC2541DB/SimpleBLEPeripheral.dep: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 2 5 | 251959038 6 | 7 | CC2541 8 | 9 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_mcu.h 10 | $PROJ_DIR$\..\Source\blinkyProfile.c 11 | $PROJ_DIR$\..\Source\blinkyProfile.h 12 | $PROJ_DIR$\..\Source\OSAL_SimpleBLEPeripheral.c 13 | $PROJ_DIR$\..\Source\simpleBLEPeripheral.c 14 | $PROJ_DIR$\..\Source\simpleBLEPeripheral.h 15 | $PROJ_DIR$\..\Source\SimpleBLEPeripheral_Main.c 16 | $PROJ_DIR$\..\..\..\..\Components\hal\common\hal_drivers.c 17 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_adc.h 18 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_assert.h 19 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_board.h 20 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_defs.h 21 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_drivers.h 22 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_flash.h 23 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_key.h 24 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_lcd.h 25 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_led.h 26 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_sleep.h 27 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_timer.h 28 | $PROJ_DIR$\..\..\..\..\Components\hal\include\hal_uart.h 29 | $PROJ_DIR$\..\..\..\..\Components\services\saddr\saddr.h 30 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_board_cfg.h 31 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_flash.c 32 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_adc.c 33 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_aes.c 34 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_crc.c 35 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_dma.c 36 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_sleep.c 37 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_key.c 38 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_lcd.c 39 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_led.c 40 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_startup.c 41 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_timer.c 42 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_uart.c 43 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_types.h 44 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_aes.h 45 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_crc.h 46 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_dma.h 47 | $PROJ_DIR$\CC2541\Obj\npi.r51 48 | $PROJ_DIR$\CC2541\Obj\hal_sleep.r51 49 | $PROJ_DIR$\CC2541\Obj\gap.pbi 50 | $PROJ_DIR$\CC2541\Obj\hal_adc.r51 51 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL_PwrMgr.h 52 | $PROJ_DIR$\CC2541\Obj\hal_aes.r51 53 | $PROJ_DIR$\CC2541\Obj\hal_dma.r51 54 | $PROJ_DIR$\..\..\..\..\Components\osal\include\osal_snv.h 55 | $PROJ_DIR$\CC2541\Exe\SimpleBLEPeripheral.hex 56 | $PROJ_DIR$\CC2541\Obj\SimpleBLEPeripheral_Main.r51 57 | $PROJ_DIR$\CC2541\Obj\hal_drivers.r51 58 | $PROJ_DIR$\CC2541\Obj\hal_crc.r51 59 | $PROJ_DIR$\CC2541\Obj\hal_key.r51 60 | $PROJ_DIR$\CC2541\List\SimpleBLEPeripheral.map 61 | $PROJ_DIR$\CC2541\Obj\simpleBLEPeripheral.r51 62 | $PROJ_DIR$\CC2541\Obj\OSAL_SimpleBLEPeripheral.r51 63 | $PROJ_DIR$\CC2541\Obj\hal_flash.r51 64 | $PROJ_DIR$\CC2541\Obj\hal_lcd.r51 65 | $PROJ_DIR$\CC2541\Obj\devinfoservice.pbi 66 | $PROJ_DIR$\..\..\Profiles\Blink\blinkProfile.c 67 | $PROJ_DIR$\..\..\Profiles\Blink\blinkyProfile.c 68 | $PROJ_DIR$\CC2541\Obj\blinkyProfile.r51 69 | $PROJ_DIR$\..\..\Profiles\Blink\blinkyProfile.h 70 | $PROJ_DIR$\CC2541\Obj\blinkyProfile.pbi 71 | $PROJ_DIR$\CC2541\Obj\blinkProfile.pbi 72 | $PROJ_DIR$\CC2541\Obj\blinkProfile.r51 73 | $PROJ_DIR$\..\..\..\..\Components\ble\include\att.h 74 | $PROJ_DIR$\..\..\..\..\Components\ble\include\gap.h 75 | $PROJ_DIR$\..\..\..\..\Components\ble\include\gatt.h 76 | $PROJ_DIR$\..\..\..\..\Components\ble\include\gatt_uuid.h 77 | $PROJ_DIR$\..\..\..\..\Components\ble\include\hci.h 78 | $PROJ_DIR$\..\..\..\..\Components\ble\include\l2cap.h 79 | $PROJ_DIR$\..\..\..\..\Components\ble\host\linkdb.h 80 | $PROJ_DIR$\..\..\..\..\Components\ble\controller\include\ll.h 81 | $PROJ_DIR$\..\..\common\npi\npi_np\npi.h 82 | $PROJ_DIR$\..\..\..\..\Components\ble\controller\include\phy.h 83 | $PROJ_DIR$\..\..\..\..\Components\ble\include\sm.h 84 | $PROJ_DIR$\..\..\Libraries\CC2541DB\bin\CC2541_BLE_peri.lib 85 | $PROJ_DIR$\..\..\Libraries\Common\bin\CC254x_BLE_HCI_TL_None.lib 86 | $PROJ_DIR$\..\..\common\npi\npi_np\npi.c 87 | $PROJ_DIR$\..\..\..\..\Components\ble\include\bcomdef.h 88 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL.c 89 | $PROJ_DIR$\..\..\..\..\Components\osal\common\osal_bufmgr.c 90 | $PROJ_DIR$\..\..\..\..\Components\osal\common\osal_cbtimer.c 91 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_ClockBLE.c 92 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_Memory.c 93 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_PwrMgr.c 94 | $PROJ_DIR$\..\..\..\..\Components\osal\mcu\cc2540\osal_snv.c 95 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_Timers.c 96 | $PROJ_DIR$\..\..\Profiles\Roles\gap.c 97 | $PROJ_DIR$\..\..\Profiles\Roles\gapbondmgr.c 98 | $PROJ_DIR$\..\..\Profiles\Roles\gapbondmgr.h 99 | $PROJ_DIR$\..\..\Include\gapgattserver.h 100 | $PROJ_DIR$\..\..\..\..\Components\ble\host\gatt_uuid.c 101 | $PROJ_DIR$\..\..\Include\gattservapp.h 102 | $PROJ_DIR$\..\..\Profiles\OAD\oad.h 103 | $PROJ_DIR$\..\..\Profiles\OAD\oad_target.c 104 | $PROJ_DIR$\..\..\Profiles\OAD\oad_target.h 105 | $PROJ_DIR$\..\..\Profiles\Roles\peripheral.c 106 | $PROJ_DIR$\..\..\Profiles\Roles\peripheral.h 107 | $PROJ_DIR$\..\..\Profiles\Roles\peripheralBroadcaster.c 108 | $PROJ_DIR$\..\..\Profiles\Roles\peripheralBroadcaster.h 109 | $PROJ_DIR$\..\..\Profiles\Keys\simplekeys.c 110 | $PROJ_DIR$\..\..\Profiles\Keys\simplekeys.h 111 | $PROJ_DIR$\..\..\config\buildComponents.cfg 112 | $PROJ_DIR$\buildConfig.cfg 113 | $PROJ_DIR$\..\..\common\cc2540\OnBoard.c 114 | $PROJ_DIR$\..\..\common\cc2540\OnBoard.h 115 | $PROJ_DIR$\..\Source\devinfoservice.c 116 | $PROJ_DIR$\..\Source\devinfoservice.h 117 | $PROJ_DIR$\CC2541\Obj\gapbondmgr.pbi 118 | $PROJ_DIR$\CC2541\Obj\gatt_uuid.pbi 119 | $PROJ_DIR$\CC2541\Obj\peripheral.pbi 120 | $PROJ_DIR$\CC2541\Obj\hal_lcd.pbi 121 | $PROJ_DIR$\CC2541\Obj\npi.pbi 122 | $PROJ_DIR$\CC2541\Obj\hal_led.pbi 123 | $PROJ_DIR$\CC2541\Obj\SimpleBLEPeripheral.pbd 124 | $PROJ_DIR$\CC2541\Obj\hal_startup.pbi 125 | $PROJ_DIR$\CC2541\Obj\OnBoard.pbi 126 | $PROJ_DIR$\CC2541\Obj\simpleGATTprofile.pbi 127 | $PROJ_DIR$\CC2541\Obj\OSAL_Memory.pbi 128 | $PROJ_DIR$\CC2541\Obj\OSAL.pbi 129 | $PROJ_DIR$\CC2541\Obj\OSAL_ClockBLE.pbi 130 | $PROJ_DIR$\CC2541\Obj\hal_uart.pbi 131 | $PROJ_DIR$\CC2541\Obj\hal_timer.pbi 132 | $PROJ_DIR$\CC2541\Obj\hal_sleep.pbi 133 | $PROJ_DIR$\CC2541\Obj\osal_cbtimer.pbi 134 | $PROJ_DIR$\CC2541\Obj\osal_bufmgr.pbi 135 | $PROJ_DIR$\CC2541\Obj\OSAL_Timers.pbi 136 | $PROJ_DIR$\CC2541\Obj\OSAL_PwrMgr.pbi 137 | $PROJ_DIR$\CC2541\Obj\osal_snv.pbi 138 | $PROJ_DIR$\CC2541\Obj\hal_startup.r51 139 | $PROJ_DIR$\..\..\Profiles\DevInfo\devinfoservice.h 140 | $PROJ_DIR$\..\..\Profiles\DevInfo\devinfoservice.c 141 | $PROJ_DIR$\..\..\..\..\Components\ble\hci\hci_event.h 142 | $PROJ_DIR$\..\..\..\..\Components\ble\hci\hci_tl.h 143 | $PROJ_DIR$\..\..\..\..\Components\ble\hci\hci_data.h 144 | $PROJ_DIR$\..\..\Profiles\SimpleProfile\simpleGATTprofile.c 145 | $PROJ_DIR$\..\..\..\..\Components\osal\include\comdef.h 146 | $TOOLKIT_DIR$\inc\ioCC2541.h 147 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL_Tasks.h 148 | $TOOLKIT_DIR$\inc\clib\sysmac.h 149 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL.h 150 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL_Timers.h 151 | $PROJ_DIR$\..\..\..\..\Components\osal\include\osal_cbTimer.h 152 | $TOOLKIT_DIR$\inc\clib\limits.h 153 | $PROJ_DIR$\..\..\Profiles\SimpleProfile\simpleGATTprofile.h 154 | $TOOLKIT_DIR$\inc\clib\string.h 155 | $TOOLKIT_DIR$\lib\clib\cl-pli-blxd-1e16x01.r51 156 | $PROJ_DIR$\..\..\Include\gatt_profile_uuid.h 157 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL_Memory.h 158 | $PROJ_DIR$\..\..\common\cc2540\ti_51ew_cc2540b.xcl 159 | $PROJ_DIR$\..\..\..\..\Components\osal\include\osal_bufmgr.h 160 | $PROJ_DIR$\CC2541\Obj\hal_flash.pbi 161 | $PROJ_DIR$\..\..\..\..\Components\osal\include\OSAL_Clock.h 162 | $PROJ_DIR$\CC2541\Obj\OSAL_ClockBLE.r51 163 | $PROJ_DIR$\CC2541\Obj\hal_key.pbi 164 | $PROJ_DIR$\..\..\..\..\Components\ble\controller\include\ll_math.h 165 | $PROJ_DIR$\CC2541\Obj\SimpleBLEPeripheral_Main.pbi 166 | $PROJ_DIR$\..\..\..\..\Components\ble\controller\include\ll_timer2.h 167 | $PROJ_DIR$\..\..\..\..\Components\ble\controller\include\ll_sleep.h 168 | $PROJ_DIR$\CC2541\Obj\osal_bufmgr.r51 169 | $PROJ_DIR$\CC2541\Exe\SimpleBLEPeripheral.d51 170 | $PROJ_DIR$\CC2541\Obj\osal_snv.r51 171 | $PROJ_DIR$\CC2541\Obj\peripheral.r51 172 | $PROJ_DIR$\CC2541\Obj\simpleBLEPeripheral.pbi 173 | $PROJ_DIR$\CC2541\Obj\devinfoservice.r51 174 | $PROJ_DIR$\CC2541\Obj\hal_crc.pbi 175 | $PROJ_DIR$\CC2541\Obj\OnBoard.r51 176 | $PROJ_DIR$\CC2541\Obj\OSAL_PwrMgr.r51 177 | $PROJ_DIR$\CC2541\Obj\OSAL_Timers.r51 178 | $PROJ_DIR$\CC2541\Obj\simpleGATTprofile.r51 179 | $PROJ_DIR$\CC2541\Obj\OSAL_SimpleBLEPeripheral.pbi 180 | $PROJ_DIR$\CC2541\Obj\hal_aes.pbi 181 | $PROJ_DIR$\CC2541\Obj\hal_adc.pbi 182 | $PROJ_DIR$\CC2541\Obj\hal_dma.pbi 183 | $PROJ_DIR$\CC2541\Obj\gapbondmgr.r51 184 | $PROJ_DIR$\CC2541\Obj\hal_drivers.pbi 185 | $PROJ_DIR$\CC2541\Obj\OSAL_Memory.r51 186 | $PROJ_DIR$\CC2541\Obj\gap.r51 187 | $PROJ_DIR$\CC2541\Obj\hal_uart.r51 188 | $PROJ_DIR$\CC2541\Obj\osal_cbtimer.r51 189 | $PROJ_DIR$\CC2541\Obj\OSAL.r51 190 | $PROJ_DIR$\CC2541\Obj\gatt_uuid.r51 191 | $PROJ_DIR$\CC2541\Obj\hal_led.r51 192 | $PROJ_DIR$\CC2541\Obj\hal_timer.r51 193 | $PROJ_DIR$\..\Source\OSAL_BlinkyPeripheral.c 194 | $PROJ_DIR$\..\Source\BlinkyPeripheral.h 195 | $PROJ_DIR$\..\Source\BlinkyPeripheral_Main.c 196 | $PROJ_DIR$\..\Source\BlinkyPeripheral.c 197 | $PROJ_DIR$\..\Source\Macros.h 198 | $PROJ_DIR$\CC2541\Obj\OSAL_BlinkyPeripheral.pbi 199 | $PROJ_DIR$\CC2541\Obj\BlinkyPeripheral_Main.pbi 200 | $PROJ_DIR$\CC2541\Obj\BlinkyPeripheral.pbi 201 | $PROJ_DIR$\CC2541\Obj\BlinkyPeripheral_Main.r51 202 | $PROJ_DIR$\CC2541\Obj\OSAL_BlinkyPeripheral.r51 203 | $PROJ_DIR$\CC2541\Obj\BlinkyPeripheral.r51 204 | 205 | 206 | [ROOT_NODE] 207 | 208 | 209 | XLINK 210 | 160 51 46 211 | 212 | 213 | 214 | 215 | $PROJ_DIR$\..\Source\blinkyProfile.c 216 | 217 | 218 | BICOMP 219 | 61 220 | 221 | 222 | ICC8051 223 | 59 224 | 225 | 226 | 227 | 228 | BICOMP 229 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 2 188 230 | 231 | 232 | ICC8051 233 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 2 188 234 | 235 | 236 | 237 | 238 | $PROJ_DIR$\..\Source\OSAL_SimpleBLEPeripheral.c 239 | 240 | 241 | BICOMP 242 | 170 243 | 244 | 245 | ICC8051 246 | 53 247 | 248 | 249 | 250 | 251 | BICOMP 252 | 34 140 143 139 136 11 148 141 138 12 71 78 133 68 9 19 10 21 0 137 134 132 142 69 65 74 90 89 66 64 92 97 5 253 | 254 | 255 | ICC8051 256 | 102 103 34 140 143 139 136 11 148 141 138 12 71 78 133 68 9 19 10 21 0 137 134 132 142 69 65 74 90 89 66 64 92 97 5 257 | 258 | 259 | 260 | 261 | $PROJ_DIR$\..\Source\simpleBLEPeripheral.c 262 | 263 | 264 | BICOMP 265 | 163 266 | 267 | 268 | ICC8051 269 | 52 270 | 271 | 272 | 273 | 274 | BICOMP 275 | 78 136 34 11 140 143 139 148 141 42 105 0 137 17 8 10 21 16 14 15 66 64 69 68 71 9 90 92 130 2 97 89 65 74 5 276 | 277 | 278 | ICC8051 279 | 102 103 78 136 34 11 140 143 139 148 141 42 105 0 137 17 8 10 21 16 14 15 66 64 69 68 71 9 90 92 130 2 97 89 65 74 5 280 | 281 | 282 | 283 | 284 | $PROJ_DIR$\..\Source\SimpleBLEPeripheral_Main.c 285 | 286 | 287 | BICOMP 288 | 156 289 | 290 | 291 | ICC8051 292 | 47 293 | 294 | 295 | 296 | 297 | BICOMP 298 | 34 14 10 21 0 11 137 18 12 16 140 143 139 136 148 141 138 42 45 299 | 300 | 301 | ICC8051 302 | 102 103 34 14 10 21 0 11 137 18 12 16 140 143 139 136 148 141 138 42 45 303 | 304 | 305 | 306 | 307 | $PROJ_DIR$\..\..\..\..\Components\hal\common\hal_drivers.c 308 | 309 | 310 | BICOMP 311 | 175 312 | 313 | 314 | ICC8051 315 | 48 316 | 317 | 318 | 319 | 320 | BICOMP 321 | 8 34 10 21 0 11 137 35 37 12 14 15 16 17 18 19 140 143 139 136 148 141 42 322 | 323 | 324 | ICC8051 325 | 102 103 8 34 10 21 0 11 137 35 37 12 14 15 16 17 18 19 140 143 139 136 148 141 42 326 | 327 | 328 | 329 | 330 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_flash.c 331 | 332 | 333 | BICOMP 334 | 151 335 | 336 | 337 | ICC8051 338 | 54 339 | 340 | 341 | 342 | 343 | BICOMP 344 | 21 0 11 34 137 37 10 13 345 | 346 | 347 | ICC8051 348 | 102 103 21 0 11 34 137 37 10 13 349 | 350 | 351 | 352 | 353 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_adc.c 354 | 355 | 356 | BICOMP 357 | 172 358 | 359 | 360 | ICC8051 361 | 41 362 | 363 | 364 | 365 | 366 | BICOMP 367 | 8 34 10 21 0 11 137 368 | 369 | 370 | ICC8051 371 | 102 103 8 34 10 21 0 11 137 372 | 373 | 374 | 375 | 376 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_aes.c 377 | 378 | 379 | BICOMP 380 | 171 381 | 382 | 383 | ICC8051 384 | 43 385 | 386 | 387 | 388 | 389 | BICOMP 390 | 140 143 139 136 34 11 148 141 35 37 10 21 0 137 391 | 392 | 393 | ICC8051 394 | 102 103 140 143 139 136 34 11 148 141 35 37 10 21 0 137 395 | 396 | 397 | 398 | 399 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_crc.c 400 | 401 | 402 | BICOMP 403 | 165 404 | 405 | 406 | ICC8051 407 | 49 408 | 409 | 410 | 411 | 412 | BICOMP 413 | 10 21 0 11 34 137 36 414 | 415 | 416 | ICC8051 417 | 102 103 10 21 0 11 34 137 36 418 | 419 | 420 | 421 | 422 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_dma.c 423 | 424 | 425 | BICOMP 426 | 173 427 | 428 | 429 | ICC8051 430 | 44 431 | 432 | 433 | 434 | 435 | BICOMP 436 | 37 10 21 0 11 34 137 19 437 | 438 | 439 | ICC8051 440 | 102 103 37 10 21 0 11 34 137 19 441 | 442 | 443 | 444 | 445 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_sleep.c 446 | 447 | 448 | BICOMP 449 | 123 450 | 451 | 452 | ICC8051 453 | 39 454 | 455 | 456 | 457 | 458 | BICOMP 459 | 34 0 11 137 10 21 17 16 14 140 143 139 136 148 141 138 42 12 9 158 78 157 155 460 | 461 | 462 | ICC8051 463 | 102 103 34 0 11 137 10 21 17 16 14 140 143 139 136 148 141 138 42 12 9 158 78 157 155 464 | 465 | 466 | 467 | 468 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_key.c 469 | 470 | 471 | BICOMP 472 | 154 473 | 474 | 475 | ICC8051 476 | 50 477 | 478 | 479 | 480 | 481 | BICOMP 482 | 0 11 34 137 12 8 10 21 14 140 143 139 136 148 141 483 | 484 | 485 | ICC8051 486 | 102 103 0 11 34 137 12 8 10 21 14 140 143 139 136 148 141 487 | 488 | 489 | 490 | 491 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_lcd.c 492 | 493 | 494 | BICOMP 495 | 111 496 | 497 | 498 | ICC8051 499 | 55 500 | 501 | 502 | 503 | 504 | BICOMP 505 | 34 15 10 21 0 11 137 140 143 139 136 148 141 105 17 9 506 | 507 | 508 | ICC8051 509 | 102 103 34 15 10 21 0 11 137 140 143 139 136 148 141 105 17 9 510 | 511 | 512 | 513 | 514 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_led.c 515 | 516 | 517 | BICOMP 518 | 113 519 | 520 | 521 | ICC8051 522 | 182 523 | 524 | 525 | 526 | 527 | BICOMP 528 | 0 11 34 137 12 16 10 21 140 143 139 136 148 141 529 | 530 | 531 | ICC8051 532 | 102 103 0 11 34 137 12 16 10 21 140 143 139 136 148 141 533 | 534 | 535 | 536 | 537 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_startup.c 538 | 539 | 540 | BICOMP 541 | 115 542 | 543 | 544 | ICC8051 545 | 129 546 | 547 | 548 | 549 | 550 | BICOMP 551 | 10 21 0 11 34 137 552 | 553 | 554 | ICC8051 555 | 102 103 10 21 0 11 34 137 556 | 557 | 558 | 559 | 560 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_timer.c 561 | 562 | 563 | BICOMP 564 | 122 565 | 566 | 567 | ICC8051 568 | 183 569 | 570 | 571 | 572 | 573 | ICC8051 574 | 102 103 575 | 576 | 577 | 578 | 579 | $PROJ_DIR$\..\..\..\..\Components\hal\target\CC2540EB\hal_uart.c 580 | 581 | 582 | BICOMP 583 | 121 584 | 585 | 586 | ICC8051 587 | 178 588 | 589 | 590 | 591 | 592 | BICOMP 593 | 21 0 11 34 137 12 19 10 140 143 139 136 148 141 42 594 | 595 | 596 | ICC8051 597 | 102 103 21 0 11 34 137 12 19 10 140 143 139 136 148 141 42 598 | 599 | 600 | 601 | 602 | $PROJ_DIR$\..\..\Profiles\Blink\blinkProfile.c 603 | 604 | 605 | BICOMP 606 | 62 607 | 608 | 609 | ICC8051 610 | 63 611 | 612 | 613 | 614 | 615 | BICOMP 616 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 60 617 | 618 | 619 | ICC8051 620 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 60 621 | 622 | 623 | 624 | 625 | $PROJ_DIR$\..\..\Profiles\Blink\blinkyProfile.c 626 | 627 | 628 | BICOMP 629 | 61 630 | 631 | 632 | ICC8051 633 | 59 634 | 635 | 636 | 637 | 638 | BICOMP 639 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 60 640 | 641 | 642 | ICC8051 643 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 60 644 | 645 | 646 | 647 | 648 | $PROJ_DIR$\..\..\common\npi\npi_np\npi.c 649 | 650 | 651 | BICOMP 652 | 112 653 | 654 | 655 | ICC8051 656 | 38 657 | 658 | 659 | 660 | 661 | BICOMP 662 | 34 10 21 0 11 137 72 19 663 | 664 | 665 | ICC8051 666 | 102 103 34 10 21 0 11 137 72 19 667 | 668 | 669 | 670 | 671 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL.c 672 | 673 | 674 | BICOMP 675 | 119 676 | 677 | 678 | ICC8051 679 | 180 680 | 681 | 682 | 683 | 684 | BICOMP 685 | 145 139 136 34 11 10 21 0 137 140 143 148 141 138 42 152 105 17 12 686 | 687 | 688 | ICC8051 689 | 102 103 145 139 136 34 11 10 21 0 137 140 143 148 141 138 42 152 105 17 12 690 | 691 | 692 | 693 | 694 | $PROJ_DIR$\..\..\..\..\Components\osal\common\osal_bufmgr.c 695 | 696 | 697 | BICOMP 698 | 125 699 | 700 | 701 | ICC8051 702 | 159 703 | 704 | 705 | 706 | 707 | BICOMP 708 | 140 143 139 136 34 11 148 141 105 0 137 17 150 709 | 710 | 711 | ICC8051 712 | 102 103 140 143 139 136 34 11 148 141 105 0 137 17 150 713 | 714 | 715 | 716 | 717 | $PROJ_DIR$\..\..\..\..\Components\osal\common\osal_cbtimer.c 718 | 719 | 720 | BICOMP 721 | 124 722 | 723 | 724 | ICC8051 725 | 179 726 | 727 | 728 | 729 | 730 | BICOMP 731 | 140 143 139 136 34 11 148 141 138 142 732 | 733 | 734 | ICC8051 735 | 102 103 140 143 139 136 34 11 148 141 138 142 736 | 737 | 738 | 739 | 740 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_ClockBLE.c 741 | 742 | 743 | BICOMP 744 | 120 745 | 746 | 747 | ICC8051 748 | 153 749 | 750 | 751 | 752 | 753 | BICOMP 754 | 136 34 11 105 0 137 17 140 143 139 148 141 152 755 | 756 | 757 | ICC8051 758 | 102 103 136 34 11 105 0 137 17 140 143 139 148 141 152 759 | 760 | 761 | 762 | 763 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_Memory.c 764 | 765 | 766 | BICOMP 767 | 118 768 | 769 | 770 | ICC8051 771 | 176 772 | 773 | 774 | 775 | 776 | BICOMP 777 | 136 34 11 140 143 139 148 141 105 0 137 17 9 778 | 779 | 780 | ICC8051 781 | 102 103 136 34 11 140 143 139 148 141 105 0 137 17 9 782 | 783 | 784 | 785 | 786 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_PwrMgr.c 787 | 788 | 789 | BICOMP 790 | 127 791 | 792 | 793 | ICC8051 794 | 167 795 | 796 | 797 | 798 | 799 | BICOMP 800 | 136 34 11 105 0 137 17 140 143 139 148 141 138 42 801 | 802 | 803 | ICC8051 804 | 102 103 136 34 11 105 0 137 17 140 143 139 148 141 138 42 805 | 806 | 807 | 808 | 809 | $PROJ_DIR$\..\..\..\..\Components\osal\mcu\cc2540\osal_snv.c 810 | 811 | 812 | BICOMP 813 | 128 814 | 815 | 816 | ICC8051 817 | 161 818 | 819 | 820 | 821 | 822 | BICOMP 823 | 8 34 10 21 0 11 137 13 136 140 143 139 148 141 45 9 20 824 | 825 | 826 | ICC8051 827 | 102 103 8 34 10 21 0 11 137 13 136 140 143 139 148 141 45 9 20 828 | 829 | 830 | 831 | 832 | $PROJ_DIR$\..\..\..\..\Components\osal\common\OSAL_Timers.c 833 | 834 | 835 | BICOMP 836 | 126 837 | 838 | 839 | ICC8051 840 | 168 841 | 842 | 843 | 844 | 845 | BICOMP 846 | 136 34 11 105 0 137 17 140 143 139 148 141 18 10 21 847 | 848 | 849 | ICC8051 850 | 102 103 136 34 11 105 0 137 17 140 143 139 148 141 18 10 21 851 | 852 | 853 | 854 | 855 | $PROJ_DIR$\..\..\Profiles\Roles\gap.c 856 | 857 | 858 | BICOMP 859 | 40 860 | 861 | 862 | ICC8051 863 | 177 864 | 865 | 866 | 867 | 868 | BICOMP 869 | 78 136 34 11 65 140 143 139 148 141 74 870 | 871 | 872 | ICC8051 873 | 102 103 78 136 34 11 65 140 143 139 148 141 74 874 | 875 | 876 | 877 | 878 | $PROJ_DIR$\..\..\Profiles\Roles\gapbondmgr.c 879 | 880 | 881 | BICOMP 882 | 108 883 | 884 | 885 | ICC8051 886 | 174 887 | 888 | 889 | 890 | 891 | BICOMP 892 | 78 136 34 11 140 143 139 148 141 45 65 74 70 66 64 69 67 68 71 9 92 90 89 893 | 894 | 895 | ICC8051 896 | 102 103 78 136 34 11 140 143 139 148 141 45 65 74 70 66 64 69 67 68 71 9 92 90 89 897 | 898 | 899 | 900 | 901 | $PROJ_DIR$\..\..\..\..\Components\ble\host\gatt_uuid.c 902 | 903 | 904 | BICOMP 905 | 109 906 | 907 | 908 | ICC8051 909 | 181 910 | 911 | 912 | 913 | 914 | BICOMP 915 | 136 34 11 140 143 139 148 141 66 78 64 69 67 916 | 917 | 918 | ICC8051 919 | 102 103 136 34 11 140 143 139 148 141 66 78 64 69 67 920 | 921 | 922 | 923 | 924 | $PROJ_DIR$\..\..\Profiles\Roles\peripheral.c 925 | 926 | 927 | BICOMP 928 | 110 929 | 930 | 931 | ICC8051 932 | 162 933 | 934 | 935 | 936 | 937 | BICOMP 938 | 78 136 34 11 140 143 139 148 141 133 68 71 9 19 10 21 0 137 134 132 69 65 74 70 64 66 45 97 89 939 | 940 | 941 | ICC8051 942 | 102 103 78 136 34 11 140 143 139 148 141 133 68 71 9 19 10 21 0 137 134 132 69 65 74 70 64 66 45 97 89 943 | 944 | 945 | 946 | 947 | $PROJ_DIR$\..\..\common\cc2540\OnBoard.c 948 | 949 | 950 | BICOMP 951 | 116 952 | 953 | 954 | ICC8051 955 | 166 956 | 957 | 958 | 959 | 960 | BICOMP 961 | 78 136 34 11 105 0 137 17 140 143 139 148 141 16 10 21 14 962 | 963 | 964 | ICC8051 965 | 102 103 78 136 34 11 105 0 137 17 140 143 139 148 141 16 10 21 14 966 | 967 | 968 | 969 | 970 | $PROJ_DIR$\..\Source\devinfoservice.c 971 | 972 | 973 | BICOMP 974 | 56 975 | 976 | 977 | ICC8051 978 | 164 979 | 980 | 981 | 982 | 983 | BICOMP 984 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 107 985 | 986 | 987 | ICC8051 988 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 107 989 | 990 | 991 | 992 | 993 | $PROJ_DIR$\..\..\Profiles\DevInfo\devinfoservice.c 994 | 995 | 996 | BICOMP 997 | 56 998 | 999 | 1000 | ICC8051 1001 | 164 1002 | 1003 | 1004 | 1005 | 1006 | BICOMP 1007 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 147 92 130 1008 | 1009 | 1010 | ICC8051 1011 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 147 92 130 1012 | 1013 | 1014 | 1015 | 1016 | $PROJ_DIR$\..\..\Profiles\SimpleProfile\simpleGATTprofile.c 1017 | 1018 | 1019 | BICOMP 1020 | 117 1021 | 1022 | 1023 | ICC8051 1024 | 169 1025 | 1026 | 1027 | 1028 | 1029 | BICOMP 1030 | 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 144 1031 | 1032 | 1033 | ICC8051 1034 | 102 103 78 136 34 11 140 143 139 148 141 70 64 69 66 67 92 89 65 74 144 1035 | 1036 | 1037 | 1038 | 1039 | $PROJ_DIR$\CC2541\Exe\SimpleBLEPeripheral.d51 1040 | 1041 | 1042 | XLINK 1043 | 51 46 1044 | 1045 | 1046 | 1047 | 1048 | XLINK 1049 | 149 194 192 75 76 180 193 153 176 167 168 166 59 164 177 174 181 41 43 49 44 48 54 50 55 182 39 129 183 178 38 159 179 161 162 146 1050 | 1051 | 1052 | 1053 | 1054 | $PROJ_DIR$\..\Source\OSAL_BlinkyPeripheral.c 1055 | 1056 | 1057 | BICOMP 1058 | 189 1059 | 1060 | 1061 | ICC8051 1062 | 193 1063 | 1064 | 1065 | 1066 | 1067 | BICOMP 1068 | 34 140 143 139 136 11 148 141 138 12 71 78 133 68 9 19 10 21 0 137 134 132 142 69 65 74 90 89 66 64 92 97 185 1069 | 1070 | 1071 | ICC8051 1072 | 102 103 34 140 143 139 136 11 148 141 138 12 71 78 133 68 9 19 10 21 0 137 134 132 142 69 65 74 90 89 66 64 92 97 185 1073 | 1074 | 1075 | 1076 | 1077 | $PROJ_DIR$\..\Source\BlinkyPeripheral_Main.c 1078 | 1079 | 1080 | BICOMP 1081 | 190 1082 | 1083 | 1084 | ICC8051 1085 | 192 1086 | 1087 | 1088 | 1089 | 1090 | BICOMP 1091 | 34 14 10 21 0 11 137 18 12 16 140 143 139 136 148 141 138 42 45 1092 | 1093 | 1094 | ICC8051 1095 | 102 103 34 14 10 21 0 11 137 18 12 16 140 143 139 136 148 141 138 42 45 1096 | 1097 | 1098 | 1099 | 1100 | $PROJ_DIR$\..\Source\BlinkyPeripheral.c 1101 | 1102 | 1103 | BICOMP 1104 | 191 1105 | 1106 | 1107 | ICC8051 1108 | 194 1109 | 1110 | 1111 | 1112 | 1113 | BICOMP 1114 | 78 136 34 11 140 143 139 148 141 42 105 0 137 17 8 10 21 16 14 15 66 64 69 68 71 9 90 92 130 2 97 89 65 74 185 1115 | 1116 | 1117 | ICC8051 1118 | 102 103 78 136 34 11 140 143 139 148 141 42 105 0 137 17 8 10 21 16 14 15 66 64 69 68 71 9 90 92 130 2 97 89 65 74 185 1119 | 1120 | 1121 | 1122 | 1123 | 1124 | 1125 | 1126 | --------------------------------------------------------------------------------