Skip to content

Commit 6e69627

Browse files
leonardocavagnisper1234sebromerogithub-actions[bot]
authored
Add documentation (#30)
* add docs/README.md * add keywords.txt * add render-documentation workflow * test render-doc workflow on current branch * render-doc: test ignore folders * Update keywords.txt - fix delimeter Co-authored-by: Per Tillisch <[email protected]> * Add exclude pattern * Update README.md * update doc for class UDP * Update documentation * restore main branch in render-doc workflow --------- Co-authored-by: Per Tillisch <[email protected]> Co-authored-by: Sebastian Romero <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 759cc47 commit 6e69627

File tree

8 files changed

+1088
-64
lines changed

8 files changed

+1088
-64
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Render Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- ".github/workflows/render-documentation.ya?ml"
9+
- "examples/**"
10+
- "src/**"
11+
- "!src/lib/**"
12+
- "!src/microchip/**"
13+
pull_request:
14+
branches:
15+
- main
16+
paths:
17+
- ".github/workflows/render-documentation.ya?ml"
18+
- "examples/**"
19+
- "src/**"
20+
- "!src/lib/**"
21+
- "!src/microchip/**"
22+
workflow_dispatch:
23+
24+
jobs:
25+
render-docs:
26+
permissions:
27+
contents: write
28+
uses: arduino/render-docs-github-action/.github/workflows/render-docs.yml@main
29+
with:
30+
source-path: './src'
31+
target-path: './docs/api.md'
32+
fail-on-warnings: false
33+
exclude-pattern: '*/lib/* */microchip/*'

README.md

Lines changed: 41 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,47 @@
1-
`Arduino_10BASE_T1S`
1+
Arduino Single Pair Ethernet (10BASE-T1S) Library
22
====================
33
[![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)
44
[![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)
55
[![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)
66
[![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)
77

8-
**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).
9-
10-
### How-to-compile/upload
11-
```bash
12-
arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0
13-
```
14-
15-
### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A)
16-
**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.
17-
18-
* Disconnect `EVB-LAN8670-USB`, if it is already connected.
19-
* Build kernel driver:
20-
```bash
21-
cd extras/evb-lan8670-usb-linux-6.1.21
22-
make
23-
```
24-
* Load kernel driver:
25-
```bash
26-
sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32
27-
```
28-
* `dmesg` output when connecting the USB dongle:
29-
```bash
30-
[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00
31-
[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
32-
[ +0,000006] usb 1-2.3: Product: 10BASE-T1S
33-
[ +0,000005] usb 1-2.3: Manufacturer: MCHP
34-
[ +0,000005] usb 1-2.3: SerialNumber: 0000465
35-
[ +0,004338] smsc95xx v2.0.0
36-
[ +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
37-
[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190)
38-
[ +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
39-
```
40-
* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output).
41-
```bash
42-
sudo ip addr add dev eth1 192.168.42.100/24
43-
```
44-
* You can take a look at the registered Ethernet device via `ip link show eth1`:
45-
```bash
46-
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
47-
link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff
48-
inet 192.168.42.100/24 scope global eth1
49-
valid_lft forever preferred_lft forever
50-
```
51-
* Bring `eth1` interface up via `sudo ifconfig eth1 up`.
52-
* Verify `eth1` via `ifconfig eth1`:
53-
```bash
54-
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
55-
inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0
56-
ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet)
57-
RX packets 0 bytes 0 (0.0 B)
58-
RX errors 0 dropped 0 overruns 0 frame 0
59-
TX packets 0 bytes 0 (0.0 B)
60-
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
61-
```
62-
63-
### How-to-`tcpdump`
64-
```bash
65-
tcpdump -i eth1
66-
```
8+
This library implements the **10BASE-T1S** standard (Single Pair Ethernet) for selected Arduino boards.
9+
10+
It enables low-speed Ethernet connectivity over a single twisted pair, ideal for industrial and automotive applications.
11+
12+
### What is 10BASE-T1S?
13+
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.
14+
15+
## 📖 Documentation
16+
For more information on the features of this library and how to use them please read the documentation [here](./docs/).
17+
18+
## ✅ Supported Boards
19+
20+
This library was tested and validated on the following Arduino boards:
21+
- [Arduino Zero](https://store.arduino.cc/products/arduino-zero)
22+
- [Arduino UNO R4 WiFi](https://store.arduino.cc/products/uno-r4-wifi)
23+
- [Arduino UNO R4 Minima](https://store.arduino.cc/products/uno-r4-minima)
24+
25+
> [!IMPORTANT]
26+
> These boards do not include a native 10BASE‑T1S PHY or transceiver.
27+
To enable Single Pair Ethernet communication, you must connect an external and compatible 10BASE‑T1S transceiver to your board via SPI.
28+
29+
> [!NOTE]
30+
> The library may work on other boards, but they are not officially supported.
31+
32+
## 📕 Further Reading
33+
- [Arduino UNO SPE Shield](https://docs.arduino.cc/hardware/spe-shield/)
34+
35+
## 🐛 Reporting Issues
36+
37+
If you encounter any issue, please open a bug report [here](https://github.com/arduino-libraries/Arduino_10BASE_T1S/issues).
38+
39+
For questions, comments, or feedback on this library, please use the official [Arduino Forum](https://forum.arduino.cc/).
40+
41+
## 🫂 Contributing
42+
43+
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
44+
45+
## ⚖️ License
46+
47+
This library is released under the [MPL-2.0 license](http://mozilla.org/MPL/2.0/).

docs/README.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
📖 Arduino Single Pair Ethernet Library - Documentation
2+
====================
3+
4+
### How-to-compile/upload
5+
```bash
6+
arduino-cli compile -b arduino:renesas_uno:unor4wifi -v examples/UDP_Client -u -p /dev/ttyACM0
7+
```
8+
9+
### How-to-[`EVB-LAN8670-USB`](https://www.microchip.com/en-us/development-tool/EV08L38A)
10+
**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.
11+
12+
* Disconnect `EVB-LAN8670-USB`, if it is already connected.
13+
* Build kernel driver:
14+
```bash
15+
cd extras/evb-lan8670-usb-linux-6.1.21
16+
make
17+
```
18+
* Load kernel driver:
19+
```bash
20+
sudo insmod microchip_t1s.ko enable=1 node_id=0 node_count=8 max_bc=0 burst_timer=128 to_timer=32
21+
```
22+
* `dmesg` output when connecting the USB dongle:
23+
```bash
24+
[ +0,124736] usb 1-2.3: New USB device found, idVendor=184f, idProduct=0051, bcdDevice= 2.00
25+
[ +0,000016] usb 1-2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
26+
[ +0,000006] usb 1-2.3: Product: 10BASE-T1S
27+
[ +0,000005] usb 1-2.3: Manufacturer: MCHP
28+
[ +0,000005] usb 1-2.3: SerialNumber: 0000465
29+
[ +0,004338] smsc95xx v2.0.0
30+
[ +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
31+
[ +0,000176] LAN867X Rev.B1 usb-001:025:00: attached PHY driver (mii_bus:phy_addr=usb-001:025:00, irq=190)
32+
[ +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
33+
```
34+
* Configure IP address for `eth1`: (*Note*: it could also be another `eth` interface, you need to check and compare MAC address against `dmesg` output).
35+
```bash
36+
sudo ip addr add dev eth1 192.168.42.100/24
37+
```
38+
* You can take a look at the registered Ethernet device via `ip link show eth1`:
39+
```bash
40+
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
41+
link/ether 3c:e1:a1:b8:e9:76 brd ff:ff:ff:ff:ff:ff
42+
inet 192.168.42.100/24 scope global eth1
43+
valid_lft forever preferred_lft forever
44+
```
45+
* Bring `eth1` interface up via `sudo ifconfig eth1 up`.
46+
* Verify `eth1` via `ifconfig eth1`:
47+
```bash
48+
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
49+
inet 192.168.42.100 netmask 255.255.255.0 broadcast 0.0.0.0
50+
ether 3c:e1:a1:b8:e9:76 txqueuelen 1000 (Ethernet)
51+
RX packets 0 bytes 0 (0.0 B)
52+
RX errors 0 dropped 0 overruns 0 frame 0
53+
TX packets 0 bytes 0 (0.0 B)
54+
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
55+
```
56+
57+
### How-to-`tcpdump`
58+
```bash
59+
tcpdump -i eth1
60+
```

0 commit comments

Comments
 (0)