Jump to content
spirilis

[Energia Library] Nordic nRF24L01+ library

Recommended Posts

I tried to get this library working with MSP430G2553 and launchpad but seems like my modules are broken or something else is wrong. I tried to patch the SPI of energia also but it didn't help.

 

I'm getting this through UART:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

And after patching the SPI I'm getting:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Does anyone have any idea what's the issue or can someone provide detailed workflow how they managed to get this library working with energia?

Share this post


Link to post
Share on other sites

The examples that shipped with the library should work.  Be sure things are hooked up properly.  "NO TRANSCEIVER PRESENT" literally means that the library tried to talk to the module, tried to read what its current "address width" is configured to, and didn't find a valid value.  (this is a convenient register to use b/c it can never be 0x00 or 0xFF, typical values you find in an error condition).

 

At the very least, either the CSN port or the SPI ports aren't set up properly, or the module doesn't have power.  Be sure SPI.begin() was run before the library was initialized...

Share this post


Link to post
Share on other sites

Does the Energia need to be patched before compiling those examples? I have tried both TX and RX examples.. I will try to change the CSN, IRQ, and CE ports to other ports on launchpad.

Share this post


Link to post
Share on other sites

I switched MISO and MOSI pins together and tried. The message from UART:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Then I switched CE and CSN pins together and UART gave me message:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

When I hooked the cables as they're supposed to UART gives me message:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
 
 
Seems like the module is working but there's something going wrong after module initialization as the deep sleep status is read correctly when module is initialized?

Share this post


Link to post
Share on other sites

 

I switched MISO and MOSI pins together and tried. The message from UART:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

Then I switched CE and CSN pins together and UART gave me message:

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT

 

When I hooked the cables as they're supposed to UART gives me message:

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
 
 
Seems like the module is working but there's something going wrong after module initialization as the deep sleep status is read correctly when module is initialized?

 

Yeah, something isn't right.  Try another module?  Different jumper wires (maybe one is frayed or broken)?

Share this post


Link to post
Share on other sites

I have 2 modules and tried with both of them. The modules are atleast 2 years old and I think those might be destroyed by ESD as they were lying in a box with other misc electronics stuff.

 

 

I'll order a new ones and try with those when they arrive. In the mean time I think I could hook up the modules to bus analyzer at work to see that are those responding at all. Thanks for the quick answers.

Share this post


Link to post
Share on other sites

I just tested the modules with arduino at work and seems like those are working ok. I can read the registers, send data etc.

 

If I do fresh install of energia from the windows installer do I need to patch it to get the modules working? I have been reading from this forum and from some blogs that energia has to be patched to get SPI working correctly.

If energia needs to be patched how it is done? I earlier replaced energia SPI files with github SPI files but it didn't help to get the modules working.

Share this post


Link to post
Share on other sites

The patch is needed to get serial and SPI working together. It is done against the Energia core files for the msp430 platform. Follow the info in my other thread (pretty sure I posted a link to it in this thread)

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

Patching the usci_isr_handler seemed to work. Now both modules are working and sending data through two 6inch concrete walls. I'm more than happy about the transmission distance of these small modules.

 

Thanks again.

Share this post


Link to post
Share on other sites

@@spirilis, this library is truly great, I have played around with it with great success.

 

I am looking into having a broadcasting system in my deployment, and would thus require an additional pipe in the library. Would you be so kind to point me in the right direction, how to go about implementing it. But it is a simple idea of having a pipe with the device address as done now, plus an additional broadcast pipe.

 

The final idea is to implement a simple distance vector routing algorithm on the system then.

Share this post


Link to post
Share on other sites

@@spirilis, this library is truly great, I have played around with it with great success.

 

I am looking into having a broadcasting system in my deployment, and would thus require an additional pipe in the library. Would you be so kind to point me in the right direction, how to go about implementing it. But it is a simple idea of having a pipe with the device address as done now, plus an additional broadcast pipe.

 

The final idea is to implement a simple distance vector routing algorithm on the system then.

Well now you gave me a use-case for that, I'll see about extending the library a bit :)

 

Sent from my Galaxy Note II with Tapatalk

 

 

Share this post


Link to post
Share on other sites

Could someone please suggest tested and working setup with StellarPad? I tried a couple of different wirings, but all I am getting from Rxdemo is "NO TRANSCEIVER PRESENT". Thanks a lot!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...