I just ran the same TM040040 code with a TM023023 here on our DK-000013 Development kit and it appears to work fine for me so the code is compatible with the module.
Well that is good to know. At least that is one more variable isolated.
Another thought is that the code has pin defines for DR as pin 9, CS as pin 10, etc. Were you able to use the same pins on your ESP32? If you had to change them to different pins could one of those maybe be assigned to a pin that may not work as that assignment?
So the sample code was expecting the IO pins to be:
You'll have to edit those lines to reflect the pins ESP32 uses for SPI. (DIN=MISO, DOUT=MOSI, and SCK is the clock)
What pins work for that module?
The ESP32 has an internal multiplexor, so in therory it should not matter what pins I select as long as they are not input only or are being used for some other reason.
The esp32 also has 4 different SPI ports. SPI0 is normally used by the SPI flash on the board so in this case I used SPI2. I chose this one because the pins where all in close proximity on the dev board. Below you can see the default pin mapping.
I am wondering if perhaps the Arduino core does not support the internal multiplexing or if for some reason the Arduino core isn't working with the multiple spi interfaces despite my correct pin definitions.
Thank you for the screenshot and I am going to try to get a scope on everything and compare.
I will try poking around with a scope and see what I can see. Ill try some different pin assignments as well. Maybe there is something faulty on the dev board.