[SOLVED] Raspberry Pi serial gateway NRF24 - !TSM:INIT:TSP FAIL



  • Hi, can somebody help me resolve !TSM:INIT:TSP FAIL? I proceeded according to https://www.mysensors.org/build/raspberry but I get error and not sure where is the problem:

    ./configure --my-transport=rf24 --my-rf24-irq-pin=15 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyMySensorsGateway
    
    sudo ./bin/mysgw
    Dec 31 11:07:50 INFO  Starting gateway...
    Dec 31 11:07:50 INFO  Protocol version - 2.3.1
    Dec 31 11:07:50 DEBUG Serial port /dev/ttyMySensorsGateway (115200 baud) created
    Dec 31 11:07:50 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,REL=255,VER=2.3.1
    Dec 31 11:07:50 DEBUG TSF:LRT:OK
    Dec 31 11:07:50 DEBUG TSM:INIT
    Dec 31 11:07:50 DEBUG TSF:WUR:MS=0
    Dec 31 11:07:50 DEBUG !TSM:INIT:TSP FAIL
    Dec 31 11:07:50 DEBUG TSM:FAIL:CNT=1
    Dec 31 11:07:50 DEBUG TSM:FAIL:DIS
    Dec 31 11:07:50 DEBUG TSF:TDI:TSL
    ...
    

    Double checked wiring of NRF24L01+ with 100uf capacitor, NRF24L01+ works OK on my arduino.

    RPi 3 B, Debian 9.3 Stretch


  • Mod

    @xanda could you post photos of the wiring? Maybe we can spot something.



  • Hello, try --my-transport=nrf24





  • @vidin --my-transport=nrf24 returns [ERROR] Invalid transport type.


  • Mod

    I am not sure if the 3.3v output from raspberry is enough to power the nrf24


  • Mod

    @gohan it works for me
    @xanda wiring looks good to me.


  • Mod

    Did it work before on an Arduino board? If you haven't tried and you paid it very cheap it could also be a fake chinese clone that is either bad or not a really nrf24 chip



  • @gohan Yes it worked on Arduino board and about a year ago it even worked on Raspberry. So I thought its software issue.



  • Ok man, where is connection to NFR24l01????
    From picture i see you are use SPI but never see where is configure it ?
    1st. check are you have a spidev0.0 or another. then config need to be like this:
    ./configure --spi-spidev-device=/dev/spidev0.0 --my-transport=rf24 --my-rf24-ce-pin=XX --my-rf24-cs-pin=YY
    need to change XX and YY with your connection to the Pi.
    You use SPI for connection but configure gateway as a serial input.
    With this configuration never work. If you make external plate (arduino with NRF24l02) and connect it to serial port of
    Pi will work but serial need to be one of real TTys.

    Regards



  • This is what i use to configure my raspberry pi3 to work vi serial.

    --my-transport=rf24 --my-rf24-pa-level=RF24_PA_LOW --my-rf24-irq-pin=15 --my-gateway=serial --my-serial-is-pty --my-serial-pty=/dev/ttyUSB020 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

    Built using this page. https://www.mysensors.org/build/raspberry

    And when recieving this error "Dec 31 11:07:50 DEBUG !TSM:INIT:TSP FAIL" I had found a bad jumper that I had used. Hope This helps!



  • As kebibg said you must also configure the pins for CE and CS. The configure i used was :

    --my-transport=rf24 --my-rf24-pa-level=RF24_PA_LOW --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

    Also you must connect MISO to pin 21, Mosi to pin 19 and CLK to pin 23 on raspberry



  • @badisensors said in Raspberry Pi serial gateway NRF24 - !TSM:INIT:TSP FAIL:

    As kebibg said you must also configure the pins for CE and CS. The configure i used was :

    --my-transport=rf24 --my-rf24-pa-level=RF24_PA_LOW --my-gateway=serial --my-serial-is-pty --my-serial-port=/dev/ttyUSB020 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 --my-rf24-irq-pin=15 --my-leds-err-pin=12 --my-leds-rx-pin=16 --my-leds-tx-pin=18

    Also you must connect MISO to pin 21, Mosi to pin 19 and CLK to pin 23 on raspberry

    The only pin's I needed to specify on my setup was IRQ and leds. The GW has been working great for 2+ years on my raspberry pie 3b with nrf24+.

    Why did I Not have to specify them in my setup? did something change? I am running version 2.3.1.



  • 2 years ago were you using version 2.3.1 ?



  • @badisensors 2.0.0 not really 2 years ago more like 1 1/2. Why do you ask?



  • Because in 1.5-2 years many things are changing. Did you try my config?



  • @badisensors I did try your config and it works just as mine does. Just wondering if the adding this --my-rf24-ce-pin=22 --my-rf24-cs-pin=24 to the config was necessary. But from the my test it is not. Thanks.



  • If we use pin 22 for CE and pin 24 for CS it is not necessery to declare as you said. But if we want to use other pins we need to declare. I havent try though with other pins.



  • I changed cables, get new NRF24L01+ PA/LNA and make clean install of rasbian. Nothing helped, but then out of nothing it started to work (at least no fail). Its a mystery to me why. Thank you all for help.

    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw
    Jan 12 10:05:42 INFO  Starting gateway...
    Jan 12 10:05:42 INFO  Protocol version - 2.3.1
    Jan 12 10:05:42 DEBUG Serial port /dev/ttyUSB020 (115200 baud) created
    Jan 12 10:05:42 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,REL=255,VER=2.3.1
    Jan 12 10:05:42 DEBUG TSF:LRT:OK
    Jan 12 10:05:42 DEBUG TSM:INIT
    Jan 12 10:05:42 DEBUG TSF:WUR:MS=0
    Jan 12 10:05:42 DEBUG !TSM:INIT:TSP FAIL
    Jan 12 10:05:42 DEBUG TSM:FAIL:CNT=1
    Jan 12 10:05:42 DEBUG TSM:FAIL:DIS
    Jan 12 10:05:42 DEBUG TSF:TDI:TSL
    Jan 12 10:05:52 DEBUG TSM:FAIL:RE-INIT
    Jan 12 10:05:52 DEBUG TSM:INIT
    Jan 12 10:05:52 DEBUG !TSM:INIT:TSP FAIL
    Jan 12 10:05:52 DEBUG TSM:FAIL:CNT=2
    Jan 12 10:05:52 DEBUG TSM:FAIL:DIS
    Jan 12 10:05:52 DEBUG TSF:TDI:TSL
    ^CJan 12 10:05:53 NOTICE Received SIGINT
    
    pi@raspberrypi:~/MySensors $ sudo ./bin/mysgw
    Jan 12 10:14:30 INFO  Starting gateway...
    Jan 12 10:14:30 INFO  Protocol version - 2.3.1
    Jan 12 10:14:30 DEBUG Serial port /dev/ttyUSB020 (115200 baud) created
    Jan 12 10:14:30 DEBUG MCO:BGN:INIT GW,CP=RNNGL-Q-,REL=255,VER=2.3.1
    Jan 12 10:14:30 DEBUG TSF:LRT:OK
    Jan 12 10:14:30 DEBUG TSM:INIT
    Jan 12 10:14:30 DEBUG TSF:WUR:MS=0
    Jan 12 10:14:30 DEBUG TSM:INIT:TSP OK
    Jan 12 10:14:30 DEBUG TSM:INIT:GW MODE
    Jan 12 10:14:30 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
    Jan 12 10:14:30 DEBUG MCO:REG:NOT NEEDED
    Jan 12 10:14:30 DEBUG MCO:BGN:STP
    Jan 12 10:14:30 DEBUG MCO:BGN:INIT OK,TSP=1
    Jan 12 10:14:30 DEBUG TSM:READY:NWD REQ
    Jan 12 10:14:30 DEBUG TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:```

  • Mod

    dodgy cable/pin maybe?


Log in to reply
 

Suggested Topics

  • 3
  • 24
  • 2
  • 1
  • 2
  • 4

0
Online

11.2k
Users

11.1k
Topics

112.5k
Posts