Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
A

aglock

@aglock
About
Posts
4
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • 💬 Building a Raspberry Pi Gateway
    A aglock

    @mfalkvidd Wow, thanks that works! :D

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    A aglock

    @gohan Tried it again
    configure now recognizes the rpi:

    pi@raspberrypi:~/mys_dev $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=BCM2836, Type=rpi2, CPU=armv7l.
    [SECTION] Detecting SPI driver.
      [OK] SPI driver detected:BCM.
    [SECTION] Detecting init system.
      [OK] init system detected: systemd.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    

    But make fails with the following error:

    -I./core -I./drivers/Linux -I./drivers/BCM -c drivers/BCM/bcm2835.c -o build/drivers/BCM/bcm2835.o
    drivers/BCM/bcm2835.c: In function ‘bcm2835_delayMicroseconds’:
    drivers/BCM/bcm2835.c:441:40: error: expected ‘)’ before ‘PRIu64’
       printf("bcm2835_delayMicroseconds %" PRIu64 "\n", micros);
                                            ^
    drivers/BCM/bcm2835.c:441:40: warning: spurious trailing ‘%’ in format [-Wformat=]
    Makefile:102: recipe for target 'build/drivers/BCM/bcm2835.o' failed
    make: *** [build/drivers/BCM/bcm2835.o] Error 1
    pi@raspberrypi:~/mys_dev $ 
    

    What to do about it?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    A aglock

    @gohan yes. Interesting though when I used git to switch between branches it said all files where the same?
    Do you think the fault is in the gateway somehow?

    Announcements

  • 💬 Building a Raspberry Pi Gateway
    A aglock

    Hello all!

    I'm trying to build a gateway with a Raspberry pi2, ethernet and Domoticz.
    It looks like the gateway is beeing built ok and seems to run fine but nodes can not communicate with it.
    I have read most of the postings here but I can not find any solution.
    Hope you guys can help? Please!

    I run raspbian (Jessie)
    pi@raspberrypi:~/MySensors/bin $ uname -a
    Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux
    

    Using master branch

    https://www.mysensors.org/build/raspberry
    git clone https://github.com/mysensors/MySensors.git --branch master
    

    Configuring like this

    pi@raspberrypi:~/MySensors $ ./configure --my-gateway=ethernet --my-port=5003 --my-transport=nrf24 --my-rf24-ce-pin=22 --my-rf24-cs-pin=24
    [SECTION] Detecting target machine.
      [OK] machine detected: SoC=unknown, Type=unknown, CPU=armv7l.
    [SECTION] Checking GPIO Sysfs.
      [OK] /sys/class/gpio/export found
    [SECTION] Detecting SPI driver.
      [OK] SPI driver detected:SPIDEV.
    [SECTION] Detecting init system.
      [OK] init system detected: systemd.
    [SECTION] Saving configuration.
    [SECTION] Cleaning previous builds.
    [OK] Finished.
    

    Obs! No Raspberry identification, why not? Maybe that is the culprit?
    After make I start the gateway and get this:

    pi@raspberrypi:~/MySensors $ cd bin
    pi@raspberrypi:~/MySensors/bin $ sudo ./mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.1.1
    mysgw: MCO:BGN:INIT GW,CP=RNNG---,VER=2.1.1
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    mysgw: New connection from 127.0.0.1
    mysgw: Client 0 connected
    mysgw: Client 0: 0;0;3;0;2;
    mysgw: Client 0: 0;0;3;0;2;Get Version
    mysgw: Client 0: 0;0;3;0;18;PING
    

    Seems nice and dandy and Domoticz connecting fine.
    Trying with this example node:

    #define MY_RADIO_NRF24
    #define MY_RF24_PA_LEVEL RF24_PA_LOW
    #define MY_DEBUG
    #define MY_NODE_ID 42
    //#define MY_DEBUG_VERBOSE_RF24
    #define MY_BAUD_RATE 9600
    
    #include <MySensors.h>
    #include<Arduino.h>
    
    #define OPEN 1
    #define CLOSE 0
    #define CHILD_ID 1
    
    MyMessage msg(CHILD_ID, V_TRIPPED);
    
    uint8_t value = OPEN;
    
    void setup()
    {
      Serial.print("setup()\n");
    }
    
    void presentation()
    {
      sendSketchInfo("Door", "2.1.1");
      present(CHILD_ID, S_DOOR);
      Serial.print("presentation()\n");
    }
    
    void loop()
    {
      value = value == OPEN ? CLOSE : OPEN;
      send(msg.set(value));
      Serial.print("message sent");
      Serial.print(value + "\n");
      sleep(1000);
    }
    

    And recieve this when running:

    --- Miniterm on /dev/ttyUSB0 9600,8,N,1 ---
    --- Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    40 TSM:INIT
    55 TSF:WUR:MS=0
    77 TSM:INIT:TSP OK
    96 TSM:INIT:STATID=42
    120 TSF:SID:OK,ID=42
    141 TSM:FPAR
    190 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    2267 !TSM:FPAR:NO REPLY
    2291 TSM:FPAR
    2340 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    
    4417 !TSM:FPAR:NO REPLY
    4442 TSM:FPAR
    4491 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    6569 !TSM:FPAR:NO REPLY
    6594 TSM:FPAR
    6643 TSF:MSG:SEND,42-42-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    8720 !TSM:FPAR:FAIL
    8740 TSM:FAIL:CNT=1
    8761 TSM:FAIL:PDT
    

    And no output in gateway either.
    Both radio modules using capacitors.

    What have I missed?

    Thanks, Andreas!

    Announcements
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular