[Solved] PiGatewaySerial not looking for devices.



  • Hi all,

    I've been trying to get my first test sensor and gateway off the ground tonight with no luck.

    I'm using my raspberry pi( 1st gen 256mb model b ) directly connected to my nrf24l01+ radio.

    pi@sensormachine /dev $ cat /proc/cpuinfo
    processor	: 0
    model name	: ARMv6-compatible processor rev 7 (v6l)
    BogoMIPS	: 2.00
    Features	: half thumb fastmult vfp edsp java tls
    CPU implementer	: 0x41
    CPU architecture: 7
    CPU variant	: 0x0
    CPU part	: 0xb76
    CPU revision	: 7
    
    Hardware	: BCM2708
    Revision	: 0002
    Serial		: 00000000e42e6806
    

    I synced and built the PiGatewaySerial as per the instructions and fired it up and get the following:

    pi@sensormachine ~/mysensors/Raspberry $ sudo ./PiGatewaySerial
    Starting PiGatewaySerial...
    Protocol version - 1.4
    Created PTY '/dev/pts/1'
    Gateway tty: /dev/ttyMySensorsGateway
    ================ SPI Configuration ================
    CSN Pin  	 = CE0 (PI Hardware Driven)
    CE Pin  	 = Custom GPIO25
    Clock Speed	 = 8 Mhz
    ================ NRF Configuration ================
    STATUS		 = 0x0e RX_DR=0 TX_DS=0 MAX_RT=0 RX_P_NO=7 TX_FULL=0
    RX_ADDR_P0-1	 = 0xa8a8e1fc00 0xa8a8e1fc00
    RX_ADDR_P2-5	 = 0xff 0xc4 0xc5 0xc6
    TX_ADDR		 = 0xe7e7e7e7e7
    RX_PW_P0-6	 = 0x20 0x20 0x20 0x00 0x00 0x00
    EN_AA		 = 0x3b
    EN_RXADDR	 = 0x06
    RF_CH		 = 0x4c
    RF_SETUP	 = 0x23
    CONFIG		 = 0x0e
    DYNPD/FEATURE	 = 0x3f 0x06
    Data Rate	 = 250KBPS
    Model		 = nRF24L01+
    CRC Length	 = 16 bits
    PA Power	 = PA_LOW
    

    But after this nothing happens, on the PI side, neither on this console nor on the serial port that the gateway program creates. It just spits out the following

    pi@sensormachine /dev $ sudo cat ttyMySensorsGateway
    0;0;3;0;14;Gateway startup complete.
    

    My sensor node is very simple 3.3v pro mini with a radio as per mysensors.org instructions and a dallas temp sensor. I downloaded the 1.4 FINAL release from github. The sketch used was the DallasTemperatureSensor example. All it spits out is

    sensor started, id 255
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    req node id
    send: 255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    

    Which I take it means that it is constantly looking for a gateway?

    Does anyone have a clue as to what might be going on?

    Anything info in my post I'm missing that might help diagnose this?



  • @andrimar I did not see any mention of controller, are you using a certain controller on your RPi? The sensor node is looking for a ID to be assigned by a controller, the GW does not assign the ID. You can also hardcode the ID in your sensor sketch.



  • @Dwalt Ahh ok, my misunderstanding was probably that assumed the PiGatewaySerial was a completely standalone program that would just accept connections and start converting wireless packages to serial ones on startup.

    Hopefully I'll have time to try this out again tonight with some controller attached. Any recommendations on the easiest controller to get up, just so I can get a proof of concept going?

    I'll let you know how it goes if I get to it tonight.

    Thanks!


  • Mod

    I'm using Domoticz. The project has a nice SD card image for the Raspberry Pi, http://sourceforge.net/projects/domoticz/files/
    Instructions to install the SD Card is provided within the archive.



  • Finally got a chance to install Domoticz and unfortunately pretty useless for my setup as the MySensors Gateway USB plugin only gives /dev/ttyAMA0 as an option for a serial port and not the /dev/ttyMySensorsGateway created by PiGatewaySerial app.

    Any other easy to use options?

    Also, one thing I forgot to mention in my earlier post. I have a 10uF cap on my radios, as opposed to the classic 4.7uF. Will this make a difference? Only reason I stuck those in there was because that is the only thing I have on hand.

    Second thing, is there any "mysensors serial log decipher" document? So the following becomes less cryptic

    255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    

  • Mod

    @andrimar said:

    Finally got a chance to install Domoticz and unfortunately pretty useless for my setup as the MySensors Gateway USB plugin only gives /dev/ttyAMA0 as an option for a serial port and not the /dev/ttyMySensorsGateway created by PiGatewaySerial app.

    Any other easy to use options?

    It works with Domoticz. See http://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway section "Enable the gateway for use with Domoticz"

    Also, one thing I forgot to mention in my earlier post. I have a 10uF cap on my radios, as opposed to the classic 4.7uF. Will this make a difference?

    The exact value usually doesn't matter

    Second thing, is there any "mysensors serial log decipher" document? So the following becomes less cryptic

    255-255-255-0 s=255,c=3,t=3,pt=0,l=0,st=fail:
    

    Yes. http://www.mysensors.org/download/serial_api_15



  • Damn should have waited 30 more minutes before posting.

    My main problem that I connected the radio as described here http://tmrh20.github.io/RF24/ which puts the CE pin in the "wrong" location for PiGatewaySerial. After fixing that I started getting node id requests etc.

    @mfalkvidd said:

    It works with Domoticz. See http://forum.mysensors.org/topic/2437/step-by-step-procedure-to-connect-the-nrf24l01-to-the-gpio-pins-and-use-the-raspberry-as-a-serial-gateway section "Enable the gateway for use with Domoticz"

    Cool solution, however I did something different as I hadn't seen this before digging in. In short I noticed the domoticz.db file. In my experience that usually means sqlite. So I opened it in a sqlite browser and started digging, found the plugin config and manually pointed it to the correct location and started domoticz again. Bit dirty I know but works like a charm.

    @mfalkvidd said:

    Yes. http://www.mysensors.org/download/serial_api_15

    That is the data format, not the debug log format of the node right?

    Thanks a lot for your help. Very nice to be at a point where you have a working vertical slice(controller <-> gateway <-> sensor) of the setup! 🙂


Log in to reply
 

Suggested Topics

  • 3
  • 3
  • 2
  • 2
  • 2
  • 10

11
Online

11.2k
Users

11.1k
Topics

112.5k
Posts