Jump to content
spirilis

[Energia Library] Nordic nRF24L01+ library

Recommended Posts

Then it is worth buying the amlpified modules. They say it goes up to 1Km. It should be a couple of hundred meters anyways. What do you think? http://www.ebay.com/itm/310651702557?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

 

So could you help me out with the patching? BTW when we can expect the next ernergia release?

Good find!

Share this post


Link to post
Share on other sites

Then it is worth buying the amlpified modules. They say it goes up to 1Km. It should be a couple of hundred meters anyways. What do you think? http://www.ebay.com/itm/310651702557?ssPageName=STRK:MEWAX:IT&_trksid=p3984.m1423.l2649

 

So could you help me out with the patching? BTW when we can expect the next ernergia release?

Man those things are dropping in price free-fall!  I paid $22 for mine less than a year ago...

I don't have 2 of them to validate the range bidirectional, but I can say they supposedly draw upwards of 120mA in a burst when you transmit and ~40-50mA continuously when you have them in receive mode.  They definitely improve the range when there's a non-amplified unit on the other end but it's still quite susceptible to water and/or metal interference.

 

As for the patching, the thread I created has the info ... I don't really know what else to put, this really needs to be fixed in the next Energia release and I have no idea when that's happening.

 

edit: Here they are even cheaper: http://www.aliexpress.com/item/1100-meter-long-distance-NRF24L01-PA-LNA-with-antenna-NRF24L01-Wireless-Module-2-4G-Wireless-Communication/727064493.html

Share this post


Link to post
Share on other sites

Thank you all. I could get them to work. theese are definitely better than the 433Mhz modules. when i tried the virtual wire it didnt work and killed one LP meanwhile :/ Lucky i got 3 of them :D When did the LP's price became 10 dollars? I should have bought more when the 1.5 came out :/

Share this post


Link to post
Share on other sites

Something sounds awful flaky on the MSP430 side.  It shouldn't shift from "Receive Mode" to "NO TRANSCEIVER PRESENT".  Maybe check the wires and make sure they're not intermittently disconnecting or frayed?

 

The wires are connected as i mentioned above. They are not disconnecting. Do I need to interchange MOSI and MISO? I haven't patched energia, can that cause issues? 

Share this post


Link to post
Share on other sites

 

Good day,

 

I want to connect my Stellaris launchpad and the MSP430 2553 using NRF24L01 transceivers. I found following energia libraries,

 

For MSP430

 

http://forum.43oh.co...f24l01-library/

 

For Stelaris launchpad

 

http://forum.stellar...f24l01-library/

 

 

After that I connected the pins of the modules like below,

 

MSP430

 

CE >> P2.0

CSN >> P2.1

SCK >> P1.5

MOSI >> P1.7

MISO >> P1.6

 

Stellaris launchpad

 

 

CE >> PA6

CSN >> PA7

SCK >> PB4

MOSI >> PB7

MISO >> PB6

 

Then i used putty to check whether the transmission is happening. But I think it is not. 

 

MSP430 serial interface gives my this result,

 

 

Enrf24 radio transceiver status: Receive Mode
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: NO TRANSCEIVER PRESENT
Received packet:
Enrf24 radio transceiver status: Receive Mode
Received packet:
 

Stellaris launchpad gives me following result

 

 

Timeout on response from server!
Finished sending
 

I'm not sure whether I am doing this correctly. Can someone please help me through. 

 

 

I patched Energia and now I can get the following output from MSP430

 

 

Enrf24 radio transceiver status: DEEP SLEEP <1uA power consumption
Enrf24 radio transceiver status: Receive Mode
 

I think the Receiver Module is working. But i still cannot receive any data. Can someone help me with configuring the transmitter module on stellaris launchpad. If someone can help me it would be highly appreciated.

Share this post


Link to post
Share on other sites

This library is great.  I use it between MSP430's all the time.  I know that there is a library already for the Stellar Pad, however, I like this one a LOT more.  Has anyone thought about getting this one to work with the Stellaris?  Again, I know the Mirf library is out there...it just doesn't even begin to compare to this one as far as simplicity and ease of use.

 

Just a thought...I see people asking about trying to use the Mirf with this library, and honestly...I haven't gotten it to work either...they just don't seem to want to talk to eachother.

 

I have been trying to get this library to work with the StellarPad for the past day or two and have not had any luck.  It just does not seem to talk to the module correctly.  If anybody has any ideas about how to port this thing, I am sure I am not the only one who would appreciate it.

 

Jerod

Share this post


Link to post
Share on other sites

G'Day,

Seems I've joined the tribe that can't get comms between Mirk and 430 libs. Only think I can see is the Mirk Lib does not allow you to set the TX & RX address. Will have another look at Mirk and see if there is a default address, that has to be used by the 430 sketch.

Share this post


Link to post
Share on other sites

Mirf sets Tx address to "serv1" and Rx address to "clie1" in ping_client, and opposite way around in ping server.

 

But with 430 lib Enrf24 we set both TX and RX to (0xDE, 0xAD, 0xBE, 0xEF, 0x01)

 

So maybe problem is with address., will have another go at changing address (didn't solve it the first time I played with them)

 

Grant

Share this post


Link to post
Share on other sites

Mirf sets Tx address to "serv1" and Rx address to "clie1" in ping_client, and opposite way around in ping server.

 

But with 430 lib Enrf24 we set both TX and RX to (0xDE, 0xAD, 0xBE, 0xEF, 0x01)

 

So maybe problem is with address., will have another go at changing address (didn't solve it the first time I played with them)

 

Grant

I tried to change the address. But still didn't work. I also did a channel scanning using the Enrf24 channel scanner that can be found in this thread. It did not output ***** near any frequency.  Any luck?

Share this post


Link to post
Share on other sites

Noup or is it nup,  anyway next idea has to be, have we got the same channel number,its default to 0 on the 430, but have changed that in the Mirf to 0 but still no comms. We might have to wait for a clever  member to solve this.

Grant

Share this post


Link to post
Share on other sites

Nrf24l Mirf(PA_7, PA_6, 0, 16); //CSN Pin Chip Select, CE Pin, Channel, Payload width, SPImodule(default 2)

radio.begin();  // Defaults 1Mbps, channel 0, max TX power

i think both tx and rx is tuned to same channel. Should try to port Enrf for stellaris.

Share this post


Link to post
Share on other sites

Ok, so I ported the Enrf library over so that it works with both MSP430 and Stellaris.  Seems to work great.  I am watching the tx rx demo between msp430g2553 (on the RX side), and the StellarPad doing the TX.  I have included an example in the usual examples folder so you can see how the SPI is setup on the StellarPad. 
 
Was not much at all to change.  Just added the BIT defs, messed around with the SPI settings and it was up and running.

 

I am off to bed.

 

JerodEnrf24ST.zip

Share this post


Link to post
Share on other sites

Ok, so I ported the Enrf library over so that it works with both MSP430 and Stellaris.  Seems to work great.  I am watching the tx rx demo between msp430g2553 (on the RX side), and the StellarPad doing the TX.  I have included an example in the usual examples folder so you can see how the SPI is setup on the StellarPad. 

 

Was not much at all to change.  Just added the BIT defs, messed around with the SPI settings and it was up and running.

 

I am off to bed.

 

Jerodattachicon.gifEnrf24ST.zip

Thank you much for the port!  I'll take a look at your changes and incorporate them into the git repo.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×