Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 91 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,92 @@
# UD3_Fibernet
## UD3_Fibernet

SFP ethernet board for the UD3 TC driver

## Support

Join the UD3 community Discord server for support and collaboration.
[Discord](https://discord.gg/ZKQQA6aHqx)

## Programming

# Obtaining the Binary


You must obtain a hex file and then upload to Fibernet.

There are two ways to do this - obtain a pre-built binary file (recommended) or build from source.

The Easy Way: The current latest prebuild firmware is available here: https://github.com/TMaxElectronics/UD3-Fibernet-Firmware/releases/tag/0.8 (boot.hex)

The less easy Way: The See [Building from Source](#Building-from-Source)



# Uploading the hex file to the chip

You will need to program the chip using a Pickip programmer.
Suggest using a Pickit 4+ as support for 3 and below are limited, but can still be done. You may have to use previous versions of software such as MPLAB 6.0 or below which still support Pickit 3

You can program the UD3_Fibernet either by connecting it directly to a UD3 board and powering it, or standalone by supply 5V to the correct pins

![Alt text](./images/PickProgramming.jpg "Programming using a PIC")

# Understanding the LED colors
Here is a list of colors for the LED on the RIGHT of the SFP module. The individual RGB colors each have their own meaning, independent of what the others are doing.
- Red: Link not up yet or network stack uninitialized (check ud3 "min_enable 1" and your networking hardware)
- Green: Comms with UD3 (flashing once per packet)
- Blue: DHCP success (basically a "hey I'm fully set up and ready" indicator)

NOTE: the LED flashing red is a crash-error code. If this happens it would be interesting to get info on what happened to get you here as its a software bug. It's morse code with a few letters that tells you what error happened. You can make a video of it and send it here.

The LEFT LED on the other hand is color configurable with the jumpers next to it, so the color themselves doesn't mean anything.
- Led OFF: Network chip not configured yet or link not up
- Led ON: Link up
- Led Blinking: Link Activity

The Fibernet bootloader also uses LED Color codes to indicate it checking for a file on the card, verifying the file, erasing flash and finally writing the new firmware. But I must admit I don't know those codes of the top of my head. I'll update the list once I get around to checking those.

# Testing
In order to test, you will need to connect it to the UD3.

You will also need to connect the hardware using 100Base-Fx transcievers. See [Hardware](#Hardware)

Note that there is no more min_enable command anymore - it is always on!

Initially you will just get one red light. The red light is the fibernet waiting for a unique ID from the UD3 for generating a MAC address

Did you know that the Fibernet also runs a Terminal for debugging? I think it's relatively undocumented. There are file commands, cat, echo, ifconfig and a texteditor with syntax highlighting for editing the config file on the SD card... And some debug stuff

Simply connect to the UD3 and run "debug fn" in the console. It tunnels you directly into the Fibernet

debug fn works over USB to debug why you cannot connect over ethernet. It works over ethernet too. Ethernet -> fibernet -> UD3 -> back to fibernet

# Hardware

Fibernet using 100Base-Fx. Do not try and use 1000Base-FX or it won't work.

Search for hardware such as 10/100/1000-TX RJ45 Ethernet to <span style="color: orange;">100Base-FX SFP Fiber Media Converter</span>

![Alt text](./images/100baseFX.webp "100BaseFX")
![Alt text](./images/RJ45to100BaseFX.jpg "100BaseFX to RJ45")
![Alt text](./images/fiber.jpg "Fiber Patch Cable")

# Building from Source

The firmware is located at https://github.com/TMaxElectronics/UD3-Fibernet-Firmware

Download MPLAB IDE https://www.microchip.com/en-us/tools-resources/develop/mplab-x-ide

<font style="color: red;">
Important: You will need a licenced copy of MPLAB for this to work! It currenty costs around US$80

If not, you will likely receive the error

cc1.exe: warning: Compiler option (Optimize for size) ignored because this feature requires the MPLAB XC32 PRO compiler

Link Error: Not enough space in program memory
</font>

You should be able to open the project and compile directy.

![Alt text](./images/rn_image_picker_lib_temp_8aa15e99-5e1e-4f01-89d9-7bb1343e008d.webp "Building from source")
Binary file added images/100baseFX.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/PickProgramming.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/RJ45to100BaseFX.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fiber.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.