Commit Graph
1044 Commits
Author SHA1 Message Date
René van Dorst cdbc48f2c2 Rename LED_28 to LED_28_SYS.
So it clear that led 28 is the SYSTEM LED.
2026-03-28 19:29:49 +01:00
Jan Hoffmann efe0c282ba Fix I2C access code
While the current implementation works for what it is actually used, it
is broken when trying to do larger transfers.

The length field in the control register has a size of 4 bits. In every
transfer, length+1 bytes are read. Thus, each transfer is limited to a
maximum of 16 bytes. Add a check for the length, and write the correct
value to the register.

Also update the loop in "sfp_send_data" to properly increment the output
register. Remove the unused special case for a length of 128 bytes.
2026-03-28 18:14:15 +01:00
René van Dorst 54fced05b0 Merge pull request #178 from bennydiamond/Support_ZX_SWTGW215AS
Add support for PCB-SWTG115AS-V2.0
2026-03-28 13:16:07 +00:00
bennydiamond b64dfd8c25 Correction on IO mappings
Add further clarification on mapping assumptions
2026-03-27 20:56:09 -04:00
bennydiamond 5f1cd4cce0 Update documentation 2026-03-27 19:34:39 -04:00
bennydiamond 7ffd0c25c2 Support for PCB-SWTG115AS-V2.0
Marketed as Lianguo ZX-SWTGW215AS
2026-03-27 19:34:39 -04:00
René van Dorst 8b4e09ad69 Merge pull request #181 from janh/improve-1g-sfp-compat
Improve compatibility with 1G SFP modules
2026-03-27 22:58:30 +00:00
René van Dorst 34d53dddf2 Merge pull request #179 from bennydiamond/Early_boot_wipe_config
Wipe config if button held at boot
2026-03-27 20:05:55 +00:00
René van Dorst ec5f655bba Merge pull request #180 from janh/k0501w-rename-version
Rename K0501W to include PCB version
2026-03-27 19:52:29 +00:00
René van Dorst 7291f38e46 Merge pull request #182 from janh/commands-newline
Make sure that the output of all commands ends with a newline
2026-03-27 19:05:29 +00:00
Jan Hoffmann c3b99fdcdf Make sure that the output of all commands ends with a newline 2026-03-27 19:36:14 +01:00
Jan Hoffmann 9f800bae01 Improve compatibility with 1G SFP modules
Some modules report a nominal signaling rate of 1200 MBd.
2026-03-27 17:56:40 +01:00
logicog df498b0879 Merge pull request #173 from diijkstra/vlan_console
Console: Add Ingress type & VLAN show table
2026-03-26 21:02:33 +01:00
Jan Hoffmann 03422463e4 Rename K0501W to include PCB version
It seems very likely that other versions are not compatible, so make it
clear by including it in the machine type and name. Also update the
documentation.
2026-03-26 19:59:06 +01:00
bennydiamond 2bfbe5358b LED pattern definition on early boot reset
LED Double blink while button is held

FAST blink for 3 seconds when config is reset
2026-03-26 12:31:20 -04:00
TylerDurden-23 3bb89bfb80 Merge pull request #177 from janh/k0501w
Add support for K0501W boards
2026-03-26 10:12:32 +01:00
bennydiamond dba3679e2f Wipe config if button held at boot
Blocking by design to prevent loading config

Button must be held between 10 and 30 seconds to trigger reset.

If held more than 30 seconds, boot normally. This is to prevent lock-up in case of weird hardware variants.
2026-03-25 23:15:04 -04:00
Jan Hoffmann f331a6129a Add support for K0501W boards
This board appears for example in the Davuaz Da-K6501W switch, and is
designed similarly to Hi-K0402WS.

However, it only has one SFP port and another 2.5G copper port using
RTL8221B 2.5G PHY instead. Also, some components on the board, like
additional LEDs, mode switch, and second flash chip are not populated.

Like earlier revisions of the K0402W(S) board, there is no UART, so
debugging is limited.

As this is an unmanaged switch, installation needs a flash programmer.
2026-03-25 19:31:14 +01:00
logicog 877e5a68fb Merge pull request #176 from janh/improve-2500m-sfp-compat
Improve compatibility with 2.5G SFP modules
2026-03-24 18:13:27 +01:00
Jan Hoffmann ed6c95e522 Improve compatibility with 2.5G SFP modules
Some modules might report a nominal bitrate of 2500 Mbd or 3200 Mbd
instead of 3100 Mbd. Accept the entire range to make them work.
2026-03-24 15:26:29 +01:00
diijkstra cb8d0e45bb Review: Move w initialization 2026-03-23 19:31:06 +01:00
TylerDurden-23 877b16e837 Merge pull request #174 from logicog/fix_vlan_display
Fix display of VLANs for ports
2026-03-22 18:20:33 +01:00
logicog fce64ac368 Fix display of VLANs for ports 2026-03-22 13:45:42 +01:00
logicog dd9e5c8ff8 Merge pull request #172 from diijkstra/trendnet
Document firmware upload via CLI
2026-03-22 05:26:45 +01:00
diijkstra f7fcf0eda7 Console: Add Ingress type & VLAN show table
Added new `vlan show` command to dump current VLAN settings.
Supports printing PVID & ingress filtering per port.

Added new `ingress [p]<mode>` command to setup ingress filtering.
Added wrappers for enabling/disabling vlan filtering. Currently
not configurable, but state in console is read via ASIC registers.

Full VLAN dump & web support of new commands will be added later.
2026-03-21 12:29:26 +01:00
diijkstra 905cf38f1f Trendnet: Another mapping fix
Physical to logical mapping was reverted for SFP ports.
2026-03-21 12:22:36 +01:00
diijkstra b0370f7bb3 Doc: Describe how to upload firmware via CLI & HTTP
Rough explanation how to upload a new firmware. Probably, we should
support basic auth on upload for easier use, but lets document
what we have.
2026-03-21 12:22:36 +01:00
logicog d21d269d49 Merge pull request #152 from mmmspatz/mspatz/fix_vlan_page
Fix "Get Configuration" on vlan.html
2026-03-19 11:36:59 +01:00
feelfree69 cb81f82cf6 Merge pull request #170 from logicog/fix_bank0
Fix missing assignment of bank when html_data.c code is generated
2026-03-19 11:23:07 +01:00
logicog 59e7a21955 Merge pull request #159 from diijkstra/web_sfp_state
Web: Add SFP state/pin status
2026-03-19 05:22:24 +01:00
logicog c530ec4ae3 Fix missing assignment of bank when html_data.c code is generated 2026-03-18 08:34:26 +01:00
TylerDurden-23 8e2b48ef25 Merge pull request #167 from logicog/browsser_trouble
Fix browser issues with Chrome and latest Firefox
2026-03-17 10:29:02 +01:00
logicog 65f094c1d1 Merge pull request #163 from feelfree69/parser_fix
fix crash
2026-03-16 17:51:24 +01:00
logicog 090283d538 Add retry mechanism for xhttp requests to make Chrome happy 2026-03-16 17:32:50 +01:00
logicog 7e3a0f5d8f Allow javascript to modify svg styles for Firefox version >140 2026-03-16 17:32:15 +01:00
feelfree69 4706f6232a simplify parsing code 2026-03-15 15:43:34 +01:00
diijkstra b47a868db3 Web: Handle missing LOS pin
When device has no LOS pin and module has no extended status, the
RX LOS value will not be shown. When both are present, the equality
check is performed. When only one is present, the present value
will be shown.

json from the switch, will still contain the field, but can be
null for when pin is not available.
2026-03-15 12:18:02 +01:00
feelfree69 454eb28bce Merge branch 'logicog:main' into parser_fix 2026-03-15 08:58:15 +01:00
logicog dc283bc724 Merge pull request #165 from feelfree69/bank0_overflow
Fail building image on BANK0 overflow
2026-03-15 07:39:38 +01:00
feelfree69 a001cd3da7 Fail also on BANK0 overflow 2026-03-14 22:15:33 +01:00
feelfree69 e92b4a2358 Don't allow partial commands 2026-03-14 19:47:56 +01:00
René van Dorst 47c5443f0e Merge pull request #164 from TylerDurden-23/fix-1gbaset-sfp
Fix 1GBase-T SFP module not working on serdes port 1.
2026-03-14 17:03:05 +00:00
chriz baa3e7edb7 Fix 1GBase-T SFP module not working on serdes port 1. 2026-03-14 16:33:54 +01:00
feelfree69 34d46aa29a fix crash 2026-03-14 13:59:14 +01:00
diijkstra 6b64534f40 WEB: Display single RX LOS
As sugested, lets display single value, and raise alarm when pin
is different than module.
2026-03-14 13:15:01 +01:00
logicog b18ed62042 Merge pull request #161 from diijkstra/backspace
Console: Handle ^H as backspace
2026-03-14 13:14:39 +01:00
diijkstra 16edc6b421 Console: Handle ^H as backspace
Currently only ASCII DEL (key code 127) is handled as backspace, but some terminal
emulators are sending ^H which is ASCII BS (key code 8). Looks like we can
safely treat both in the same matter.
2026-03-14 12:35:16 +01:00
logicog f1e5b7e31a Merge pull request #92 from vDorst/doc_gpio
doc: gpio overview and mux settings
2026-03-14 12:17:06 +01:00
diijkstra 1f6e07a1af Web: Add SFP state/pin status
The state of the SFP module is being already send in status.json,
but was not parsed via Web UI. When debuging SFP LOS/Signal detection
it is usefull to see what module is reporting back.

Extended the SFP mouse-over information with:
 - RX LOS as reported in 0x02 bit of register 238
 - External TX Disabled from 0x80 bit of register 238
 - TX fault from 0x04 of the same register
 - The last state of RX LOS pin (available also when there is no 0x40
   option on the module)

This should help identify missing/incorrect setup of TX disabled pin.
2026-03-13 23:56:43 +01:00
logicog 0952676504 Merge pull request #158 from diijkstra/trendnet
TEG-S562: Port LEDs
2026-03-13 23:46:22 +01:00