This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

hex images to accompany the JavaSimplePeripheral application - CC2450

Other Parts Discussed in Thread: CC2540

Can someone please direct me to the hex image files for the USB dongle and keyfob that work with the JavaSimplePeripheral (http://processors.wiki.ti.com/index.php/Category:JavaSimplePeripheral) application? The readme file says:

"Note, the USB dongle will need to have the network processor image loaded and the keyfob should have the SimplePeripheral application (supplied with kit) installed."

But I have no idea what 'network processor image' it is referring. I assume the 'cc2540_ble1.1_keyfob_SimpleBLEPeripheral.hex' image located in BLE-CC2540-1.1a\Accessories\Hex_Files\' will suffice for the keyfob.


I have tried 'cc2540_ble1.1_USBdongle_HostTestRelease_Master.hex' that came with the the ble 1.1a stack (BLE-CC2540-1.1a\Accessories\Hex_Files\) but that is not recognized by the JavaApp:

"Error connecting to the device.
Remove and insert again the USB dongle from the USB slot, restart the
 application and try again."

Please help ASAP!

greg

  • Load cc2540_ble1.1_USBdongle_HostTestRelease_Master.hex onto the USB Dongle. - You can verify this is working by using BTool.  If Btool works with this then your dongle should be good to go.

    Load the cc2540_ble1.1_keyfob_SimpleBLEPeripheral.hex into the keyFob.  If the USBDongle is setup ok, then you can use Btool to connect to keyFob as a starting point.Follow directions in 1.1 app user guide to enable keypress notifications, and you should see these messages in Btool log.

    The java app is based on 1.0 release from Oct 2010 and 1.1 is updated.  It will probably work with 1.1 if the UUID handles for the keypress turn out to be the same. If not, you will have to update the java app with the handle IDs. Normally a fully functional app would do a discovery and determine the handles, but the Java app was kept very simple to show simple serial communications with the dongle.

    Hope this Helps,

    -Greg

  • Hi GregS,

    Thanx for the rapid response. I had a cut & paste error.... I actually did use 'C:\Texas Instruments\BLE-CC2540-1.1a\Accessories\Hex_Files\cc2540_ble1.1_USBdongle_HostTestRelease_Master.hex' on the dongle and got the timeout error in the Java app. I can use the 1.1a BTool without issue. I have not tried the 1.0 or 1.1 Btool versions. Should I?

    Fyi, I also tried increasing the timeout value in 'timer.schedule(new ConnectTask(),15000);' to 25000 with the same results.

    I am actively trying to debug this now... here is what was printed to the console (btw I am using Netbeans 7.0.1 and JRE 1.6):

    run:
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7
    TX: 1 0 fe 26 8 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
    RX: 4 ff 6 7f 6 0 0 fe 0
    RX: 4 ff 2c 0 6 0 24 9b 84 b7 2d 3c 1b 0 4 1d 2d 56 c9 92 3f be ac 4 f1 23 80 99 db be aa e1 7d 65 88 ad 6b 61 7d 1d 28 86 9 9b 23 6e 69
    TX: 1 4 fe 3 3 1 0
    RX: 4 ff 6 7f 6 0 4 fe 0
    RX: 4 ff 4 1 6 0 0

    When I compare the results with some previously saved BTool output during initialization the IRK and CSRK fields were indeed different ('58:22:52:39:32:BC:FC:54:90:C2:BE:AF:D4:31:BA:5C' and '26:89:C9:1B:9F:D6:6E:6A:AD:6D:61:7D:DD:28:7A:59' respectively). Forgive my BLE ignorance if this is indeed the problem. I am a BLE noob and just want at this time to integrate the Java app into a much larger program I am developing. I  just used BTool again to check those two field and now they seem to match the JSP console output (see below). I can even scan and recognize a fob in BTool. So where might the problem with the JSP app be?

    Port opened at 12/28/2011 6:31:40 PM

    [1] : <Tx> - 06:31:41.205
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE00 (GAP_DeviceInit)
    -Data Length    : 0x26 (38) byte(s)
     ProfileRole    : 0x08 (Central)
     MaxScanRsps    : 0x05 (5)
     IRK        : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     CSRK        : 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
     SignCounter    : 0x00000001 (1)
    Dump(Tx):
    01 00 FE 26 08 05 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 01 00 00 00

    ------------------------------------------------------------------------------------------------------------------------
    [2] : <Rx> - 06:31:41.580
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE00 (GAP_DeviceInit)
     DataLength    : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 00 FE 00

    ------------------------------------------------------------------------------------------------------------------------
    [3] : <Tx> - 06:31:41.830
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE31 (GAP_GetParam)
    -Data Length    : 0x01 (1) byte(s)
     Raw        : 15
    Dump(Tx):
    01 31 FE 01 15

    ------------------------------------------------------------------------------------------------------------------------
    [4] : <Tx> - 06:31:41.846
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE31 (GAP_GetParam)
    -Data Length    : 0x01 (1) byte(s)
     Raw        : 16
    Dump(Tx):
    01 31 FE 01 16

    ------------------------------------------------------------------------------------------------------------------------
    [5] : <Tx> - 06:31:41.877
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE31 (GAP_GetParam)
    -Data Length    : 0x01 (1) byte(s)
     Raw        : 1A
    Dump(Tx):
    01 31 FE 01 1A

    ------------------------------------------------------------------------------------------------------------------------
    [6] : <Tx> - 06:31:41.893
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE31 (GAP_GetParam)
    -Data Length    : 0x01 (1) byte(s)
     Raw        : 19
    Dump(Tx):
    01 31 FE 01 19

    ------------------------------------------------------------------------------------------------------------------------
    [7] : <Rx> - 06:31:41.908
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x2C (44) bytes(s)
     Event        : 0x0600 (GAP_DeviceInitDone)
     Status        : 0x00 (Success)
     DevAddr        : 3C:2D:B7:84:9B:24
     DataPktLen    : 0x001B (27)
     NumDataPkts    : 0x04 (4)
     IRK        : 1D:2D:56:C9:92:3F:BE:AC:04:F1:23:80:99:DB:BE:AA
     CSRK        : E1:7D:65:88:AD:6B:61:7D:1D:28:86:09:9B:23:6E:69
    Dump(Rx):
    04 FF 2C 00 06 00 24 9B 84 B7 2D 3C 1B 00 04 1D
    2D 56 C9 92 3F BE AC 04 F1 23 80 99 DB BE AA E1
    7D 65 88 AD 6B 61 7D 1D 28 86 09 9B 23 6E 69

    ------------------------------------------------------------------------------------------------------------------------
    [8] : <Rx> - 06:31:42.002
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x08 (8) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE31 (GAP_GetParam)
     DataLength    : 0x02 (2)
     ParamValue    : 0x0050 (80)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 50 00

    ------------------------------------------------------------------------------------------------------------------------
    [9] : <Rx> - 06:31:42.096
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x08 (8) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE31 (GAP_GetParam)
     DataLength    : 0x02 (2)
     ParamValue    : 0x0050 (80)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 50 00

    ------------------------------------------------------------------------------------------------------------------------
    [10] : <Rx> - 06:31:42.190
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x08 (8) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE31 (GAP_GetParam)
     DataLength    : 0x02 (2)
     ParamValue    : 0x0000 (0)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 00 00

    ------------------------------------------------------------------------------------------------------------------------
    [11] : <Rx> - 06:31:42.268
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x08 (8) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE31 (GAP_GetParam)
     DataLength    : 0x02 (2)
     ParamValue    : 0x07D0 (2000)
    Dump(Rx):
    04 FF 08 7F 06 00 31 FE 02 D0 07

    ------------------------------------------------------------------------------------------------------------------------
    [12] : <Tx> - 06:32:32.346
    -Type        : 0x01 (Command)
    -Opcode        : 0xFE04 (GAP_DeviceDiscoveryRequest)
    -Data Length    : 0x03 (3) byte(s)
     Mode        : 0x03 (All)
     NameMode    : 0x01 (Enable)
     WhiteList        : 0x00 (Disable)
    Dump(Tx):
    01 04 FE 03 03 01 00

    ------------------------------------------------------------------------------------------------------------------------
    [13] : <Rx> - 06:32:32.424
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x06 (6) bytes(s)
     Event        : 0x067F (GAP_HCI_ExtentionCommandStatus)
     Status        : 0x00 (Success)
     OpCode        : 0xFE04 (GAP_DeviceDiscoveryRequest)
     DataLength    : 0x00 (0)
    Dump(Rx):
    04 FF 06 7F 06 00 04 FE 00

    ------------------------------------------------------------------------------------------------------------------------
    [14] : <Rx> - 06:32:32.518
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x14 (20) bytes(s)
     Event        : 0x060D (GAP_DeviceInformation)
     Status        : 0x00 (Success)
     EventType    : 0x00 (Connectable Undirected Advertisement)
     AddrType    : 0x00 (Public)
     Addr        : 3C:2D:B7:84:F6:84
     Rssi        : 0xBA (186)
     DataLength    : 0x07 (7)
     Data        : 02:01:05:03:02:F0:FF
    Dump(Rx):
    04 FF 14 0D 06 00 00 00 84 F6 84 B7 2D 3C BA 07
    02 01 05 03 02 F0 FF

    ------------------------------------------------------------------------------------------------------------------------
    [15] : <Rx> - 06:32:32.612
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x2B (43) bytes(s)
     Event        : 0x060D (GAP_DeviceInformation)
     Status        : 0x00 (Success)
     EventType    : 0x04 (Scan Response)
     AddrType    : 0x00 (Public)
     Addr        : 3C:2D:B7:84:F6:84
     Rssi        : 0xBA (186)
     DataLength    : 0x1E (30)
     Data        : 14:09:53:69:6D:70:6C:65:42:4C:45:50:65:72:69:70:
              68:65:72:61:6C:05:12:50:00:20:03:02:0A:00
    Dump(Rx):
    04 FF 2B 0D 06 00 04 00 84 F6 84 B7 2D 3C BA 1E
    14 09 53 69 6D 70 6C 65 42 4C 45 50 65 72 69 70
    68 65 72 61 6C 05 12 50 00 20 03 02 0A 00

    ------------------------------------------------------------------------------------------------------------------------
    [16] : <Rx> - 06:32:42.690
    -Type        : 0x04 (Event)
    -EventCode    : 0xFF (HCI_LE_ExtEvent)
    -Data Length    : 0x0C (12) bytes(s)
     Event        : 0x0601 (GAP_DeviceDiscoveryDone)
     Status        : 0x00 (Success)
     NumDevs    : 0x01 (1)
     Device #0
     EventType    : 0x00 (Connectable Undirected Advertisement)
     AddrType    : 0x00 (Public)
     Addr        : 3C:2D:B7:84:F6:84
    Dump(Rx):
    04 FF 0C 01 06 00 01 00 00 84 F6 84 B7 2D 3C

    ------------------------------------------------------------------------------------------------------------------------

  • Got one step further... did not realize that I had to put at least one Fob in discoverable mode in order to establish a connection (I had assumed the "Error connecting to the device" message was pertaining to the USB dongle not a Fob). My console output now looks as follows:

    run:
    Stable Library
    =========================================
    Native lib Version = RXTX-2.1-7
    Java lib Version   = RXTX-2.1-7
    TX: 1 0 fe 26 8 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
    RX: 4 ff 6 7f 6 0 0 fe 0
    RX: 4 ff 2c 0 6 0 24 9b 84 b7 2d 3c 1b 0 4 1d 2d 56 c9 92 3f be ac 4 f1 23 80 99 db be aa e1 7d 65 88 ad 6b 61 7d 1d 28 86 9 9b 23 6e 69
    TX: 1 4 fe 3 3 1 0
    RX: 4 ff 6 7f 6 0 4 fe 0
    RX: 4 ff 14 d 6 0 0 0 84 f6 84 b7 2d 3c b7 7 2 1 5 3 2 f0 ff
    RX: 4 ff 2b d 6 0 4 0 84 f6 84 b7 2d 3c b7 1e 14 9 53 69 6d 70 6c 65 42 4c 45 50 65 72 69 70 68 65 72 61 6c 5 12 50 0 20 3 2 a 0
    RX: 4 ff c 1 6 0 1 0 0 84 f6 84 b7 2d 3c
    4 ff 13 5 6 0 0 84 f6 84 b7 2d 3c 0 0 50 0 0 0 d0 7 0
    establishing...
    TX: 1 9 fe 9 0 0 0 84 f6 84 b7 2d 3c
    RX: 4 ff 6 7f 6 0 9 fe 0
    RX: 4 ff 13 5 6 0 0 84 f6 84 b7 2d 3c 0 0 50 0 0 0 d0 7 0
    Enable Keys

    TX: 1 12 fd 8 0 0 0 0 20 0 1 0
    RX: 4 ff 6 7f 6 0 12 fd 0
    RX: 4 ff a 1 5 0 0 0 4 12 20 0 3

    Java App TextArea output:

    Device found
    Enabling Key Notifications start:
    Enabling Key Notifications end:

    The Key Notify buttons on the Java App are both grayed out. is this related to the UUID issue you mentioned previously?

    greg

  • Finally got this to work in 1.1a:

    Must make the following changes in ConnectionManager.java

        public void simpleKeysEnabler() {
            System.out.println("Enable Keys \n");
    //        int[] outputBuffer ={ 0x01, 0x12, 0xfd, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x01, 0x00 };
            int[] outputBuffer ={ 0x01, 0x12, 0xfd, 0x08, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x01, 0x00 };
            new SerialWriter(this.sp,outputBuffer).write();
        }

        public void simpleKeysDisabler() {
            System.out.println("Disable Keys\n");
    //        int[] outputBuffer ={ 0x01, 0x12, 0xfd, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00 };
            int[] outputBuffer ={ 0x01, 0x12, 0xfd, 0x08, 0x00, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00 };
            new SerialWriter(this.sp,outputBuffer).write();
        }