@hakha4
I take it back, the sketches work. The problem was solved as follows: connected the radio to the output of nodemcu 3.3 V. before that, the radio was on a separate power line. I think the esp32 is very power sensitive, I think it was a level mismatch on the SPI pins.
Try it, I think you have the same problem.