-
- glyn.hudson
- Fresh Boarder
-
- Posts:15
- Karma: 1
So far I have built up my OKG, successfully received wireless data using RFM12B after making the required change the the JeeLib library.
I have been unable to get the Wiznet 5200 to connect. I have tried using the Arduino library from both Wizent (http://www.wiznettechnology.com/Sub_Modules/en/product/product_detail.asp?Refid=463&page=1&cate1=&cate2=&cate3=&pid=1161&cType=2#tab) and the library Miles sent me from John Crouchley. I think the only difference is the John has disabled the interrupts to enable both the Wiznet and RFM12B to work at the same time.
I have tried running the examples included in the library such as DHCPprinter, webclient and webserver. After uploading the examples (from Arduino IDE 1.0) I get no response from the OKG. The lights on the magjack light up for a few seconds then go out.
Am I missing something?
Thanks, Glyn.
I have been unable to get the Wiznet 5200 to connect. I have tried using the Arduino library from both Wizent (http://www.wiznettechnology.com/Sub_Modules/en/product/product_detail.asp?Refid=463&page=1&cate1=&cate2=&cate3=&pid=1161&cType=2#tab) and the library Miles sent me from John Crouchley. I think the only difference is the John has disabled the interrupts to enable both the Wiznet and RFM12B to work at the same time.
I have tried running the examples included in the library such as DHCPprinter, webclient and webserver. After uploading the examples (from Arduino IDE 1.0) I get no response from the OKG. The lights on the magjack light up for a few seconds then go out.
Am I missing something?
Thanks, Glyn.
-
- Miles
- Administrator
-
- Posts:739
- Karma: 16
I've not heard of anyone else having issues, what I have suggested we do is post up in the articles section a simple test routine to check basic connectivity. Have you looked at the MQQT code Matt was doing? That might help.
openmicros.org/index.php/component/kunena/7-communications-and-protocols/559-openkontrol-gateway-examples-a-nottingham-hackspac?Itemid=0#584
Theres also this which is LLAP to pachube
openmicros.org/index.php/articles/92-ciseco-product-documentation/openkontrol-gateway/168-openkontrol-gateway-example-code-llap-to-pachube-multiple-sensors
openmicros.org/index.php/component/kunena/7-communications-and-protocols/559-openkontrol-gateway-examples-a-nottingham-hackspac?Itemid=0#584
Theres also this which is LLAP to pachube
openmicros.org/index.php/articles/92-ciseco-product-documentation/openkontrol-gateway/168-openkontrol-gateway-example-code-llap-to-pachube-multiple-sensors
-
- dpslwk
- Administrator
-
- Posts:341
- Karma: 11
you need to make sure you get the two files from wiznet in the right place
they need to go into the "/libraries/Ethernet/Utility" folder, now this is the folder inside the arduino-1.0 install NOT under the sketchbook folder, and make sure you only have one copy of the "Ethernet" folder around, i.e. remove any from your sketchbook
arduino doesn't do the best job when it comes to library search paths
hope this helps
Matt
they need to go into the "/libraries/Ethernet/Utility" folder, now this is the folder inside the arduino-1.0 install NOT under the sketchbook folder, and make sure you only have one copy of the "Ethernet" folder around, i.e. remove any from your sketchbook
arduino doesn't do the best job when it comes to library search paths
hope this helps
Matt
-
- glyn.hudson
- Fresh Boarder
-
- Posts:15
- Karma: 1
Whoo, OKG is happily receiving data from my home energy monitor emonTx via RFM12B and posting to emoncms! Been running for a few hours now with no problem. It already seems more robust than a Nanode, even if I un-plugg the Etherent cable, restart the router to power cycle the OKG it always re-connects. I'm leaving it connected for a long term stability test.
Thanks for your help. It must have been a library issue. I was working on my old laptop the evening with a fresh Arduino 1.0 IDE install and it worked first time!
I've posted my code up on Github together with all the modifications and library requirements: https://github.com/openenergymonitor/Open-Kontrol-Gateway
Feel free (please do!) link to my example from the OKG examples page.
I wonder if there is anyway we can made the library modifications needed more user friendly. For example each time I upload the an emonTx / JeeNode I now need to change the CS pin in RF12.cpp back to 0, then back to 1 when I upload to OKG. Could it be possible to set the pin in the sketch. Maybe with something like #define OKG.
One of the modifications is disabling the wiznet interrupts, are these needed? If not, why are they not disabled be default to make for easy use of the SPI bus by other devices.
Thanks for your help. It must have been a library issue. I was working on my old laptop the evening with a fresh Arduino 1.0 IDE install and it worked first time!
I've posted my code up on Github together with all the modifications and library requirements: https://github.com/openenergymonitor/Open-Kontrol-Gateway
Feel free (please do!) link to my example from the OKG examples page.
I wonder if there is anyway we can made the library modifications needed more user friendly. For example each time I upload the an emonTx / JeeNode I now need to change the CS pin in RF12.cpp back to 0, then back to 1 when I upload to OKG. Could it be possible to set the pin in the sketch. Maybe with something like #define OKG.
One of the modifications is disabling the wiznet interrupts, are these needed? If not, why are they not disabled be default to make for easy use of the SPI bus by other devices.
-
- CisecoDev
- Administrator
-
- Posts:670
- Karma: 23
Hi Glyn,
Delighted it worked.
It is certainly possible to modify the JeeLib library so the the RFM12B CS line is passed in though the init code rather than modifying the library for different boards, also the Ethernet library should always block interrupts whilst doing SPI to make it more friendly to other devices that use SPI and interrupts. It is just that the owners/original writers of these libraries did not have the need to do this.
I suspect we will end up forking the code and doing these modifications ourselves - as always time is the main constraint. The question we keep asking ourselves is what do I have to give up to gain the time to do this.
Delighted it worked.
It is certainly possible to modify the JeeLib library so the the RFM12B CS line is passed in though the init code rather than modifying the library for different boards, also the Ethernet library should always block interrupts whilst doing SPI to make it more friendly to other devices that use SPI and interrupts. It is just that the owners/original writers of these libraries did not have the need to do this.
I suspect we will end up forking the code and doing these modifications ourselves - as always time is the main constraint. The question we keep asking ourselves is what do I have to give up to gain the time to do this.
-
- prensel
- Junior Boarder
-
- Posts:22
- Karma: 0
I'm also working on the OKG wih the OEM but using XRF radios instead of the RFM.
Just tried the (first) OEM build, noticed a typo in setting the output on the statusled
I'm re-integrating the ENC networkcard, simply because i have no Wiznet (made mistake when ordering..)
Just tried the (first) OEM build, noticed a typo in setting the output on the statusled
I'm re-integrating the ENC networkcard, simply because i have no Wiznet (made mistake when ordering..)
-
- glyn.hudson
- Fresh Boarder
-
- Posts:15
- Karma: 1
Thanks, fix has been pushed to github.
It seemed to work OK as it was!
It seemed to work OK as it was!
