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.

cc2540 keyfob discovery not working properly

Other Parts Discussed in Thread: CC2541, CC2540

Hi all,


I am asking for help since my keyfob is not functioning properly. Couple of days ago, it wasn't great but it was at least rolling - it wasn't working when I put SimpleBLEPeripheral.hex file, but it was working when I put CC2540MiniDkDemoSlave.hex file contained in BLE stack/accessories. So I thought I have the same problem as this guy, but today I found out that it obviously isn't since my keyfob is not discovered even with that hex file.

I also don't think this is a battery issue, because 1) my battery is a quite fresh one, and 2) my cc debugger cable powers up the keyfob and 3) I've seen it working before with the battery I have right now, just like 2 days ago.

And yes, when I flash the hex file inside keyfob, I am using SmartRF Flash Programmer, it is up-to-date, and my cc debugger works perfectly and it gives no complaint when I flash the file.

So right now my USB dongle works fine and it is well functioning with Btool, but I am unable to find the keyfob from both my computer(Btool) and my smartphone. I am stuck and now welcoming any kind of help.

Thank you in advance.

  • Hi,

    I assume you have a CC2540 Keyfob (and not the CC2541, just to be sure)?

    Are you saying that when you flash CC2540_keyfob_SimpleBLEPeripheral.hex on it, it does not advertise when you press a button? (Think it's the right button).

    Best Regards

    Joakim Lindh

  • Hello JJ,

    When you download the hex file to you use the read back verify options in flash programmer?

    Can you use SmartRFStudio with the device?

  • Joakim,

    Yes. it is the CC2540 keyfob.

    And yes, that is what I mean. Not only the hex file you mentioned, but also whatever hex file I put in, it is not advertising. I've tried pressing left and right buttons as well, but I still got nothing.

    Best Regards

    JJ Park

  • Eirik,

    you mean "read flash into hex-file" option? I've just tried it, and it is working. (The size is bigger when I read it though)

    I also downloaded SmartRFStudio and noticed that my CC debugger connected to my computer is listed in "list of connected devices" but I am not sure if this means it is connected to my CC2540 keyfob. I clicked CC2540 button but couldn't do much in there since it shows that I am not connected.

    Best Regards,

    JJ Park

  • Hi,

    You cannot just try "any" hex file... it must be built for the Keyfob to get pin mapping correct and such.

    When you flash the CC2540MiniDkDemoSlave.hex, it should lit the green LED for one second after start-up (or when inserting battery). Do you see that?

    When that particular software is put into advertising, the LED should flash red.

    Best Regards

    Joakim

  • Joakim,

    when I said "any" I didn't mean literally all hex file... so far I have tried CC2540MiniDkDemoSlave.hex, SimpleBLEperipheral.hex, CC2540_keyfob_SimpleBLEPeripheral.hex, and some other hex file relevant to keyfob such as my own file modifed from SimpleBLEperipheral.hex.

    The LEDs are working appropriately(I forgot to mention that in my original post). And this is how I get lost... It seems fine, but it isn't. The hardware tells me that it is advertising, but I am unable to catch the signal.

    Best Regards,

    JJ Park

  • Hi all,

    I am not sure why, but the problem was because I tried to put SimpleBLEPeripheral file inside. When I put KeyfobDemo file, it worked all of a sudden.(This is weird as well, since last time I put up KeyfobDemo it didn't work.) I am not sure why, but will try to figure that out as well. Since the keyfob is working, consider this issue is solved. If I find out why my SimpleBLEPeripheral didn't work out, I will post the answer in Here.