Main Site Documentation

Fez Hydra ethernet code examples


#1

Hi I am new to the whole gadgeteer thing. I was wondering if any one could provide me a code example or tell me what I am missing with getting the ENC28 working on the hydra. I have the newest firmware and SDK
Thanks for any help


#2

Hi Alpha095, welcome to the community.

What do you mean by what am I missing? Have you tried a project with the ENC28 module? I can tell you though that you will need the Ethernet version of the firmware on the board. Do you have that one installed on your Hydra? More information will be needed to help you. :slight_smile:


#3

I believe I have v4.1.3.1 installed when checked yesterday. I don’t have it in front of me right now because I am at work :slight_smile:

From my memory all I was trying to do was create a new instance of EthernetENC28

I set the mac address via MFDeploy and marked it to use Dhcp.


EthernetENC28 enc =  new EthernetENC28(3);
enc.EnableDhcp ();

when I call enc.EnableDhcp (); it throws an exception.

What I mean by missing something. I have no idea where to get started :stuck_out_tongue:


#4

Hi Alpha,

This instance:

EthernetENC28 enc =  new EthernetENC28(3);
enc.EnableDhcp ();

is part of the incomplete OSH library to make Ethernet Dynamic. Currently to get Ethernet to work you will need to flash the board with the Ethernet version of the firmware. After the firmware is present, you will need to connect the ENC28 module to socket 3 only. You can then use any of the Ethernet examples on our support page (http://wiki.tinyclr.com/index.php?title=Networking) to get your Ethernet project working.

You will know if the Ethernet version is on your board if you reboot it and it seems to lock up. Currently the ENC28 module needs to be in socket 3 to complete the boot cycle.


#5

I guess the question is where do I find the Ethernet firmware?
Is this the guide I should be using? http://wiki.tinyclr.com/index.php?title=Firmware_Update_FEZ_Hydra

Thanks for the help. I guess I misunderstood the release notes saying " is not dynamic"


#6

The Ethernet firmware is located in the GHI directories here: C:\Program Files (x86)\GHI Electronics\GHI OSH NETMF v4.1 SDK\FEZ Hydra\Firmware.
From here you can select the Ethernet Firmware when following the instructions for normal flashing.

Also, yes, that is the guide you follow to flash the Hydra.


#7

Thanks !


#8

No this is not closed. I have this exception too. Internet firmware is installed.


#9

So did you follow this portion of the thread above?

[quote]This instance:
EthernetENC28 enc = new EthernetENC28(3);
enc.EnableDhcp ();

is part of the incomplete OSH library to make Ethernet Dynamic. Currently to get Ethernet to work you will need to flash the board with the Ethernet version of the firmware. After the firmware is present, you will need to connect the ENC28 module to socket 3 only. You can then use any of the Ethernet examples on our support page (http://wiki.tinyclr.com/index.php?title=Networking) to get your Ethernet project working.

You will know if the Ethernet version is on your board if you reboot it and it seems to lock up. Currently the ENC28 module needs to be in socket 3 to complete the boot cycle.
[/quote]

So you don’t need to instantiate the module nor enable DHCP in your code. Just plug it in to Socket 3 (must be 3) and set your DHCP up from MFDeploy.