|
Post by tjohansen on Feb 25, 2016 22:11:35 GMT
now I have the gateway build and want to upload the gateway software to it.
Downloaded the RFM_MQTT_GW_24.ino
Downloaded the two libraries needed extras, RFM69 and SubPubClient.
In the RFM_MQTT_GW24.ino, changed:
MAC address mqtt_server ip ip
I read something about that I should change something in w5100.h, but have looked in it and cant figure out what to change.
so verified the RFM_MQTT_GW24.ino with no problems and uploaded it to the arduino uno (5v) with LLC's to 3,3v
Now, when I open the debug console no debug data or anything indicating it is working or trying to anything. I have choosen the correct port and baudrate.
I also have plugged in the ethernet cable, and all the leds for that is lighting up. But Its not showing up in my router's connection list.
Any idea why I cant see anything in debug?
|
|
|
Post by tjohansen on Feb 25, 2016 22:13:14 GMT
and the two leds on D7 and D9 arent blinking.
|
|
|
Post by tjohansen on Feb 25, 2016 22:15:42 GMT
now after some patience, writing its posts, I opened debug console again and now its showing some debug stuff.
Aparently It just needed some time :-)
|
|
|
Post by tjohansen on Feb 25, 2016 22:20:17 GMT
Im not getting any IP connection, have I set it up correctly?
byte mac[] = { 0xAD , 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // MAC address for ethernet byte mqtt_server[] = { 192, 168, 0, 24}; // MQTT broker address (Mosquitto) byte ip[] = { 192, 168, 0 , 25 }; // Gateway address (if DHCP fails)
my lan is ofcource 192.168.0.x
|
|
|
Post by tjohansen on Feb 25, 2016 22:25:12 GMT
changed
byte mac[] = { 0xAD , 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // MAC address for ethernet
to
byte mac[] = { 0xDA , 0xAD, 0xBE, 0xEF, 0xBA, 0xBE }; // MAC address for ethernet
and now it got a dhcp ip
:-)
Now I must setup MQTT on my rpi.
|
|
|
Post by tjohansen on Feb 25, 2016 22:33:11 GMT
about debugging
its shows:
GW Version GW V2.4
868 Mhz... connecting no link no link
should any of my two leds on D7 and D9 blink now?
Bare in mind I have not set up the MQTT on the rpi yet. Or made an end node to communicate with.
|
|
|
Post by papa on Feb 26, 2016 1:50:50 GMT
tjohansen, you now need MQTT service running on some computer in your local network like the Pi.
Regarding "byte mqtt_server[] = { 192, 168, 0, 24}; // MQTT broker address (Mosquitto)" ... ^^ make this the IP of the computer where MQTT will be running (sounds like your Pi)
When you get the above accomplished, serial monitor should show MQTT connection & the MQTT LED should light steady.
When you have an end node communicating with the Gateway, the radio LED should blink & Serial Monitor should also show data flowing.
|
|
|
Post by papa on Feb 26, 2016 2:05:38 GMT
Regarding the changes to w5100.h, the RFM69 wireless network will work more reliably (& be less likely to drop connections) if you do that. In my Success... thread, Oct 7, 2015 at 11:15am post, look for "Papa: find these lines in w5100.h" & follow two small changes noted there.
|
|
|
Post by tjohansen on Feb 26, 2016 7:04:17 GMT
Thx very helpful, will look at the w5100.h, cant wait to look into it tonight.
I can feel, its now all the fun parts starting :-)
|
|
|
Post by papa on Feb 26, 2016 20:48:47 GMT
For installing Mosquitto (MQTT) on Raspberry Pi, did you see the Feb 6, 2016 at 6:40pm post in my thread, Raspberry Pi: How to Install OpenHAB-Mosquitto ? In that thread are other posts about installing & configuring OpenHAB on the Pi. That includes some basic configuration files to download.
|
|