Navigation

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

    Posts made by DanielKr

    • RE: [SOLVED] MQTT gateway based on Arduino Uno - Uno compatible W5100 Ethernet shield - RFM69HW radio

      Hi @evb,

      thanks a lot for your quick response. You were exactly right: My sensor was still running the "old" RFM69 driver and I was not aware that the new one is not backward-compatible. It is also briefly mentioned in the documentation - link.

      For completeness (and other users who may face the same problems):
      Second problem which I experienced was that my gateway was disconnecting from my mosquitto mqtt broker after 0-2 minutes. Logfile mosquitto.log was showing:

      2021-10-12T13:25:42: mosquitto version 2.0.12 running
      2021-10-12T13:28:32: New connection from 192.168.17.4:55389 on port 1883.
      2021-10-12T13:28:32: New client connected from 192.168.17.4:55389 as mysensorsgw (p2, c1, k15, u'mysensors').
      2021-10-12T13:28:54: Client mysensorsgw has exceeded timeout, disconnecting.
      

      I was first powering the Arduino Uno with a normal 12V/1A power supply (I thought 12W should be sufficient). Eventually I found out that if I power the Arduino with a USB-Cable and a USB power supply (= 5V), this issue stops and it did not disconnect. Maybe the step-down converter on the Arduino is not powerful enough to supply the Arduino, W5100 and RFM69HW radio with 5V / 3.3V?

      Third (and current) problem is that the range is very poor - the message arrives only if I am in a ~ 5 meter radius around the gateway. I was first suspecting that I have to tweak the MY_RFM69_TX_POWER_DBM setting as described in other articles but even with the default setting it should work better. I suspect that my radio is broken and will try to replace it later this week. To stabilize the power supply to the radio I added a 47 uf capacitor between the 3.3V in for the radio and ground but that did not help. By the way: Why did you add a second 0.1 uf capacitor in parallel to the 47 uf one? Is that a ceramic capacitor with different characteristics?

      Best regards,
      Daniel

      posted in Hardware
      DanielKr
      DanielKr
    • RE: [SOLVED] MQTT gateway based on Arduino Uno - Uno compatible W5100 Ethernet shield - RFM69HW radio

      Hi evb!

      Thanks a lot for your great tutorial. Setting up an ethernet-based MQTT Gateway with my RFM69HW radios is exactly what I am planning to do.

      I followed your guide but unfortunately I cannot receive messages with my Gateway so there seems to be something wrong. I suspect it has to do with the "MY_RFM69_NEW_DRIVER" which according to your comments seem to be a prerequisite to get RFM69 and W5100 work on the same SPI bus:

      Hardware:

      • Arduino Uno R3 (Genuine)
      • W5100 Ethernet Shield
      • RFM69HW radio, version 868MHz

      Software:

      • Arduino IDE version 1.8.15
      • MySensors library (2.3.2) --> slightly newer than the one you used

      What works:

      • Using the "GatewaySerial" and the "old" driver, I can open the Serial Monitor from Arduino IDE and see messages coming in. Therefore, my wiring is OK.
      // Enable and select radio type attached
      #define MY_RADIO_RFM69
      #define MY_IS_RFM69HW
      
      // Enable encryption
      #define MY_RFM69_ENABLE_ENCRYPTION
      
      // When W5100 shield is connected we have to move SS (slave select) pin for the RFM69 radio because the shield
      // is using the default D10
      #define MY_RFM69_CS_PIN 6
      
      • Using the "GatewayW5100MQTT" it connects to my MQTT broker and posts the initial message stating my MySensors version.

      What does not work:

      • As soon as I enable the new driver, I stop receiving messages (no matter whether I use the "GatewaySerial" or the "GatewayW5100MQTT" code). As opposed to your example, I am using message encryption. Is it possible that the new driver does not support encryption? This is the only derivation which I have from your code.
      // Enable and select radio type attached
      #define MY_RADIO_RFM69
      #define MY_RFM69_FREQUENCY RFM69_868MHZ
      #define MY_IS_RFM69HW
      #define MY_RFM69_NEW_DRIVER
      
      // Enable encryption
      #define MY_RFM69_ENABLE_ENCRYPTION
      
      // When W5100 shield is connected we have to move SS (slave select) pin for the RFM69 radio because the shield
      // is using the default D10
      #define MY_RFM69_CS_PIN 6
      
      • If I use the old RFM69 driver (as in the "GatewaySerial" example above) it also does not receive messages. I suppose because the new driver is required to have the radio and ethernet shield run side-by-side.

      Thanks for your help!

      Cheers,
      Daniel

      posted in Hardware
      DanielKr
      DanielKr