dreamer 0 Posted March 28, 2015 Share Posted March 28, 2015 I'm also looking for an enc28j60 library for lm4f that can do http-client things. In my case I want to be able to pull a json file from a webserver that the mcu needs to process. If anyone has any ideas I'm all ears. I did find the stellaris-enc28j60-booster code by xpgdk, which I have successfully built for the stellaris in the past. However, to make it a bit simpler for myself I'd like to use it with Energia, so I can make use of the included libraries. Perhaps this library can be ported to the Energia IDE? if so does anyone have any leads on where to start with this? Quote Link to post Share on other sites
spirilis 1,265 Posted March 29, 2015 Share Posted March 29, 2015 @@dreamer Maybe look for an enc28j60 library for Arduino? It should be easier to port something like that to Energia... most of the work'll already be done. Sent from my Galaxy Note II with Tapatalk 4 Quote Link to post Share on other sites
BRey 22 Posted March 29, 2015 Share Posted March 29, 2015 Have you tried "UIPEthernet" http://forum.43oh.com/topic/7489-energia-library-stellarpad-uipethernet-enc28j60-library/ It is compatible with the Ethernet library which has HTTP client and server examples. You just change "Ethernet.h" to "UIPEthernet.h" (after loading the library). Quote Link to post Share on other sites
dreamer 0 Posted March 29, 2015 Share Posted March 29, 2015 @@BRey You mean the Arduino Ethernet WebClient example? I just tried compiling it for lm4f with UIPEthernet (v02) in Energia and I get: UIPEthernet/UIPUdp.cpp.o:(.bss.INADDR_NONE+0x0): multiple definition of `INADDR_NONE' UIPEthernet/Dns.cpp.o:(.bss.INADDR_NONE+0x0): first defined here UIPEthernet/UIPClient.cpp.o:(.bss.INADDR_NONE+0x0): multiple definition of `INADDR_NONE' UIPEthernet/Dns.cpp.o:(.bss.INADDR_NONE+0x0): first defined here core.a(IPAddress.cpp.o).bss.INADDR_NONE+0x0): multiple definition of `INADDR_NONE' UIPEthernet/Dns.cpp.o:(.bss.INADDR_NONE+0x0): first defined here collect2: error: ld returned 1 exit status Actually I get the same error for all UIPEthernet examples. Quote Link to post Share on other sites
dreamer 0 Posted March 29, 2015 Share Posted March 29, 2015 Ok, some poking around and I commented out line 12 of Dns.h because I think this is already set in common/IPAddress //const IPAddress INADDR_NONE(0,0,0,0); And now it works \o/(please correct me if this is the wrong method to fix this) Quote Link to post Share on other sites
BRey 22 Posted March 29, 2015 Share Posted March 29, 2015 @dreamer I think I was able to use the examples from the Energia "Ethernet" library designed for the connected Tiva Launchpad. I was more interested in MQTT and successfully used the examples from the Energia "PubSubClient" library. I just tested the "Ethernet->EthernetWebserver" example. I had to change #include "Ethernet.h" to #include "SPI.h" #include "UIPEthernet.h" #define D1_LED RED_LED #define D2_LED GREEN_LED And comment out these 2 lines: // Serial.print("new client on port "); // print a message out the serial port // Serial.println(client.port()); Then I was able to control the Red & Green parts of the RGB Led with the web page. B Quote Link to post Share on other sites
reaper7 67 Posted August 30, 2015 Author Share Posted August 30, 2015 bump new v0.4 version Quote Link to post Share on other sites
Gibi 0 Posted October 7, 2015 Share Posted October 7, 2015 With Tiva C TM4C123G I want to set the pin CS PE_0.Where is the function in UIPEthernet for the set?? Quote Link to post Share on other sites
reaper7 67 Posted October 8, 2015 Author Share Posted October 8, 2015 UIPEthernet? this is topic about EtherEncLib not UIPEthernet so, You must change line 424: #define ENC28J60_CONTROL_CS 5 inside: EtherEncLib -> enc28typedef.h but I don't know that this lib works with TIVA, only MSP430G2553 and MSP430F5529 are tested. Quote Link to post Share on other sites
Gibi 0 Posted October 8, 2015 Share Posted October 8, 2015 Thank's and excuse me for the topic error. Quote Link to post Share on other sites
lessarlz 0 Posted November 4, 2015 Share Posted November 4, 2015 Thanks for library! I'm new to the MSP430 world, so I'm a bit lost about the connections with the ENC28j80 Ethernet module. For successfully using the "Hello World" example, which PINs and connections I'm I supposed to do? Thanks! Quote Link to post Share on other sites
reaper7 67 Posted November 5, 2015 Author Share Posted November 5, 2015 @lessarlz - ENC28j60 is a spi device, so connection is very simple for eg. if You are using MSP430G2553 board: ENCpin MSPpin Vcc PIN1 +3.3V GND PIN20 GROUND CS PIN10 P2_2 (you can change this pin in file enc28typedef.h - line 424, then also mandatory! in sketch pinMode(10,OUTPUT); RESET PIN16 RESET SI PIN15 P1_7 (MOSI) SCK PIN7 P1_5 (SCK) SO PIN14 P1_6 (MISO) -- WOL, INT, CLKOUT -> not connected lessarlz and yosh 2 Quote Link to post Share on other sites
lessarlz 0 Posted November 7, 2015 Share Posted November 7, 2015 @lessarlz - ENC28j60 is a spi device, so connection is very simple for eg. if You are using MSP430G2553 board: ENCpin MSPpin Vcc PIN1 +3.3V GND PIN20 GROUND CS PIN5 P1_3 (you can change this pin in file enc28typedef.h - line 424, then also mandatory! in sketch pinMode(5,OUTPUT); RESET PIN16 RESET SI PIN15 P1_7 (MOSI) SCK PIN7 P1_5 (SCK) SO PIN14 P1_6 (MISO) -- WOL, INT, CLKOUT -> not connected Many thanks, reaper7. But I'm Having some issues here. I've tried to use the "HelloWorld" example from the EtherEncLib.c lib. I did all the right connections and changed the "ipaddr[] " char to one appropriate to my network, but I'm not being able to access the HTML page via browser =/ Any thoughts? Quote Link to post Share on other sites
reaper7 67 Posted November 7, 2015 Author Share Posted November 7, 2015 @lessarlz - sorry...my mistake...wrong platform for MSP CS pin is PIN10 P2_2... try to change hardware connection(move wire from msp pin5 to pin10) and change uart speed to 9600 for msp430 lessarlz and yosh 2 Quote Link to post Share on other sites
lessarlz 0 Posted November 8, 2015 Share Posted November 8, 2015 @lessarlz - sorry...my mistake...wrong platform for MSP CS pin is PIN10 P2_2... try to change hardware connection(move wire from msp pin5 to pin10) and change uart speed to 9600 for msp430 hard.jpg site.jpg soft.jpg Thanks again, reaper7 Unfortunately, I'm still not being able to make it work. I have double checked all the hardware connections (including the CS pin change) and got nothing =/ Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.