Shop Learn P1 Docs P2 Docs Events
NRF24L01+ revisited and other library issues - Page 3 — Parallax Forums

NRF24L01+ revisited and other library issues



  • Jim,

    in a terminal, paste this (do it somewhere it won't clobber an existing copy if you want to preserve it): git clone

    Alternatively, you can download a zip of it via
    On a repo's github page, if you click on the green 'Clone' button, the link to download a zip is at the bottom of the popup.

  • Got it, thanks.

  • What I downloaded was dated Nov 9, 2021. Is that the latest?

  • Hi Jim,

    What file is it that has that date? I just took a look at the RX and TX demo files in the repository on the github page and they show modified as 'last month' and 'last week', respectively.

  • I clicked on your sig and downloaded what was there. I just used the git instructions and re-downloaded, now I have new material!

  • RS_JimRS_Jim Posts: 1,719
    edited 2022-12-29 23:47

    Working with the RX demo and trying to compile under flexprop, I get the following error:

    "ser.start(SER_BAUD) : error: Unable to handle member start"
    Ihave tried SER_BAUD as both 115200 and 2000000

    I do note that the start routine is buried in the com.serial.spin2 file a child of the ansi file.
    any Ideas, or do I need to zip it up and send to you?
    loaded up the tx-demo and get the ser_baud error and "unable to handle member STR in the following line:
    ser.str(@"Max retransmissions reached? ")

  • Jim,

    What version of flexspin are you running? When I changed the names of methods in some objects during all of my updates (the serial objects had some changes), I created aliases to the old method names so existing programs wouldn't break, but the method aliasing wasn't working in older versions of FlexSpin. That's just a guess though. Yeah, please zip up what you have and send it over and I'll see if I have similar issues. I just now tried building both demos and they built fine.


  • RS_JimRS_Jim Posts: 1,719
    edited 2022-12-30 14:07

    I am running Flexprop 5.9.21 under Linux Mint 20 fully updated. This morning I tried compiling the NRF receive demo exactly as downloaded from github. I made NO changes! it fails to compile with the compiler error message previously mentioned. "unable to handle member STR"
    EDIT: Once I know that I can compile your version, I will Make the necessary changes in my program such as the config file and my pin numbers.

  • avsa242avsa242 Posts: 378
    edited 2022-12-30 14:25

    Strange - I just rolled back to 5.9.21 and still have no issues building it. When you have a chance, please zip what you have (no idea why it would be different, but just to be sure).

    When you updated from github, did you be sure to point flexspin (or flexprop) to the new library location? You may need to temporarily remove references to your old copy, in case it's looking there for library code (in other words, maybe you're building the demo in the new library, but flexspin is looking for child object code in the old location).

  • Jessie,
    When I update flexprop, I rename the current folder to oldflexprop(#), then I do a new flexprop install from github. I do need to go to my Downloads file and make sure there are no flexprop versions there. Stay tuned@

  • Oh sorry I meant my spin2 library, but yeah same idea with flexprop.

  • OK, with Eric's help I finally am running flexprop 5.9.23. When I load NRF24L01Demo either RX or TX and compile without modification(using all your stuff) I get an error MOVE internal I am not changing pin numbers or anything. I keep getting frustrated by the wheels coming off this train. I really want to get this radio link working so I can get back to programing. I am attaching the 2 files that give me the compiler errors.

  • Jim,

    When I build your attached I get no build issues.
    There was one small build issue I had with the attached NRF24L01-TXDemo.o.spin2 - flexspin errored out with:

    NRF24L01-TXDemo.o.spin2:30: error: unknown identifier LED in class Boardcfg_kiss
    NRF24L01-TXDemo.o.spin2:30: error: unknown identifier LED in class Boardcfg_kiss

    but I was able to solve that by just changing the constant near the top of the file to read cfg.LED1, since that's what's defined in the KISS board config obj. Both build for me either to NuCode or PASM2.
    The TX demo looks to have modifications in it (or additions, at least), though without looking into it in more detail I can't say whether that's having an impact.

    If you're getting a build failure though, something still isn't setup quite right. In my above post, what I was asking was to be sure that flexspin/flexprop are pointed to the newest, and only the newest copy of the p2-spin-standard-library. It almost sounds like objects are getting mixed up or something. You might have the newest demo open, but if flexprop is still pointed to the old p2-spin-standard-lib, it'll be trying to build the demo using the objects from there.

    The library paths in flexprop should look something like this:

  • Yes I had that error, but after I got that fixed this internal "move" error crops up. How are you copying the error statments from the compiler?

  • Pasted here, as formatted, you mean? Or the actual copying itself? I use vim for editing code, and I have commands set up to call flexspin (all of this just runs in a terminal). Then I just pasted the output here within a code block. Put three backticks (like " ``` ", but without the quotes or spaces) on a line by themselves, then paste the compiler output on the next lines, then put three backticks on the line after.

  • RS_JimRS_Jim Posts: 1,719

    I am attaching 3 screenshots, 1 each for the RX_Demo,1 for Audio.amp.max9744m and 1 for lib paths.
    Note I get the error on demo but not on Audio.amp. Lib paths the same for all

  • Hmm ok I can't really tell what it's failing on from doesn't look like flexspin is showing the line number (or the file) it's failing on. Any chance you could zip up your whole project and I'll take a look?

  • RS_JimRS_Jim Posts: 1,719

    The file it is failing on is your nrf demo with all of your parms. All I am asking to do is compile.

  • I know, but if I do a checkout of what I have on github I don't have the same result - it builds fine for me. There has to be a difference somewhere.

  • avsa242avsa242 Posts: 378
    edited 2023-01-02 00:36

    Steps I just did to try to reproduce it:

    git clone
    cd p2-spin-standard-library/library/demos/wireless/
    git checkout testing
    flexspin -2 -I ../../ NRF24L01-TXDemo.spin2

    Propeller Spin/PASM Compiler 'FlexSpin' (c) 2011-2022 Total Spectrum Software Inc.
    Version 5.9.23 Compiled on: Jan  1 2023
    Program size is 17740 bytes

    EDIT: removed erroneous pasted text

  • RS_JimRS_Jim Posts: 1,719

    I wonder if the difference is I do everything in Flexprop and you are compiling in flexspin?

  • Trying it in flexprop seems to yield the same result for copy of flexprop has a version of flexspin that's two versions older (5.9.21) but it still builds.
    If you copy the commands in my above post (#81) do you still have a build failure? Running out of ideas...

  • ersmithersmith Posts: 5,669

    @RS_Jim : Try the attached archive. That has everything from @avsa242 's library needed to build the NRF24L01-TXDemo, and it builds fine for me. I have to assume that somehow one of your library paths or checkouts isn't quite right, which can be very frustrating and hard to track down. That's why I've included everything in the one archive, it's self-contained.

  • RS_JimRS_Jim Posts: 1,719

    I extracted the file you sent me into its own folder and created a path to it and it compiled correctly. So now I wonder what was wrong with the other. I have since compiled other programs without problem so I do not know what has happened to the original. Thanks for the help.

  • RS_JimRS_Jim Posts: 1,719

    After getting Eric's test file to compile. I tried the rx-demo from what I had and that failed again so re-downloaded rx-demo, and it compiled. I next edited it for my board configuration and recompiled, success. next downloaded it to nrf receive board, fail. Swapped out receive board, success! So now I have an NRF24-L01 link that works. Time to go back to the vendor and see if they will replace their defective board. I don't mind paying for a new board but I resent having to pay 2.5 times the board cost for the shipping. We will see how well I negotiate!
    I thank you both for your assistance I might have given up in utter frustration with out it.

  • Jim, good news - glad you got it working again.


  • RS_JimRS_Jim Posts: 1,719

    You seemed to have dropped the "Time" object. Where did you put those functions?

  • Jim,

    I removed it because spin2 has native support for delays (waitms(), waitus()...and I think there at least used to be one for waiting whole seconds? though I could be mistaken about that one)

  • RS_JimRS_Jim Posts: 1,719

    Got it!

  • JonnyMacJonnyMac Posts: 8,465
    edited 2023-01-04 00:39

    @avsa242 said:
    I removed it because spin2 has native support for delays (waitms(), waitus()...and I think there at least used to be one for waiting whole seconds? though I could be mistaken about that one)

    The built-in Spin2 delays are with waitms() and waitus(). Both have a limit of 2^31 microseconds, which is about 10 seconds at 200MHz. You can always create longer delays with a loop:

    repeat 15
Sign In or Register to comment.