Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. firstof9
    3. Best
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by firstof9

    • RE: [RESOLVED] Problems connecting node to gateway

      Got it working it was this bit causing issues:

      // W5100 Ethernet module SPI enable (optional if using a shield/module that manages SPI_EN signal)
      #define MY_W5100_SPI_EN 4
      

      removing that fixed it

      Also as my gateway was having issues freaking out when receving radio packets I also modified my ethernet.h per this post:
      https://forum.mysensors.org/topic/5109/solved-rfm69-based-nodes-unable-to-report-lib-version/26

      and changed the following:

      #define MY_DEFAULT_ERR_LED_PIN A0  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  A1  // Receive led pin
      #define MY_DEFAULT_TX_LED_PIN  A2  // Transmit led pin
      

      Thank you all for your suggestions.

      posted in Troubleshooting
      firstof9
      firstof9
    • RE: New RFM69 driver error

      @scalz
      Your modifications seemed to have resolved the issue.

      Also I've made this modification to MyTransport.cpp so it resets the radio on init:

      void stInitTransition(void)
      {
      	#if defined(ADAFRUIT_RFM69)
      	pinMode(9, OUTPUT);
      	digitalWrite(9, HIGH);
      	delay(100);
      	digitalWrite(9, LOW);
      	delay(100);
      	#endif
      	TRANSPORT_DEBUG(PSTR("TSM:INIT\n"));
      

      Sketch for reference:

      // Enable debug prints to serial monitor
      #define MY_DEBUG
      
      // Enable Adafruit RFM69 breakout fix
      #define ADAFRUIT_RFM69
      
      // Enable and select radio type attached
      #define MY_RADIO_RFM69
      
      #define MY_RFM69_NEW_DRIVER // ATC on RFM69 works only with the new driver
      #define MY_RFM69_ATC_TARGET_RSSI_DBM (-70)  // target RSSI -70dBm
      #define MY_RFM69_MAX_POWER_LEVEL_DBM (10) // amx. TX power 10dBm = 10mW
      
      #define MY_IS_RFM69HW  // Mandatory if you radio module is the high power version (RFM69HW and RFM69HCW), Comment it if it's not the case
      #define MY_RF69_FREQUENCY RFM69_915MHZ  // Define for frequency setting. Needed if you're radio module isn't 868Mhz (868Mhz is default in lib)
      
      #define MY_RF69_SPI_CS 4
      #define MY_RF69_IRQ_PIN 2
      //#define MY_RF69_IRQ_NUM 0
      
      //#define W5100SPIPATCH
      
      #define SKETCH_NAME "MySensors Ethernet Gateway"
      #define SKETCH_MAJOR "0"
      #define SKETCH_MINOR "5"
      
      // How many clients should be able to connect to this gateway (default 1)
      #define MY_GATEWAY_MAX_CLIENTS 2
      
      // Enable gateway ethernet module type
      #define MY_GATEWAY_W5100
      
      // Enable Soft SPI for NRF radio (note different radio wiring is required)
      // The W5100 ethernet module seems to have a hard time co-operate with 
      // radio on the same spi bus.
      #if !defined(MY_W5100_SPI_EN) && !defined(ARDUINO_ARCH_SAMD)
        #define MY_SOFTSPI
        #define MY_SOFT_SPI_SCK_PIN 14
        #define MY_SOFT_SPI_MISO_PIN 15
        #define MY_SOFT_SPI_MOSI_PIN 16
      #endif  
      
      // Enable to UDP
      //#define MY_USE_UDP
      
      #define MY_IP_ADDRESS 192,168,1,204   // If this is disabled, DHCP is used to retrieve address
      // Renewal period if using DHCP
      //#define MY_IP_RENEWAL_INTERVAL 60000
      // The port to keep open on node server mode / or port to contact in client mode
      #define MY_PORT 5003
      
      // Controller ip address. Enables client mode (default is "server" mode).
      // Also enable this if MY_USE_UDP is used and you want sensor data sent somewhere.
      //#define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 254
      
      // The MAC address can be anything you want but should be unique on your network.
      // Newer boards have a MAC address printed on the underside of the PCB, which you can (optionally) use.
      // Note that most of the Ardunio examples use  "DEAD BEEF FEED" for the MAC address.
      #define MY_MAC_ADDRESS 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED
      
      // Enable inclusion mode
      #define MY_INCLUSION_MODE_FEATURE
      // Enable Inclusion mode button on gateway
      //#define MY_INCLUSION_BUTTON_FEATURE
      // Set inclusion mode duration (in seconds)
      #define MY_INCLUSION_MODE_DURATION 60
      // Digital pin used for inclusion mode button
      //#define MY_INCLUSION_MODE_BUTTON_PIN  3
      
      // Set blinking period
      #define MY_DEFAULT_LED_BLINK_PERIOD 300
      
      // Flash leds on rx/tx/err
      // Uncomment to override default HW configurations
      //#define MY_DEFAULT_ERR_LED_PIN 5  // Error led pin
      #define MY_DEFAULT_RX_LED_PIN  6  // Receive led pin
      //#define MY_DEFAULT_TX_LED_PIN  7  // Transmit led pin
      
      #if defined(MY_USE_UDP)
      #include <EthernetUdp.h>
      #endif
      #include <Ethernet.h>
      #include <MySensors.h>
      
      void presentation()  
      { 
        // Send the sketch version information to the gateway
        sendSketchInfo(SKETCH_NAME, SKETCH_MAJOR"."SKETCH_MINOR);
      }
      
      void setup()
      {
      }
      
      void loop()
      {
      }
      
      posted in Troubleshooting
      firstof9
      firstof9
    • RE: New RFM69 driver error

      @scalz
      I've updated my sketch to include that for the new driver. Thank you.
      I had to use that mod for the older driver.

      posted in Troubleshooting
      firstof9
      firstof9