Skip to content

Add documentation #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 23, 2025
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/render-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Render Documentation

on:
push:
branches:
- main
paths:
- ".github/workflows/render-documentation.ya?ml"
- "examples/**"
- "src/**"
- "!src/lib/**"
- "!src/microchip/**"
pull_request:
branches:
- main
paths:
- ".github/workflows/render-documentation.ya?ml"
- "examples/**"
- "src/**"
- "!src/lib/**"
- "!src/microchip/**"
workflow_dispatch:

jobs:
render-docs:
permissions:
contents: write
uses: arduino/render-docs-github-action/.github/workflows/render-docs.yml@main
with:
source-path: './src'
target-path: './docs/api.md'
fail-on-warnings: false
exclude-pattern: '*/lib/* */microchip/*'
101 changes: 41 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,47 @@
`Arduino_10BASE_T1S`
Arduino Single Pair Ethernet (10BASE-T1S) Library
====================
[![Compile Examples](https://github.com/bcmi-labs/Arduino_10BASE_T1S/workflows/Compile%20Examples/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions?workflow=Compile+Examples)
[![Spell Check status](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/spell-check-task.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/spell-check-task.yml)
[![Sync Labels status](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions/workflows/sync-labels.yml)
[![Arduino Lint](https://github.com/bcmi-labs/Arduino_10BASE_T1S/workflows/Arduino%20Lint/badge.svg)](https://github.com/bcmi-labs/Arduino_10BASE_T1S/actions?workflow=Arduino+Lint)

**Note**: This library works for Arduino [Zero](https://store.arduino.cc/products/arduino-zero), Arduino [R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi) and Arduino [R4 Minima](https://store.arduino.cc/products/uno-r4-minima).

### How-to-compile/upload
```bash
arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0
```

### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A)
**Note**: Keep [this application note](https://microchip.my.site.com/s/article/EVB-LAN8670-USB-Enablement-for-Debian-Ubuntu-Raspbian) in mind when building for Debian based systems. You may need to revert back to legacy network configuration tools.

* Disconnect `EVB-LAN8670-USB`, if it is already connected.
* Build kernel driver:
```bash
cd extras/evb-lan8670-usb-linux-6.1.21
make
```
* Load kernel driver:
```bash
sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32
```
* `dmesg` output when connecting the USB dongle:
```bash
[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00
[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000006] usb 1-2.3: Product: 10BASE-T1S
[ +0,000005] usb 1-2.3: Manufacturer: MCHP
[ +0,000005] usb 1-2.3: SerialNumber: 0000465
[ +0,004338] smsc95xx v2.0.0
[ +0,582091] LAN867X Rev.B1 usb-001:025:00: PLCA mode enabled. Node Id: 0, Node Count: 8, Max BC: 0, Burst Timer: 128, TO Timer: 32
[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190)
[ +0,000285] smsc95xx 1-2.3:1.0 eth2: register 'smsc95xx' at usb-0000:00:14.0-2.3, smsc95xx USB 2.0 Ethernet, 00:1e:c0:d1:b9:4b
```
* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output).
```bash
sudo ip addr add dev eth1 192.168.42.100/24
```
* You can take a look at the registered Ethernet device via `ip link show eth1`:
```bash
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff
inet 192.168.42.100/24 scope global eth1
valid_lft forever preferred_lft forever
```
* Bring `eth1` interface up via `sudo ifconfig eth1 up`.
* Verify `eth1` via `ifconfig eth1`:
```bash
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0
ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

### How-to-`tcpdump`
```bash
tcpdump -i eth1
```
This library implements the **10BASE-T1S** standard (Single Pair Ethernet) for selected Arduino boards.

It enables low-speed Ethernet connectivity over a single twisted pair, ideal for industrial and automotive applications.

### What is 10BASE-T1S?
10BASE‑T1S is an Ethernet physical layer standard defined by IEEE (part of IEEE 802.3cg) that enables Ethernet communication over a single twisted pair cable at speeds up to 10 Mbps.

## 📖 Documentation
For more information on the features of this library and how to use them please read the documentation [here](./docs/).

## ✅ Supported Boards

This library was tested and validated on the following Arduino boards:
- [Arduino Zero](https://store.arduino.cc/products/arduino-zero)
- [Arduino UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi)
- [Arduino UNO R4 Minima](https://store.arduino.cc/products/uno-r4-minima)

> [!IMPORTANT]
> These boards do not include a native 10BASE‑T1S PHY or transceiver.
To enable Single Pair Ethernet communication, you must connect an external and compatible 10BASE‑T1S transceiver to your board via SPI.

> [!NOTE]
> The library may work on other boards, but they are not officially supported.

## 📕 Further Reading
- [Arduino UNO SPE Shield](https://docs.arduino.cc/hardware/spe-shield/)

## 🐛 Reporting Issues

If you encounter any issue, please open a bug report [here](https://github.com/arduino-libraries/Arduino_10BASE_T1S/issues).

For questions, comments, or feedback on this library, please use the official [Arduino Forum](https://forum.arduino.cc/).

## 🫂 Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## ⚖️ License

This library is released under the [MPL-2.0 license](http://mozilla.org/MPL/2.0/).
60 changes: 60 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
📖 Arduino Single Pair Ethernet Library - Documentation
====================

### How-to-compile/upload
```bash
arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0
```

### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A)
**Note**: Keep [this application note](https://microchip.my.site.com/s/article/EVB-LAN8670-USB-Enablement-for-Debian-Ubuntu-Raspbian) in mind when building for Debian based systems. You may need to revert back to legacy network configuration tools.

* Disconnect `EVB-LAN8670-USB`, if it is already connected.
* Build kernel driver:
```bash
cd extras/evb-lan8670-usb-linux-6.1.21
make
```
* Load kernel driver:
```bash
sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32
```
* `dmesg` output when connecting the USB dongle:
```bash
[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00
[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0,000006] usb 1-2.3: Product: 10BASE-T1S
[ +0,000005] usb 1-2.3: Manufacturer: MCHP
[ +0,000005] usb 1-2.3: SerialNumber: 0000465
[ +0,004338] smsc95xx v2.0.0
[ +0,582091] LAN867X Rev.B1 usb-001:025:00: PLCA mode enabled. Node Id: 0, Node Count: 8, Max BC: 0, Burst Timer: 128, TO Timer: 32
[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190)
[ +0,000285] smsc95xx 1-2.3:1.0 eth2: register 'smsc95xx' at usb-0000:00:14.0-2.3, smsc95xx USB 2.0 Ethernet, 00:1e:c0:d1:b9:4b
```
* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output).
```bash
sudo ip addr add dev eth1 192.168.42.100/24
```
* You can take a look at the registered Ethernet device via `ip link show eth1`:
```bash
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff
inet 192.168.42.100/24 scope global eth1
valid_lft forever preferred_lft forever
```
* Bring `eth1` interface up via `sudo ifconfig eth1 up`.
* Verify `eth1` via `ifconfig eth1`:
```bash
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0
ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
```

### How-to-`tcpdump`
```bash
tcpdump -i eth1
```
Loading
Loading