Code Monkey home page Code Monkey logo

Comments (4)

computourist avatar computourist commented on August 14, 2024

Hi TP,

I'm using an old version of Arduino IDE (1.05), never bothered to upgrade. But that should not cause any problems.

The SPI conflict only occurs when the RFM module receives a radio packet. The RFM will generate an interrupt request and will access the SPI bus. By disabling responses to the interrupt request whilst the ethernet module is using the SPI bus this problem is solved.

This means the connection to the MQTT broker should be established and remain connected until a conflict occurs. If you have no end node transmitting, no packets are received and the connection with the MQTT-broker should not be affected.

I think you have a different problem.
What is the serial output with/without the RFM connected ? Have you checked your supply voltages with/without the RFM ?

Leaving out the LED's is no problem.

from rfm69-mqtt-client.

 avatar commented on August 14, 2024

Hi computourist,
thank you very much for your quick response! Your comment helps me a lot.

I tried both mb102 as well as usb (and batteries). Maybe it's a good idea to connect it to a better voltage source to be sure it's not a power problem. I will also try IDE 1.05 - all I have to is to set ip, mac etc. and change the two lines in the w5100.h header file, right? Just asking because it doesn't seem to work although I'm trying very hard and I'm experienced with this kind of setups.

If I connect both the rfm69 (not high power version) and ethernet to the pro mini or uno the console only says "failed to connect" once and then kind of freezes. Without the rfm69 it connects immediatedly after one failed connect. I will check everything asap.

Thank you very much for your help!

from rfm69-mqtt-client.

 avatar commented on August 14, 2024

Hi computourist,
I tried several voltage sources but it just wont work. IDE 1.05 didnt help either.

If I use the pro mini I can't even connect to the server - using the same on the UNO sketch I can connect to the mqtt server but only without MISO connected between RFM69 and Arduino UNO. I tried several ethernet shields as well as many boards. Do you think the problem might be related to the boards not beeing genuine ones? The uber homeautomation sketches (Eric Tsai) are working without any problems so far... I really dont know what to do. Do you have any advice for me or could you give me any hints?

I should have the correct wiring between pro mini/ UNO (with level shifter) and I also have set the everything correctly up (mac, mqtt server ip, ...). What else could I try? Its impossible everybody else gets this sketch to work except for me. I also changed the w5100.h according to your description. I even tried HCW and CW versions of the module.

In order to use your setup: can I leave the sketch RFM_MQTT_GW_22.ino as it is except for some values like HCW, mac, ip, password etc.?

Thank you so much!

edit: Id like to add that the mqtt connection between the broker and gateway is cut after a few seconds although I changed the w5100.h directly in the libraries folder. I dont think its a switch/router problem as its possible to connect to the server with the RFM69...

from rfm69-mqtt-client.

computourist avatar computourist commented on August 14, 2024

Difficult to diagnose your problems. The fact that you get a connection with MISO disconnected suggest a problem with the sharing of the SPI bus. The uber sketches of Eric avoid sharing the bus by using 2 Arduino's connected with a serial link.
Do you use level-shifters ? If so, how are they connected ? Are they 3-state (on,off, float) so you can float the SPI-bus for other devices to use ?

  • The gateway sketch can be used as-is; only thing you need to change are some parameters.
  • The MQTT-gateway always shouts: "failed to connect" before connecting.. (bad programming)
  • The boards I use are China-clones; no problem with that...

Success....

from rfm69-mqtt-client.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.