Home Learning Paths ECU Lab Assessments Interview Preparation Pricing Log In Sign Up
Log In Sign Up
Communication

Automotive Ethernet

Master automotive Ethernet from physical layer (100BASE-T1, 1000BASE-T1) to application protocols (SOME/IP, DoIP, AVB/TSN). Learn switch configuration, VLAN design, and time-sensitive networking.

28 chapters
20.0 hrs reading
6 modules

Overview

Automotive Ethernet is rapidly replacing legacy buses for high-bandwidth ECU communication. From ADAS cameras to zone controllers, Ethernet provides the bandwidth needed for next-generation vehicle architectures.

This course covers the complete Ethernet stack for automotive: physical layers (100BASE-T1, 1000BASE-T1), switching and routing, VLAN configuration, Time-Sensitive Networking (TSN), and key application protocols like SOME/IP and DoIP.

With hands-on labs using real Ethernet switches and Wireshark analysis, you'll gain the practical skills to design and debug automotive Ethernet networks.

Course Modules

1
Automotive Ethernet Fundamentals
5 chapters • 3.5 hrs reading
Why Automotive Ethernet? - Bandwidth EvolutionFREE PREVIEW 35 min read
▸ Bandwidth demand explosion: CAN FD = 8 Mbit/s maximum (theoretical), practical CAN 500 kbit/s; LiDAR 64-beam = 700 Mbit/s raw point cloud; 4K surround-view cameras × 4 = 4 Gbit/s total; radar = 50 Mbit/s per unit; ADAS domain controller processing 10+ sensor streams requires centralized aggregation; CAN/LIN/FlexRay (max 10 Mbit/s) fundamentally incapable of carrying camera/LiDAR data; BMW 7-series 2023: 4 Ethernet domains, 16 Ethernet nodes, total in-vehicle bandwidth >40 Gbit/s; AUTOSAR Adaptive Platform requires Ethernet as mandatory transport
▸ Automotive Ethernet adoption timeline: 2013 BMW F01 - first production Ethernet for MOST replacement (100BASE-TX, standard IT); 2016 BMW 7-series G11 - 100BASE-T1 (single-pair) for camera; 2019 Audi A8 - 1000BASE-T1 backbone; 2021+ - multi-gig 2.5G/5G/10G for central compute; IEEE 100BASE-T1 (802.3bw, 2015) and 1000BASE-T1 (802.3bp, 2016) defined specifically for automotive; OPEN Alliance consortium drives silicon interoperability; key enabler: EMI reduction - single twisted pair vs 8-wire IT Ethernet; cable weight reduction: 1000BASE-T1 UTP = 14g/m vs 8-wire CAT6 = 40g/m
▸ Architectural shift from domain to zonal: traditional domain architecture: chassis/powertrain/ADAS/body domains, each with CAN bus; zonal architecture (2023+ BMW, Mercedes, Volkswagen): zone controllers (one per car corner - front-left, front-right, rear-left, rear-right) connected via Ethernet backbone to Central Computing Unit (CCU/HPC); zone controller aggregates local sensors/actuators via CAN/LIN, forwards over Ethernet; Central Computer runs AUTOSAR Adaptive + hypervisor (QNX + Linux); reduced ECU count from 70+ to <20 high-performance ECUs; AUTOSAR AP runs on CCU, AUTOSAR CP runs in zone controllers
▸ Standards ecosystem: IEEE 802.3 - base Ethernet; IEEE 802.1Q - VLANs; IEEE 802.1AS (gPTP) - time synchronization; IEEE 802.1Qbv/Qav/Qbu - TSN; AUTOSAR ETHIF (Ethernet Interface), SOAD (Socket Adapter), TCPIP stack, ETHSM (Ethernet State Manager); OPEN Alliance TC10 - link sleep/wake; IEC 61162 (not automotive but referenced for ship/aero); ISO 13400 - DoIP; AUTOSAR specification document: AUTOSAR_SWS_EthernetInterface.pdf; testing: ISO 21111 electromagnetic compatibility, OPEN Alliance SpecTester for PHY compliance; primary automotive PHY suppliers: NXP TJA110x, Texas Instruments DP83TC811, Marvell 88Q1010
100BASE-T1 & 1000BASE-T1 Physical LayerFREE PREVIEW 45 min read
▸ PHY modulation specs: 100BASE-T1 (IEEE 802.3bw) - single unshielded twisted pair (UTP), PAM3 at 66.67 Mbaud for 100 Mbit/s full-duplex via echo cancellation; 1000BASE-T1 (IEEE 802.3bp) - PAM3 at 750 Mbaud for 1 Gbit/s; Master/Slave role negotiated via MDIO register 0.13 (Master mode bit); 100BASE-T1 cable max 40 m UTP, 1000BASE-T1 max 15 m (STP recommended in high-EMI zones); connectors: HSD, FAKRA, Rosenberger HSD2, H-MTD; cable weight: 1000BASE-T1 UTP = 14 g/m vs IT CAT6 = 40 g/m
▸ NXP TJA1100 (100BASE-T1) / TJA1101 (1000BASE-T1) MDIO register map: REG_BASIC_CTRL (0x00) - SW reset bit15, loopback bit14, AN enable bit12; REG_BASIC_STATUS (0x01) - link status bit2 (latching low); REG_EXT_STATUS (0x0F); REG_MODE_CTRL (0x17) - autonomous vs managed mode; MDIO interface: MDC max 25 MHz, 32-bit preamble + ST=01 + OP=10(read)/01(write) + PHYAD[4:0] + REGAD[4:0]; TJA1101 1000BASE-T1 uses Clause 45 MMD for extended register access; AUTOSAR EthTrcv_WriteMii(CtrlIdx, TrcvIdx, RegIdx, RegVal) / EthTrcv_ReadMii()
▸ TC10 sleep/wake (OPEN Alliance TC10 spec): link sleep triggered by TC10_SLEEP bit in wake control register; PHY enters low-power mode <1 mA; WUP (Wake-Up Pulse) = 600 μs–1.5 ms differential pulse on the pair; INH pin deasserted; TJA1100 TC10 via WAKE_REQUEST register; MCU GPIO → PHY WUP pin → TC10 wake sequence; eliminates separate LIN-based sleep/wake wire; AUTOSAR EthTrcv_GetWakeupReason() returns ETHTRCV_WU_BY_BUS; EcuM_CheckWakeup(EthTrcvWakeupSourceId) processes wakeup event
▸ AUTOSAR ETH Driver (MCAL EthDrv) integration: EthDrv_Init() configures MAC controller; EthCtrlConfig.EthCtrlPhyAddress (0x00–0x1F), EthCtrlConfig.EthCtrlPhyType = ETH_PHY_T1_100M / ETH_PHY_T1_1G; EthIf sits above EthDrv, below TCPIP; EMC compliance: CISPR 25 Class 5 radiated; AUTOSAR EthDrv_SetPhyAddress(); AEC-Q100 Grade 0 qualification (−40°C to +150°C HTOL); PHY DSP echo canceller requires stable power supply (VDDA ripple <50 mV); STP cable reduces common-mode noise by 20 dB vs UTP at 750 Mbaud
Ethernet Frame Structure (IEEE 802.3) 40 min read
▸ IEEE 802.3 frame anatomy: Preamble (7B: 0xAA×7) + SFD (1B: 0xAB) for sync; Destination MAC (6B) + Source MAC (6B); EtherType (2B): >0x0600 = type field (0x0800=IPv4, 0x0806=ARP, 0x8100=802.1Q VLAN, 0x88F7=PTP/gPTP, 0x22F0=AVTP, 0x8892=PROFINET); Payload (46–1500 bytes, pad to 46 if shorter); FCS (4B CRC-32); minimum frame = 64 bytes, maximum = 1518 bytes (1522 with 802.1Q tag); interpacket gap = 12 bytes (96 bit-times at link speed)
▸ 802.1Q VLAN tag (4B inserted after Source MAC): TPID=0x8100 (2B) + TCI = PCP[2:0] (Priority Code Point: 0=Best Effort, 4=Video, 5=Critical, 6=Voice, 7=Network Control) + DEI[0] (Drop Eligible) + VID[11:0] (VLAN ID 0–4094); Q-in-Q double tag: outer TPID=0x88A8 + inner TPID=0x8100; automotive VLAN: VLAN 1=safety-critical, VLAN 2=ADAS cameras, VLAN 10=infotainment, VLAN 20=DoIP/OBD, VLAN 100=management (gPTP/NM)
▸ AVTP (IEEE 1722) framing: EtherType=0x22F0; common header: subtype (1B: 0x00=IEC 61883, 0x02=AAF Audio, 0x03=CVF Video, 0x6F=RTP), sequence_num (1B), timestamp (4B 32-bit ns in gPTP domain 0); Stream ID (8B EUI-64); CAN-over-AVTP (subtype 0x03) encapsulates raw CAN frames for bridging; AVTP multicast MAC: 91:E0:F0:00:FE:XX; Wireshark filter: avtp; check avtp.sequence_num incrementing without gaps; avtp.timestamp_valid bit must equal 1
▸ MTU and automotive considerations: standard MTU=1500 bytes; NXP SJA1105 supports max 2048-byte frames; IP fragmentation disabled in AUTOSAR CP (non-deterministic); AUTOSAR SoAd PDU length bounded by MTU; SOME/IP UDP payload limit = 1472 bytes (1500 − 20 IP − 8 UDP); SOME/IP-TP used for payloads >1472 bytes; tshark CLI: tshark -i eth0 -f "vlan 1" -w capture.pcap; Wireshark filter: vlan.id==20 and vlan.priority==5; frame FCS errors indicate cable signal integrity issues
Automotive Ethernet vs IT Ethernet 35 min read
▸ Physical layer differences: IT 1000BASE-T = 4-pair CAT5e/CAT6, PAM5 at 125 Mbaud × 4 pairs = 1 Gbit/s; 1000BASE-T1 = 1 pair, PAM3 at 750 Mbaud = 1 Gbit/s via echo cancellation DSP; automotive temperature: AEC-Q100 Grade 0 (−40°C to +150°C) vs commercial 0°C–70°C; cable: 1000BASE-T1 UTP = 14 g/m vs IT CAT6 = 40 g/m; automotive connector: HSD/FAKRA/H-MTD vs IT RJ45; vibration: IEC 60068-2-6 (10–2000 Hz, 20 g); automotive cable FLRY-B rated −40°C to +105°C with UV/chemical resistance
▸ EMC and qualification: automotive EMC: CISPR 25 Class 5 (radiated), ISO 11452, ISO 7637-2 (transients); IT: FCC Part 15B / ETSI EN 55032; automotive PHY AEC-Q100 reliability: HTOL, HAST, TC, ESD HBM 2 kV (AECQ 100-002); IT Ethernet 10GBASE-T power ≈ 1–3 W/port; automotive 100BASE-T1 PHY ≈ 200 mW; automotive cable sheath: FLRY-B vs IT PVC CAT6; automotive EMI requirement: unshielded acceptable for 100BASE-T1, STP recommended for 1000BASE-T1 near ignition system
▸ Network management: IT = IEEE 802.3az EEE, LLDP/CDP, SNMP MIB; automotive = AUTOSAR NM (EthNm), OPEN Alliance TC10 sleep/wake, no LLDP/SNMP; automotive sleep current budget: full network <1 mA; AUTOSAR EthSM states: UNINIT→INIT→WAIT_TRCVLINK→ONLINE→ONHOLD→OFFLINE; EthSM_RequestComMode() triggers transitions; NM wakeup reason logged via EthTrcv_GetWakeupReason(); IT SNMP vs automotive DEM/DET diagnostic reporting
▸ Latency and determinism: IT Ethernet = best-effort, no latency guarantee; store-and-forward switch latency 1–10 μs/hop; automotive TSN: IEEE 802.1Qbv (TAS) guarantees <10 μs worst-case for scheduled traffic; IEEE 802.1AS gPTP: ±100 ns synchronization; CAN FD 1 Mbit/s = 1 ms typical at 50% bus load; ADAS camera→HPC over 2 TSN hops = <1 ms total; IT cloud RTT = 10–100 ms; automotive requires determinism - TSN replaces best-effort IT Ethernet with real-time scheduled Ethernet
Hands-On: Ethernet Traffic Capture 50 min read
▸ Hardware setup: TAP adapter or switch mirror port connected to PC running Wireshark; Vector VN5610A or PEAK PCAN-Ethernet Gateway for automotive Ethernet capture; tshark batch capture: tshark -i eth0 -f "not arp" -w automotive_capture.pcap -b duration:60 (rotate every 60 s); Wireshark capture filter for large frames: frame.len > 500; promiscuous mode required: ip link set eth0 promisc on; ring buffer mode for long captures: -b filesize:100000 (100 MB files)
▸ Wireshark AVTP and gPTP analysis: enable AVTP dissector via Edit→Preferences→Protocols→AVTP; filter: avtp; check stream_id (8B EUI-64), sequence_num continuity, timestamp_valid=1; IO Graph for bandwidth: Statistics→IO Graph, Y=Bits/s, filter=avtp; gPTP frames: filter=ptp; message types: Sync (0x00) / Follow_Up (0x08) / Pdelay_Req (0x02) / Pdelay_Resp (0x03) / Announce (0x0B); Sync logMessageInterval field = −3 (125 ms); correctionField accumulates per-hop delay; verify GM clockIdentity consistent across all Sync messages
▸ SOME/IP traffic analysis: EtherType=0x0800, UDP/TCP, SD multicast port=30490; Wireshark: filter=someip; decode as: right-click UDP→Decode As→SOME/IP; message type byte: 0x00=REQUEST, 0x80=RESPONSE, 0x01=REQUEST_NO_RETURN, 0x02=NOTIFICATION, 0xFF=ERROR; header fields: someip.service_id, someip.method_id, someip.length, someip.client_id, someip.session_id, someip.message_type, someip.return_code; SOME/IP-SD filter: someipsd; check offer TTL > 0 and SubscribeAck entries
▸ DoIP traffic capture: TCP/UDP port 13400; Wireshark filter: tcp.port==13400 or udp.port==13400; payload types: 0x0001=Vehicle Announcement, 0x0005=Routing Activation Request, 0x0006=Routing Activation Response (code 0x15=success), 0x8001=Diagnostic Message (contains raw UDS bytes), 0x8002=Diagnostic Positive Ack, 0x8003=Negative Ack; python-doip: from doipclient import DoIPClient; DoIPClient.get_vehicle_announcement(timeout=5, localInterface='eth0'); client = DoIPClient('192.168.1.10', 13400, source_logical_address=0x0E00, target_logical_address=0x0E01); client.send_doip(0x0E01, bytes([0x10, 0x01]))
2
Switching, VLANs & Network Design
5 chapters • 3.8 hrs reading
Automotive Ethernet Switches 45 min read
▸ NXP SJA1105 5-port automotive switch: SPI-configured (no management plane at runtime), 4× 100BASE-T1 + 1× 1000BASE-T1 or 100BASE-TX; store-and-forward mode: 8–20 μs latency per hop; SJA1105P/Q/R/S adds TSN 802.1Qbv; MAC address table (FDB): 1024 unicast entries; static config block loaded via SPI at startup; Marvell 88Q5050 for multi-gigabit central switch; NXP FS26 safety companion for ASIL-D integration; AUTOSAR EthSwt module: Eth_30_sja1105 vendor BSW
▸ FDB (Forwarding Database) operation: unicast = exact 48-bit MAC lookup → output port bitmap; multicast = IGMP snooping for IP groups; AVTP multicast MAC: 91:E0:F0:xx:xx:xx; flooding: unknown unicast → all ports except ingress (SJA1105 PORT_CONTROL.DRAWTAG); aging timer: default 300 s; VLAN-aware lookup: FDB entry keyed by {VLAN_ID + MAC}; SJA1105 L2 Address Lookup Table via SPI; AUTOSAR EthSwt_WriteFdbEntry() / EthSwt_GetFdbInfo(); port mirroring for debug: EthSwt_GetPortMirroringCfg()
▸ QoS priority queuing: IEEE 802.1p PCP bits map to 8 queues per port; PCP 7=Network Control (gPTP/NM), PCP 6=Internetwork, PCP 5=Critical safety, PCP 4=Video cameras, PCP 2=Excellent Effort, PCP 0=Best Effort; SJA1105: Strict Priority (SP) or Weighted Round Robin (WRR) per queue; ingress policing: per-VLAN rate limiting; AUTOSAR EthSwt_SetEgressPortScheduling(); egress shaping parameters: idleSlope, creditBasedShaping per class; SJA1105 queue occupancy readable via SPI STATUS registers
▸ TSN gate control: IEEE 802.1Qbv TAS on SJA1105P - Gate Control List (GCL) with cycle time (e.g., 1 ms = 1,000,000 ns); each entry: [gate_mask[7:0], time_interval_ns]; guard band = (1500×8)/1Gbit/s = 12 μs before critical window; 802.1Qav CBS: idleSlope, sendSlope, hiCredit, loCredit per stream class; AUTOSAR TSN config via ARXML SwitchPortEgressQos; NXP EB Tresos SJA1105P plugin generates SPI init binary; sja1105-tool CLI: sja1105-tool config load switch.xml; sja1105-tool port-status all; sja1105-tool monitor (real-time counters: tx_bytes, rx_bytes, rx_drops)
VLAN Configuration (IEEE 802.1Q) 40 min read
▸ IEEE 802.1Q tag format: TPID=0x8100 (2B) + TCI = PCP[2:0] + DEI + VID[11:0] (1–4094); access port = untagged ingress, tag added on egress; trunk port = tagged all VLANs; SJA1105 VLAN table: VID → forward_mask (which ports receive) + untagged_mask (strip tag on egress); static entry: {vid=1, vlanbc=0b00001, vmemb_port=0b11111}; AUTOSAR EthSwt_VlanIngressFilter() / EthSwt_WriteVlanLookupTable(); ingress filtering rejects frames with unregistered VLAN ID
▸ Automotive VLAN assignment: VLAN 1=Safety (ADAS, Brake-by-Wire) PCP=5, queue 2; VLAN 2=Body/Comfort (lights, HVAC) PCP=2; VLAN 10=Infotainment (Android Auto) PCP=0; VLAN 20=OBD/Diagnostic (DoIP, UDS) PCP=3; VLAN 100=Management (gPTP, NM) PCP=7; trunk links between zone controller and HPC carry all VLANs (tagged); zone controller strips VLAN tag before forwarding to local CAN gateway; VLAN isolation prevents infotainment traffic from reaching safety bus
▸ SJA1105 VLAN config via SPI: static config block order - GENERAL_PARAMS → MAC_CONFIG → L2_LOOKUP_PARAMS → L2_ADDRESS_LOOKUP → VLAN_LOOKUP → L2_FORWARDING → L2_FORWARDING_PARAMS → AVB_PARAMS; VLAN_LOOKUP entry = 8 bytes; fields: VLANBC (broadcast domain), VMEMB_PORT (membership), TAG_PORT (egress tagging); sja1105-tool VLAN XML: <VLAN_LOOKUP_TABLE><entry vid="1" vmemb_port="0b11100" .../></VLAN_LOOKUP_TABLE>; AUTOSAR EthSwt_WriteMgtPortVlan(); EB Tresos SJA1105 plugin generates SPI init sequence
▸ VLAN troubleshooting: Wireshark filter: vlan; specific VID: vlan.id==20; PCP check: vlan.priority==5; double-tagged Q-in-Q: outer TPID=0x88A8 - switch must strip only outer tag; common issues: (1) SJA1105 VLAN entry not programmed → frame flooded or dropped; (2) egress tag not stripped on access port → downstream ECU rejects frame; (3) VLAN mismatch on trunk → traffic silently dropped; SJA1105 per-port VLAN status via SPI STATUS registers; AUTOSAR Det error: EthSwt_ReportError(ETHSWT_MODULE_ID); recommended test: send tagged frame, capture on destination port, verify VID and PCP preserved
IP Addressing & Routing in Vehicles 45 min read
▸ Static IP addressing: RFC 3927 Link-Local (169.254.x.x) via ARP probe+announcement for direct ECU-ECU links; static scheme: zone1=172.16.1.0/24, zone2=172.16.2.0/24, HPC=172.16.100.0/24; AUTOSAR TCPIP: TcpIp_RequestIpAddrAssignment(CtrlIdx, TCPIP_IPADDR_ASSIGNMENT_STATIC, LocalAddr, Netmask, DefaultRouter); NAT avoided (breaks DoIP logical addressing); MTU=1500, IP fragmentation disabled; IPv6 fe80::/10 link-local with SLAAC for AUTOSAR AP; ARP cache aging 300 s; ARP retry: 3 probes × 2 s timeout
▸ AUTOSAR CP TCPIP stack: TcpIp_Init() → SoAd interface; socket API: TcpIp_Bind(SocketId, LocalAddrId, PortPtr), TcpIp_TcpConnect(SocketId, RemoteAddr, RemotePort), TcpIp_TcpReceived(SocketId, Length), TcpIp_UdpTransmit(SocketId, DataPtr, DestAddrPtr, Length); buffer chain: PduR→SoAd→TcpIp→EthIf→EthDrv; TcpIp_AddStaticRoute() for gateway entries; AUTOSAR AP: Posix routing table, ip route add 172.16.1.0/24 dev eth0 via 172.16.100.1; static routes preferred (no RIP/OSPF in automotive)
▸ Zonal routing: zone controller = IP router between local subnet (172.16.x.0/24) and backbone; Linux ip route on HPC; AUTOSAR CP PduR routes between DoIP and CAN TP PDUs; policy-based routing for VLAN-separated traffic: different routing tables per VLAN; ARP for address resolution within subnet; no DHCP (deterministic static IP mandatory); AUTOSAR AP iptables/nftables on zone gateway: iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT; bridge mode vs router mode depending on VLAN topology
▸ IP diagnostic and service addressing: DoIP logical address (16-bit) separate from IP; DoIP entity table: {logical_address=0x0E00, IP=172.16.1.10, port=13400}; SOME/IP endpoint: {service_id=0x1234, IP=172.16.100.5, UDP_port=30490}; DNS avoided (real-time constraint); AUTOSAR SoAd remote address: SoAdSocketRemoteAddress configured statically in ARXML; OBD-II requires DoIP gateway with VIN/EID/GID registration per ISO 13400-2; network scan (bench only): nmap -sU -p 13400 172.16.0.0/16 to discover DoIP entities
Network Topology Design 40 min read
▸ Domain vs zonal architecture: domain = 5 DCUs (powertrain, chassis, body, ADAS, infotainment), each with CAN bus, cross-domain routing via gateway (10–50 ms latency); zonal = 4–6 zone controllers (ZC) per physical zone (front-left/right, rear-left/right), connected to HPC via 1000BASE-T1 star; ZC aggregates local sensors/actuators via CAN/LIN, forwards over Ethernet; central HPC runs AUTOSAR AP + hypervisor; reduces ECU count from 70+ to <20 high-performance nodes; BMW iX (2021), Mercedes EQS (2021) use zonal E/E architecture
▸ Star vs line vs ring topologies: star (switch-based): NXP SJA1105 or Marvell 88Q5050 central switch, spoke links to each ZC; advantages: fault isolation, VLAN isolation, TSN per port; 5-port gigabit switch = 5 Gbit/s aggregate non-blocking; daisy-chain (line): ZC1→ZC2→ZC3 - cheaper, no central switch, but single point of failure + higher latency; ring with HSR/PRP (IEC 62439-3): AUTOSAR redundancy protocol for ASIL-D networks; dual-homed HPC (2× uplinks) for backbone failover
▸ Bandwidth allocation: camera 1280×720 H.264 × 4 = 32 Mbit/s; radar per unit = 50 Mbit/s; LiDAR 64-beam pre-processed = 50 Mbit/s; SOME/IP service traffic = 10 Mbit/s; DoIP/OBD = 1 Mbit/s peak; gPTP + NM = <1 Mbit/s; total ≈ 145 Mbit/s on backbone; 1000BASE-T1 = 15% utilization → 85% headroom for bursts; QoS ensures camera PCP=4 preempts infotainment PCP=0 during congestion; 10GBASE-T1 HPC uplink handles uncompressed LiDAR (700 Mbit/s raw)
▸ AUTOSAR ARXML topology specification: EthernetCluster → EthernetPhysicalChannel (per VLAN/subnet) → NetworkEndpoint (IP address) → SoAdSocketConnectionGroup; EthernetCluster baudrate attribute; coupling ports; Gateway ECU: CanIf↔EthIf via PduR routing path; tool: Vector DaVinci Network Designer generates topology diagram + ARXML; PREEvision (Siemens) for E/E architecture design; AUTOSAR CP system extract (SystemSignalGroup→ISignalIPdu→PduTriggering→SoAd socket); SWC port mapping to network services via RTE generated code
Hands-On: Switch & VLAN Configuration 55 min read
▸ Lab setup: NXP SJA1105-EVB + MCU SPI bridge (NXP S32K144 or RPi); sja1105-tool (GitHub: nxp-qoriq/sja1105-tool) open-source CLI; load config: sja1105-tool config load switch.xml; check port status: sja1105-tool status ls; real-time counters: sja1105-tool monitor; Wireshark capture ports connected via switch mirror; hardware: 3× automotive Ethernet nodes (S32G or RPi with EBF-RPi-AVB hat); 2 capture PCs with USB-Ethernet (ASIX AX88179) adapters
▸ VLAN configuration steps: define VLANs in SJA1105 XML - <VLAN_LOOKUP_TABLE><entry vid="1" vmemb_port="0b11100" vlanbc="0b01000" tag_port="0b00000"/></VLAN_LOOKUP_TABLE>; port 0 = access (untagged ingress, tag added egress); port 4 = trunk (all VLANs tagged); program L2_FORWARDING for VLAN-aware unicast; verify: send tagged frame port 0, capture port 4, check TPID=0x8100 and VID=1; Wireshark: vlan.id==1 and eth.src==AA:BB:CC:DD:EE:FF; test isolation: send VLAN 10 frame, confirm not received on VLAN 1 port
▸ TSN TAS gate list setup: SJA1105P TAS XML - <TAS_CONFIG cycleTime="1000000" baseTimeSec="0" baseTimeNsec="0"><Entry gates="0xFF" duration="700000"/><Entry gates="0x0F" duration="200000"/><Entry gates="0x00" duration="100000"/></TAS_CONFIG>; load: sja1105-tool config load tas_config.xml; verify: sja1105-tool tas-status port 1; OperCycleTime must match AdminCycleTime; if base_time is past, switch aligns to next cycle boundary; Wireshark IO Graph: plot bytes/s for AVTP stream - observe burst pattern matching 1 ms cycle; guard band visible as gap between bursts
▸ Troubleshooting: SJA1105 LED: LINK=green (up), ACT=flashing (traffic); SPI config rejected → CRC mismatch: recalculate with sja1105-tool config hexdump | sja1105-tool crc; VLAN flooding (frame goes everywhere): check VLANBC field - only member ports should be set; TSN timing drift: verify gPTP lock before TAS (ptp4l offset <±100 ns before enabling gate); port isolation broken: check L2_FORWARDING ingress/egress masks per port; AUTOSAR EthSwt Det error: Det_ReportError(ETHSWT_MODULE_ID, 0, ETHSWT_SPI_TIMEOUT_ERROR); run sja1105-tool monitor and compare tx_drops with Wireshark loss
3
Time-Sensitive Networking (TSN)
5 chapters • 4.0 hrs reading
TSN Standards Overview (802.1Qbv, Qav, AS) 50 min read
▸ TSN standard family: IEEE 802.1AS-2020 (gPTP) - time synchronization ±1 μs network-wide; IEEE 802.1Qbv-2015 (TAS) - Time-Aware Shaper, gate control lists for scheduled traffic; IEEE 802.1Qav-2009 (CBS) - Credit-Based Shaper, limits AVB streams to 75% link bandwidth; IEEE 802.1Qbu-2016 (Frame Preemption) - express frames interrupt preemptable frames, saves up to 125 μs; IEEE 802.1CB-2017 (FRER) - frame replication/elimination for redundancy; IEEE 802.1Qcc-2018 - enhanced Stream Reservation Protocol
▸ TSN traffic classes in automotive: Class A (latency ≤2 ms): ADAS radar commands, brake-by-wire, steering inputs; Class B (latency ≤50 ms): instrument cluster, audio; Best Effort: infotainment, OTA, diagnostics; MSRP (802.1Qat) bandwidth reservation: talker advertises bandwidth, listener confirms; automotive simplification: static pre-provisioned streams (no dynamic MSRP) per AUTOSAR ETH TSN configuration; AUTOSAR EthTSyn module manages TAS + gPTP; StbM (Synchronized Time-Base Manager) provides time reference to all stack layers
▸ IEEE 802.1AS gPTP: restricted 1588 PTP profile for Ethernet-only; GM (Grand Master) election via BMCA: clockIdentity (EUI-64) + priority1/priority2/clockClass/clockAccuracy; Sync→Follow_Up (2-step for HW timestamping); Pdelay_Req/Resp/Resp_Follow_Up for peer path delay; logSyncInterval = −3 (= 125 ms); correctionField accumulates per-hop delay in Transparent Clocks; Announce logMessageInterval = 0 (= 1 s); AUTOSAR GptSync_GetCurrentTime() / StbM_GetCurrentTime(StbMSynchronizedTimeBaseRef) returns StbM_TimeStampType
▸ TAS vs CBS comparison: TAS = time-triggered (requires gPTP lock), bounded latency = waiting_time + transmission; CBS = credit-based token bucket (no time sync needed), Class A latency ≈ 1.5 ms; TAS use: safety-critical fixed slots; CBS use: audio/video bounded streams; combined deployment: TAS (safety) + CBS (AV) + BE (rest) on same switch port; SJA1105P implements both; toolchain: TTTech Flexible TSN Configurator or NXP EB Tresos TSN plug-in for GCL/CBS parameter generation; AUTOSAR ARXML: EthTSynGlobalTimeDomain → EthTSynPortConfig → SwitchGateScheduleEntry
Time-Aware Shaper - Scheduled Traffic 45 min read
▸ IEEE 802.1Qbv TAS fundamentals: Gate Control List (GCL) - schedule for 8 traffic class queues (TC0–TC7); cycle time (e.g., 1 ms = 1,000,000 ns); each entry: [gate_state_vector[7:0], time_interval_ns]; guard band = max_frame_transmission_time = (1500×8)/1Gbit/s = 12 μs; base_time: absolute gPTP timestamp for cycle start (must coordinate across all switches); gate open (bit=1) = queue transmits; gate closed (bit=0) = queue blocked; AUTOSAR EthTSyn SwitchTimeGateSchedule: AdminGateStates, OperationalGateStates, CycleTimeNumerator/Denominator
▸ GCL design example (1 ms cycle): safety PCP=5 open 100–300 μs (200 μs window); camera PCP=4 open 300–700 μs (400 μs window); best-effort PCP=0 open 700–1000 μs (300 μs window); guard band: 12 μs before each critical window; safety bandwidth: 1 Gbit/s × 200 μs = 25 KB/slot = 200 Mbit/s peak; camera H.264 frame in 400 μs = 50 KB (enough for 1280×720 compressed frame at 30 fps); SJA1105P TAS register block via SPI: TAS_CONFIG_BLOCK.LISTLEN, .BASETIMEL/H, .CYCLETIME; NXP LLD: SJA1105P_writeScheduleEntry(portIdx, entryIdx, gateStates, timeInterval_ns)
▸ End-to-end latency calculation: frame transmission = frame_size/link_speed (100B on 1 Gbit/s = 0.8 μs); switch store-and-forward ≈ 8–20 μs; TAS worst-case = transmission + switch delay + max wait for slot opening; example: safety frame (100B) worst-case = 0.8 μs + 20 μs + up to 800 μs (waiting) = 821 μs; without TAS: burst of 1500B best-effort frames blocks critical frame for 12 μs × N (unbounded); TAS bounds interference to exactly 1 cycle period; end-to-end over 2 hops = 2 × (20 μs + 800 μs) + propagation = <1.7 ms
▸ Verification tools: Wireshark IO Graph - plot bytes/s filter=avtp, observe burst pattern matching cycle; ETAS LA-850 hardware-timestamped measurement; PicOScope oscilloscope on TX_EN pin - gate-controlled burst visible as on/off pattern; ptp4l verify offset <±100 ns before enabling TAS (misaligned base_time causes schedule slip); TTTech Flexible TSN Configurator for formal schedule analysis (computes max latency per stream); AUTOSAR EthTSyn: EthTSyn_TxConfirmation() captures HW TX timestamp; common issue: base_time in the past → switch aligns to next N×cycle_time boundary; phc2sys keeps Linux PHC synchronized to gPTP for correct base_time calculation
Credit-Based Shaper - AVB Streams 40 min read
▸ IEEE 802.1Qav CBS fundamentals: credit accumulates during idle at idleSlope (bps reserved), depletes at sendSlope (= idleSlope − link_speed) during transmission; transmit only when credit ≥ 0; credit clamped: never above hiCredit, never below loCredit; Class A: latency ≤2 ms; Class B: latency ≤50 ms; combined limit: idleSlope_A + idleSlope_B ≤ 0.75 × link_speed; example: 100 Mbit/s on 1 Gbit/s link: idleSlope=100M, sendSlope=−900M; credit accumulates 100 Mbit/s when idle, depletes 900 Mbit/s during burst
▸ hiCredit/loCredit calculation: hiCredit_A = (max_nonAVB_frame × idleSlope_A) / (link_speed − idleSlope_A); loCredit_A = −(max_AVB_frame × |sendSlope_A|) / link_speed; example: max_nonAVB=1522B, max_AVB=1522B, idle=100Mbps, link=1000Mbps: hiCredit=(1522×8×100)/(900)=1353 bits; loCredit=−(1522×8×900)/1000=−10958 bits; SJA1105 CBS registers: PORT[n].CBS_PARAM.IdleSlope, SendSlope, HiCredit, LoCredit (32-bit signed, bit units); AUTOSAR EthDrv_SetCreditBasedShaping(portIdx, classA_idleSlope, classB_idleSlope)
▸ AVTP stream reservation: IEEE 1722, EtherType=0x22F0; audio stream: 48 kHz stereo PCM = 192 KB/s; 6 samples/packet at 8 kHz packet rate = 125 μs interval; video: IEC 61883-4 MPEG-TS or H.264 over CVF; AVTP packet: 14B Eth + 24B AVTP + payload; stream_id: 8B EUI-64; talker/listener defined in MSRP or pre-provisioned in static ARXML; surround-view cameras on CBS Class A; audio over Class B; AUTOSAR AP vsomeip CBS socket options: SO_PRIORITY set per stream; Automotive Grade Linux avtp-pipeline: avtp_pipeline --mode talker --stream-id 0xAABBCCDDEEFF0001
▸ CBS coexistence with TAS and troubleshooting: TAS guard band halts CBS during critical safety window; after window closes, CBS resumes from last credit value (no reset); CBR (Constant Bit Rate) AVTP visible in Wireshark IO Graph as flat line; jitter target: <500 μs for Class A; measure: Statistics→Round Trip Time or Lua dissector computing delta between consecutive avtp.timestamps; CBS misconfigured: idleSlope too high → starves best-effort; too low → insufficient camera bandwidth; verify: total idleSlope_A + idleSlope_B ≤ 750 Mbit/s on 1G link; SJA1105 CBS register check via sja1105-tool config dump port N cbs
Precision Time Protocol (gPTP) 45 min read
▸ gPTP (IEEE 802.1AS) message types: Sync (msgType=0x00, multicast MAC 01:80:C2:00:00:0E, EtherType=0x88F7) - Master→Slave; Follow_Up (0x08, 2-step): carries preciseOriginTimestamp (actual HW TX time); Pdelay_Req (0x02): Slave initiates path delay; Pdelay_Resp (0x03): link partner responds; Pdelay_Resp_Follow_Up (0x0A): carries responseOriginTimestamp; Announce (0x0B): GM election; logSyncInterval = −3 (= 125 ms); Sync correctionField accumulates per-hop delay via Transparent Clocks; Announce logMessageInterval = 0 (= 1 s)
▸ Hardware timestamping: STM32 ETH MAC: ETH_PTP_TSSR (status), ETH_PTP_TSHR/TSLR (target time); NXP SJA1105 per-port TX/RX timestamp FIFO via SPI (PTPEGR_TABLE); timestamp format: seconds (48-bit) + nanoseconds (32-bit, 0–999999999); SW timestamping: ±10 μs (driver interrupt latency); HW timestamping: ±100 ns; AUTOSAR EthTSyn_TxConfirmation() retrieves TX timestamp from EthIf; EthTSyn_RxIndication() gets RX timestamp; accurate HW timestamping required for <1 μs network sync accuracy
▸ BMCA (Best Master Clock Algorithm): attributes compared: clockClass (0=atomic, 6=GPS, 52=app-specific, 248=default), clockAccuracy (0x21=<100 ns, 0x22=<250 ns, 0x31=within 25 μs), offsetScaledLogVariance (0xFFFF=unknown), priority1 (lower=preferred, default 128), priority2 (secondary, default 128), clockIdentity (EUI-64); State Decision Algorithm: M1→P1→S1 (Slave); AUTOSAR StbM_SetGlobalTime() called when GM selected; StbM_GetCurrentTime() returns StbM_TimeStampType with seconds + nanoseconds + syncToGTMaster flag
▸ ptp4l configuration: linuxptp project on AUTOSAR AP HPC; ptp4l.conf: clockClass 248; priority1 128; delay_mechanism P2P; network_transport L2; logSyncInterval -3; logPdelayReqInterval 0; slaveOnly 1 (for slave nodes); start: ptp4l -i eth0 -f /etc/ptp4l.conf -s -m; phc2sys: phc2sys -s eth0 -w -m; steady-state offset target: <±100 ns (HW ts); Wireshark gPTP: filter=ptp; verify Sync→Follow_Up pair; check neighborRateRatio ≈ 1.0 (within ±1 ppm); common issues: (1) GM loops - fix priority1; (2) PDelay timeout - check TC support in switch; (3) TAS base_time misaligned - use absolute gPTP TAI timestamp
Hands-On: TSN Stream Configuration 60 min read
▸ Lab setup: NXP SJA1105P-EVB + 2× NXP S32G or RPi nodes; talker: ptp4l + mrpd (MSRP daemon) + avtp-pipeline (Automotive Grade Linux); listener: second node; time sync first: ptp4l -i eth0 -f gPTP.cfg -m; wait for ptp4l output offset <±1 μs before starting streams; AVTP pipeline talker: avtp_pipeline --mode talker --stream-id 0xAABBCCDDEEFF0001 --dst-mac 91:E0:F0:00:FE:01 --max-frames 6 --class A; listener: avtp_pipeline --mode listener --stream-id 0xAABBCCDDEEFF0001
▸ TAS GCL configuration: sja1105-tool TAS XML: <TAS_CONFIG cycleTime="1000000" baseTimeSec="0" baseTimeNsec="0"><Entry gates="0xFF" duration="700000"/><Entry gates="0x0F" duration="200000"/><Entry gates="0x00" duration="100000"/></TAS_CONFIG>; load: sja1105-tool config load tas_config.xml; verify: sja1105-tool tas-status port 1; AdminCycleTime must equal OperCycleTime; base_time of 0 → switch uses next valid gPTP-aligned boundary; gate 0xFF = all queues open, 0x0F = lower 4 queues, 0x00 = guard band (no transmission)
▸ Stream validation: Wireshark filter=avtp; check sequence_num incrementing without gaps; timestamp_valid=1; IO Graph: Y=bits/s filter=avtp → flat line = CBS Class A; with TAS: burst pattern visible as 700 μs on / 300 μs off per ms cycle; jitter: Statistics→Expert Information→Sequence→delta, target <500 μs for Class A; ETAS LA-850 or Xena Xeon for hardware-timestamped measurement; AVTP packet fields: avtp.stream_id, avtp.subtype, avtp.sequence_num, avtp.timestamp, avtp.tv (timestamp valid bit)
▸ gPTP verification and troubleshooting: phc2sys offset: target ±100 ns (HW ts) or ±10 μs (SW ts); Wireshark ptp: check Sync→Follow_Up correctionField; Pdelay neighborRateRatio ≈ 1.0; issues: (1) GM loops - fix priority1/clockClass in ptp4l.conf; (2) PDelay timeout - check SJA1105P Transparent Clock support (TC must be enabled in switch config); (3) TAS base_time misaligned - base_time must be future gPTP TAI seconds; (4) guard band overshoot - increase guard band or reduce max frame size; use TTTech TSN Configurator for formal schedule analysis; common fix: add 5 s offset to current gPTP time for base_time
4
SOME/IP & Service Discovery
5 chapters • 3.5 hrs reading
SOME/IP Message Format & Serialization 45 min read
▸ SOME/IP fixed 16-byte header: Service ID (2B, e.g., 0x1234=BrakeControl); Method ID (2B: 0x0001–0x7FFF=methods, 0x8001–0xFFFE=events, 0x7FFF=SD port); Length (4B: payload + 8, counts from Request ID); Client ID (2B); Session ID (2B, incremented per request, wraps at 0xFFFF); Protocol Version (1B: 0x01); Interface Version (1B); Message Type (1B: REQUEST=0x00, REQUEST_NO_RETURN=0x01, NOTIFICATION=0x02, RESPONSE=0x80, ERROR=0x81); Return Code (1B: E_OK=0x00, E_NOT_OK=0x01, E_UNKNOWN_SERVICE=0x02, E_TIMEOUT=0x06, E_MALFORMED_MESSAGE=0x09)
▸ Serialization wire format: big-endian (network byte order) per AUTOSAR standard; uint8=1B, uint16=2B BE, uint32=4B BE, float32=4B IEEE754 BE; struct members in declaration order, no padding (unlike C ABI); string: 4B length prefix + UTF-8 data + null terminator; array: 4B element-count prefix + elements; TLV (optional fields): tag (2B field ID) + length (4B) + value; AUTOSAR AP ara::com Serializer<>/Deserializer<> via vsomeip or CommonAPI-C++; AUTOSAR CP SomeIpXf_Serialize() / SomeIpXf_Deserialize() transformers
▸ vsomeip configuration (/etc/vsomeip/vsomeip.json): {"service-discovery":{"enable":"true","multicast":"239.192.255.251","port":"30490"}, "services":[{"service":"0x1234","instance":"0x0001","reliable":{"port":"30501"},"unreliable":{"port":"30500"}}]}; app init: vsomeip::runtime::get()->create_application("RadarApp"); app->init(); app->register_message_handler(service_id, instance_id, method_id, callback); app->start(); io-threads: 4 (vsomeip.json "io-threads":4); serialize: auto msg=runtime->create_request(); msg->set_service(0x1234); msg->set_method(0x0001); auto pl=runtime->create_payload(); pl->set_data({0x01,0x02}); msg->set_payload(pl); app->send(msg)
▸ Error handling and tooling: return code 0x04=E_NOT_READY (service unavailable), 0x07=E_WRONG_PROTOCOL_VERSION, 0x08=E_WRONG_INTERFACE_VERSION, 0x09=E_MALFORMED_MESSAGE, 0x0A=E_WRONG_MESSAGE_TYPE; error response: message_type=0x81 + applicable return_code; AUTOSAR DET: SomeIpXf_ReportError(SOMEIPXF_MODULE_ID); Wireshark SOME/IP: filter=someip; fields: someip.service_id, someip.method_id, someip.message_type, someip.return_code; arxml binding generators: ISOLAR-AB, EB Tresos ComXf, Vector DaVinci Configurator; SomeIpXf_Init() must be called before first transformation
Service Discovery (SOME/IP-SD) 40 min read
▸ SOME/IP-SD message structure: SD header = SOME/IP header (service_id=0xFFFF, method_id=0x8100, client_id=0x0000) + SD payload; SD payload: Flags byte (0xC0=reboot+unicast bits) + 3 reserved + Entries Array Length (4B) + Entries + Options Array Length (4B) + Options; Entry types (16B each): FindService (0x00), OfferService (0x01), Subscribe (0x06), SubscribeAck (0x07), StopOffer (type=0x01 with TTL=0); entry fields: Type + Index1 + Index2 + Num+Opts + ServiceID + InstanceID + MajorVersion + TTL (3B) + MinorVersion/EventGroupID
▸ SD state machine timing: provider: DOWN→INITIALWAIT (random 10–500 ms delay)→REPETITION (send offer 3× at 30 ms intervals)→MAIN (cyclic offer every 1000 ms); consumer: FindService multicast to 239.192.255.251:30490; OfferService received → SubscribeEventgroup multicast → SubscribeEventgroupAck unicast; subscription TTL: 3 × CyclicOfferDelay = 3000 ms; vsomeip timing in vsomeip.json: "initial-delay-min-ms":10, "initial-delay-max-ms":100, "repetitions-max":3, "cyclic-offer-delay-ms":1000; avoid SD storm: stagger InitialDelay per ECU
▸ vsomeip SD configuration and subscription: server offer: app->offer_service(0x1234, 0x0001, 1, 0); eventgroup offer: app->offer_event(0x1234, 0x0001, 0x8001, {0x0001}); client subscribe: proxy_app->subscribe(0x1234, 0x0001, 0x0001); availability callback: app->register_availability_handler(0x1234, 0x0001, on_availability); event handler: app->register_message_handler(0x1234, 0x0001, 0x8001, on_event); AUTOSAR AP ara::com: proxy.radarObjects.Subscribe(10); proxy.radarObjects.SetReceiveHandler([&](){...}); proxy.radarObjects.GetNewSamples(callback, max_count)
▸ Troubleshooting SD: Wireshark filter=someipsd; check OfferService TTL > 0 (TTL=0 means StopOffer); verify multicast group joined: ip maddr show eth0 → must show 239.192.255.251; SD not received: check UDP port 30490 firewall rules; subscription failure: verify VLAN membership (SD multicast must be in same VLAN); vsomeip debug logging: export VSOMEIP_CONFIGURATION=/etc/vsomeip.json; vsomeip loglevel debug in config; common issues: (1) SD storm - increase InitialDelay; (2) subscription timeout - reduce CyclicOfferDelay or increase TTL; (3) SubscribeAck missing - check server event registration
Events, Methods & Field Notifiers 35 min read
▸ SOME/IP Methods (Request/Response): client sends REQUEST (message_type=0x00), server processes and returns RESPONSE (0x80); fire-and-forget: REQUEST_NO_RETURN (0x01), no response expected; method ID range: 0x0001–0x7FFF; response timeout: "response-timeout-ms" in vsomeip.json (default 5000 ms), expiry returns E_TIMEOUT=0x06; AUTOSAR AP example: auto future = proxy->SetTargetSpeed(120.0f); future.wait(); auto result = future.get(); if(result.HasValue()) { float actual = result.Value(); }; vsomeip: app->register_message_handler(0x1234, 0x0001, 0x0001, on_request)
▸ Events and EventGroups: event ID range: 0x8001–0xFFFE; message_type=NOTIFICATION (0x02); delivery: unicast to subscribers or multicast; event group: logical collection of events, one SubscribeEventgroup subscribes to all group members; example RadarService EventGroup 0x0001: event 0x8001=RadarTargetList, 0x8002=RadarStatus, 0x8003=RadarDiagnostic; publisher fires: app->notify(service_id, instance_id, event_id, payload); periodic events: timer thread calls notify() every 10 ms (100 Hz); AUTOSAR AP skeleton: skeleton.radarObjects.Send(radarData); proxy subscription: proxy.radarObjects.Subscribe(EventCacheSize)
▸ Field Notifiers (bi-directional): Field = Event + Getter + Setter; Getter method: REQUEST→RESPONSE with current field value; Setter method: REQUEST with new value → RESPONSE with ack; Notifier event: pushed to subscribers on value change; initial event: on new subscription, provider immediately sends current value; AUTOSAR AP ara::com field: proxy.vehicleSpeed.Get() → Future<float>; proxy.vehicleSpeed.Set(120.0f) → Future<void>; proxy.vehicleSpeed.Subscribe(N); proxy.vehicleSpeed.GetNewSamples(handler); field persistence: server caches last value for initial event delivery to new subscribers
▸ ARXML configuration and debugging: SomeipServiceInterfaceDeployment: serviceInterfaceId=0x1234, instanceId=0x0001; MethodMapping: methodId, requestTopic, responseTopic; EventMapping: eventId, eventGroupId, topic; Vector DaVinci Configurator generates ARXML; vsomeip binding generator converts ARXML to vsomeip.json; AUTOSAR SomeIpXf serializes ara::com types; debug: vsomeip --loglevel debug; Wireshark: filter someip.method_id==0x8001 (event), frame.time_delta_displayed for period verification (expect ≈0.010 for 100 Hz); RTT measurement: time between request and response session_id match
SOME/IP-TP for Segmentation 35 min read
▸ SOME/IP-TP fundamentals: solves UDP MTU limit (max payload 1472 bytes = 1500 − 20 IP − 8 UDP); TP flag: bit 5 of Message Type byte (0x20); header additions: 4-byte TP header = MoreSegments flag (MSB) + Offset (28-bit, 4-byte aligned, byte offset in original payload); typical MSS: 1392 bytes (leaving room for SOME/IP + IP + UDP + Eth headers); use cases: large diagnostic responses, OTA data, bulk calibration data >1472 bytes; reassembly timeout: discard if all segments not received within configured timeout
▸ Segmentation algorithm: original message 5000 bytes; segment 0: offset=0, length=1392, MoreSegments=1; segment 1: offset=1392, length=1392, MoreSegments=1; segment 2: offset=2784, length=1392, MoreSegments=1; segment 3: offset=4176, length=824, MoreSegments=0 (last); total = 4 segments; SOME/IP-TP overhead: 20 bytes/segment (16B SOME/IP + 4B TP header); receiver reassembly keyed by (service_id, instance_id, session_id) tuple; reassemble when last segment (MoreSegments=0) arrives and all offsets contiguous
▸ vsomeip and AUTOSAR CP TP configuration: vsomeip.json TP section: {"services":[{"service":"0x1234","methods":[{"id":"0x0001","someip_tp":{"service-to-client":{"enable":"true","separation-time-ms":0}}}]}]}; AUTOSAR CP SomeIpXf: <SomeIpTransformationProps><SegmentLength>1392</SegmentLength><SeparationTime>0</SeparationTime></SomeIpTransformationProps>; separation time 0 ms = burst transmit all segments; AUTOSAR AP: TP enabled per method in deployment ARXML; ara::com handles segmentation transparently; receiver buffer: must accommodate full original message size
▸ Troubleshooting: Wireshark filter: someip and someip.tp_flag==1; check segment offset incrementing and MoreSegments bit; last segment: MoreSegments=0; missing segment: check UDP packet loss (UDP checksum errors); SOME/IP-TP does not guarantee segment order - receiver reorders by offset; duplicate segments: receiver silently discards; reassembly timeout: increase SomeipTpReassemblyTimeout in config; MTU mismatch: verify switch supports required frame size; test: send 10 KB SOME/IP-TP response, capture with Wireshark, verify full reassembly without gaps; vsomeip debug: look for "TP: received segment" log messages
Hands-On: SOME/IP Service Implementation 60 min read
▸ Environment setup: Ubuntu 20.04 on x86_64 or NXP S32G; build vsomeip: git clone https://github.com/COVESA/vsomeip; mkdir build && cd build; cmake .. -DENABLE_SIGNAL_HANDLING=1; make -j4; sudo make install; set VSOMEIP_CONFIGURATION=/etc/vsomeip/vsomeip.json; service app: #include <vsomeip/vsomeip.hpp>; auto app = vsomeip::runtime::get()->create_application("RadarService"); app->init(); app->offer_service(0x1234, 0x0001, 1, 0); app->register_message_handler(0x1234, 0x0001, 0x0001, on_message); app->start()
▸ Request/Response method implementation: server on_message: void on_message(const std::shared_ptr<vsomeip::message>& msg) { auto resp = vsomeip::runtime::get()->create_response(msg); auto pl = vsomeip::runtime::get()->create_payload(); float speed=120.0f; std::vector<vsomeip::byte_t> data(4); memcpy(data.data(), &speed, 4); pl->set_data(data); resp->set_payload(pl); app->send(resp); }; client: auto req=runtime->create_request(); req->set_service(0x1234); req->set_method(0x0001); app->send(req); register response handler; measure RTT: clock_gettime(CLOCK_MONOTONIC) before send and in response callback
▸ Periodic event notification: server-side: app->offer_event(0x1234, 0x0001, 0x8001, {0x0001}, vsomeip::event_type_e::ET_FIELD); timer thread: while(running) { auto pl=createRadarPayload(); app->notify(0x1234, 0x0001, 0x8001, pl); std::this_thread::sleep_for(std::chrono::milliseconds(10)); } (100 Hz); client subscribe: app->subscribe(0x1234, 0x0001, 0x0001); app->register_message_handler(0x1234, 0x0001, 0x8001, on_radar_event); verify: count events over 1 s → expect 100 ± 2; check event period = 10 ± 1 ms via frame.time_delta_displayed in Wireshark
▸ Integration testing and error injection: Wireshark: someip.service_id==0x1234; monitor SD: someipsd; check SubscribeAck; error injection: send wrong interface_version → verify server returns E_WRONG_INTERFACE_VERSION (0x08); block response >5 s → client gets E_TIMEOUT; multi-subscriber test: 3 listeners, 1 publisher → all must receive events (multicast UDP); CPU load: perf stat -e cycles,instructions ./radar_service; optimize: pre-allocate payload buffers, avoid per-event heap allocation; log: vsomeip --loglevel debug 2>&1 | grep -i "send\|recv\|subscribe\|timeout"
5
DoIP & Diagnostic over Ethernet
4 chapters • 3.0 hrs reading
DoIP Protocol (ISO 13400) 50 min read
▸ DoIP stack: ISO 13400-2 over TCP/UDP; UDP port 13400: Vehicle Announcement, VIN requests, Entity Status; TCP port 13400: Routing Activation + Diagnostic Messages; generic header (8B): Protocol Version (0x02=:2012, 0x03=:2019) + Inverse Protocol Version + Payload Type (2B) + Payload Length (4B); payload types: 0x0001=Vehicle Announcement/ID Response, 0x0002=Vehicle ID Request, 0x0005=Routing Activation Request, 0x0006=Routing Activation Response, 0x0007=Alive Check Request, 0x0008=Alive Check Response, 0x4001=Entity Status Request, 0x4002=Entity Status Response, 0x8001=Diagnostic Message, 0x8002=Positive Ack, 0x8003=Negative Ack
▸ Vehicle Announcement and ID structure: VehicleAnnouncement sent on UDP broadcast (255.255.255.255:13400) or multicast (239.255.255.251:13400) 3× at 0.5 s intervals on power-up; payload: VIN (17B ASCII, ISO 3779) + EID (6B = MAC address) + GID (6B = Group ID for multi-channel vehicles) + FurtherActionRequired (1B: 0x00=none, 0x10=central security, 0x20=active diagnostic) + VehicleIdentificationSyncStatus (1B: 0x00=synchronized); python-doip: DoIPClient.get_vehicle_announcement(timeout=5, localInterface='eth0')
▸ Routing Activation flow: client→TCP→RoutingActivationRequest: SourceAddress (2B tester, e.g., 0x0E00) + ActivationType (1B: 0x00=default, 0x01=WWH-OBD) + Reserved (4B); server response RoutingActivationResponse: ClientAddress + EntityAddress + ResponseCode (1B: 0x10=denied unknown SA, 0x11=max sockets, 0x12=SA already registered, 0x15=activated successfully, 0x16=needs confirmation); after 0x15: TCP link ready for UDS messages; T_TCP_General_Inactivity = 300 s default; AUTOSAR DCM DoIP: DcmDslDoIPNetworkParameters.SourceAddress, ActivationLineId
▸ Diagnostic Message flow: after routing activation: DiagnosticMessage (0x8001) payload = SourceAddress (2B tester) + TargetAddress (2B ECU logical, e.g., 0x0E01) + UserData (UDS: 0x10 0x03 = extendedSession); server sends DiagnosticAck (0x8002, code=0x00) within T_DiagAck_Max=2 s; then ECU UDS positive response 0x50 0x03; NegativeAck (0x8003) codes: 0x06=Target Unreachable, 0x07=Unknown Target, 0x08=Message Transmission Disabled; python-doip: client = DoIPClient('192.168.1.10', 13400, source_logical_address=0x0E00, target_logical_address=0x0E01); client.activate_routing(); client.send_doip(0x0E01, bytes([0x10, 0x03]))
Vehicle Identification & Routing 40 min read
▸ DoIP logical address assignment: each node has unique 16-bit logical address (network addressing, separate from IP); ECU range: 0x0E00–0x0EFF; external tester: 0x0E00; OBD tester: 0xFF00; functional broadcast: 0xE400; AUTOSAR DCM DcmDslDoIPNetworkParameters.EntityAddress; gateway maps logical address → CAN node ID via routing table; message path: external tester→DoIP TCP→gateway ECU→PduR→CanTp→CAN→target ECU; AUTOSAR PduR routing path: DoIPSdu→DcmSdu or CanTpSdu depending on target
▸ VIN-based identification: VID Request with VIN (payload type 0x0004): tester multicasts with 17-byte VIN; gateway compares to stored NvM VIN (NvMBlockDescriptor, block size=17B); match → VehicleID Response (0x0001); EID (6B MAC) identifies physical DoIP entity; GID (6B) links multiple DoIP entities on same vehicle - all ECUs share same GID; multi-ECU service tool discovery: broadcast → collect all GID-matching responses → full ECU map; python-doip: responses = DoIPClient.get_vehicle_announcement(timeout=5); filter by gid field
▸ Multi-channel routing activation: vehicle may have front DoIP (OBD port J1962 + DoIP adapter) and rear DoIP (rear gateway); each channel = separate TCP connection to port 13400; AUTOSAR DoIP entity table: {SourceAddress=0x0E00, EntityLogicalAddress=0x0101, IPv4=169.254.0.101, Port=13400}; gateway routing table: {0x0E01→CAN channel 1→CAN ID 0x7E8}, {0x0E02→CAN channel 2→CAN ID 0x7E2}; AliveCheck: DoIP sends AliveCheckRequest (0x0007) every 500 ms; client must respond (0x0008) within 500 ms or connection closed
▸ AUTOSAR DoIP configuration: DoIpRoutingActivation: {RoutingActivationAuthenticationRequired=FALSE, RoutingActivationType=0x00}; DoIpTargetAddress: {TargetAddressValue=0x0E01, TargetAddressPduRef→PduR routing}; DoIpConnection: {DoIpLocalUdpPort=13400, DoIpLocalTcpPort=13400, DoIpInitialVehicleAnnouncementTime=500ms, DoIpVehicleAnnouncementCount=3}; EB Tresos DoIP plugin generates DoIp_Cfg.c/h; integration test with python-udsoncan: config={'transport_class':'doip', 'doip_ip':'169.254.0.101', 'doip_port':13400, 'source_address':0x0E00, 'target_address':0x0E01}; client = udsoncan.Client(doip_conn, config=config); client.read_data_by_identifier([DataIdentifier.VIN])
Diagnostic Message Handling 35 min read
▸ DoIP UDS routing flow: external tester→DoIP TCP (port 13400)→DoIP Gateway→PduR→DCM (UDS engine) or CanTp (CAN routing)→target ECU; UDS timing over DoIP: P2=50 ms (initial response), P2*=5000 ms (extended with 0x78 NRC), S3server=5000 ms (session timeout); DoIP additional overhead: T_DiagAck_Max=2000 ms; AUTOSAR DCM DcmDslDoIPNetworkParameters associates DoIP channel with DCM service; single TCP connection can address multiple ECUs via different TargetAddresses in DiagnosticMessage
▸ DoIP NACKs vs UDS NRCs: DoIP layer NACKs (0x8003) before UDS: 0x06=Target Unreachable (not in routing table), 0x07=Unknown Target, 0x08=Message Transmission Disabled; UDS NRCs inside DiagnosticMessage response: 0x11=serviceNotSupported, 0x12=subFunctionNotSupported, 0x13=incorrectMessageLength, 0x22=conditionsNotCorrect, 0x25=requestSequenceError, 0x31=requestOutOfRange, 0x33=securityAccessDenied, 0x35=invalidKey, 0x78=responsePending; error cascade: DoIP NACK stops at gateway; UDS NRC returned inside DiagnosticMessage positive/negative response
▸ Functional addressing broadcast: target address = 0xE400 (functional, all ECUs); DoIP DiagnosticMessage with target=0xE400; gateway floods to all CAN nodes via functionally addressed CanTp (N_TA=0xE400, N_TAtype=FUNCTIONAL); use: TesterPresent broadcast (0x3E 0x80) to keep all ECU sessions alive, VehicleSpeed broadcast queries; AUTOSAR PduR: separate routing path for functional vs physical; AUTOSAR DCM DcmDslFunctionalRequestTarget; restriction: functional addressing limited to single-frame UDS messages (≤7 bytes payload per CanTp SF)
▸ Session management and security: T_TCP_General_Inactivity=300 s default; TesterPresent (0x3E 0x80) sent every S3client=4 s to keep UDS session alive; DoIP AliveCheck: independent of UDS, sent every 500 ms; max concurrent DoIP TCP connections: AUTOSAR DoIpMaxTcpConnections (default 1); TLS 1.3 for DoIP (ISO 13400-3): mutual X.509 auth, AES-128-GCM; python-doip TLS: DoIPClient('192.168.1.10', 13400, use_ssl=True, ssl_cert='client.pem', ssl_key='client.key', ssl_ca='ca.pem'); AUTOSAR DoIpTlsConnectionRef; session failure: if S3server expires, ECU returns to default session, rejects extended service requests
Hands-On: DoIP Diagnostic Session 55 min read
▸ Lab setup: PC with python-doip + python-udsoncan + Wireshark; target: NXP S32K AUTOSAR stack or Vector CANoe DoIP simulation; USB-Ethernet adapter (ASIX AX88179) on 169.254.0.0/16; install: pip install doipclient python-udsoncan; DoIP discovery: from doipclient import DoIPClient; DoIPClient.get_vehicle_announcement(timeout=5, localInterface='eth0'); manual connect: client = DoIPClient('169.254.1.1', 13400, source_logical_address=0x0E00, target_logical_address=0x0E01); verify routing: client.activate_routing(activation_type=0x00); check response code = 0x15
▸ Running UDS services over DoIP: import udsoncan; conn = client; uds_client = udsoncan.Client(conn, config={'request_timeout':5}); read VIN: res = uds_client.read_data_by_identifier([udsoncan.DataIdentifier.VIN]); print(res.service_data.values[DataIdentifier.VIN]); read DTCs: res = uds_client.get_dtc_by_status_mask(0xFF); for dtc in res.dtcs: print(hex(dtc.dtc.id), dtc.status); change session: uds_client.change_session(udsoncan.DiagnosticSessionControl.Session.extendedDiagnosticSession); security access: uds_client.request_seed(0x01); uds_client.send_key(0x02, computed_key)
▸ Gateway routing test: connect to gateway (169.254.0.10:13400); test ECU A: target=0x0E01 → ReadDataByIdentifier(0xF190) → gateway translates to CAN UDS → response; test ECU B: target=0x0E02; test unreachable: target=0xFFFF → expect DoIP NACK 0x07 (Unknown Target); functional broadcast: client.send_doip(0xE400, bytes([0x3E, 0x80])) → no response expected (suppressed NR); Wireshark: tcp.port==13400; verify payload type 0x8001 (DiagMsg), source/target addresses; routing activation response: payload type 0x0006, ResponseCode byte = 0x15
▸ Debugging: issue 1: routing activation denied code=0x11 (max sockets) → close previous TCP connection or increase DoIpMaxTcpConnections; issue 2: T_DiagAck timeout → ECU not responding in 2 s → check CAN bus with analyzer, verify ECU in correct session; issue 3: VIN mismatch during vehicle ID → read NvM VIN block from ECU (0xF190), compare; issue 4: session drops after S3server - ensure TesterPresent 0x3E 0x80 every 4 s; enable debug: import logging; logging.basicConfig(level=logging.DEBUG); timing measurement: time.perf_counter() before/after each UDS call; P2 target: <50 ms for most services; measure with Wireshark: delta between 0x8001 DiagMsg request and 0x8002 Ack
6
Advanced Topics
4 chapters • 3.0 hrs reading
Multi-Gig Ethernet (2.5G, 5G, 10G) 35 min read
▸ Multi-gig automotive standards: 2.5GBASE-T1 (IEEE 802.3ch, 2020) - PAM4 on single STP, 1.25 Gbaud; 5GBASE-T1 - PAM8 on STP; 10GBASE-T1 (IEEE 802.3cy, in development) - 10 Gbit/s over STP max 15 m; silicon: NXP TJA1103 (2.5GBASE-T1, production 2023), Marvell 88Q4364 (10GBASE-T1 automotive), Broadcom BCM89883; connectors: HSD-2 or AMEC/H-MTD3 for multi-gig; STP required for 10GBASE-T1 (UTP insufficient at 10 Gbit/s); use: HPC↔central switch backbone, uncompressed LiDAR aggregation
▸ PAM4 vs PAM3 modulation: PAM3 (100BASE-T1/1000BASE-T1): 3 amplitude levels (+1, 0, −1), 1.5 bits/symbol; PAM4 (2.5GBASE-T1): 4 amplitude levels (+3, +1, −1, −3), 2 bits/symbol at 1.25 Gbaud = 2.5 Gbit/s; higher SNR required for PAM4; adaptive equalizer complexity and DSP power increase: 2.5GBASE-T1 ≈500 mW vs 100BASE-T1 ≈200 mW; AEC-Q100 qualification required; EMI challenge: CISPR 25 Class 5 harder to meet at higher frequencies; STP common-mode rejection critical for EMI compliance at 10G
▸ HPC network architecture with multi-gig: HPC (NVIDIA DRIVE AGX, NXP S32G, Renesas R-Car H3) connects via 10GBASE-T1 to central switch; 4× zone controllers each on 1GBASE-T1 spoke links; Marvell 88Q5192 16-port multi-gig TSN switch; aggregate: 4×1G + 1×10G = non-blocking for realistic traffic; LiDAR raw 700 Mbit/s: 10GBASE-T1 HPC uplink keeps CPU free from network bottleneck; PCIe 4.0×4 = 32 GB/s to MAC; guard band for TAS at 10G: (9000B×8)/10G = 7.2 μs (finer granularity than 1G's 12 μs)
▸ AUTOSAR adaptation for multi-gig: EthDrv EthCtrlConfig.EthCtrlBaudRate = ETH_BAUD_10G; EthCtrlConfig.EthCtrlPhyType = ETH_PHY_T1_10G; NXP S32G GMAC IP LLD: S32G_GMAC_SetSpeed(ETH_10G); AUTOSAR AP ethtool: ethtool -s eth0 speed 10000 duplex full autoneg off; Clause 45 MDIO required for T1 multi-gig PHY (vs Clause 22 for 1G); Linux PHYLIB for auto-negotiation via regmap MDIO; TSN 802.1Qbv at 10G: gate minimum interval 100 ns (1 MTU = 1500B×8/10G = 1.2 μs); 10G PHY register access: mdio-netlink or iproute2 phytool
Ethernet Security - MACsec & IPsec 45 min read
▸ MACsec (IEEE 802.1AE) - Layer 2 frame authentication+encryption: SecTAG (8–16B after SRC MAC, EtherType=0x88E5) + ICV (16B after payload); SecTAG fields: TCI (Tag Control Info), AN (Association Number 0–3), SL (Short Length), PN (Packet Number 32-bit replay protection); cipher: GCM-AES-128 or GCM-AES-256; key agreement: MKA (IEEE 802.1X-2020 EAPoL): CAK (Connectivity Association Key) → SAK (Secure Association Key) via CKDF; automotive use: backbone links ZC↔switch, switch↔HPC; NXP TJA110x PHY offloads MACsec in hardware (near-zero CPU overhead)
▸ MACsec Linux configuration: ip link add link eth0 macsec0 type macsec encrypt on; ip macsec add macsec0 tx sa 0 pn 1 on key 01 0123456789abcdef0123456789abcdef; ip macsec add macsec0 rx port 1 address aa:bb:cc:dd:ee:ff; ip macsec add macsec0 rx port 1 address aa:bb:cc:dd:ee:ff sa 0 pn 1 on key 01 0123456789abcdef0123456789abcdef; ip link set macsec0 up; MKA via wpa_supplicant: wpa_supplicant -i eth0 -c /etc/macsec.conf; macsec.conf: network={key_mgmt=IEEE8021X eap=MD5 identity="user" password="pass" macsec_policy=1 macsec_integ_only=0}; Wireshark: filter=macsec, check PN incrementing monotonically
▸ IPsec (RFC 4301) - Layer 3 security: ESP tunnel mode with AES-128-GCM, 12-byte IV; IKEv2 (RFC 7296) key exchange; strongSwan on AUTOSAR AP: ipsec.conf conn: left=172.16.1.10, right=172.16.100.1, ike=aes256-sha256-curve25519, esp=aes128gcm16, leftcert=/etc/certs/ecu.pem, rightcert=/etc/certs/hpc.pem, auto=start; X.509 certificate provisioning via AUTOSAR KeyM (Key Manager); use cases: OTA data transfer, V2X cross-domain, DoIP over untrusted network; ESP overhead: 50–70 bytes/packet (ICV + IV + ESP header + padding)
▸ AUTOSAR security integration: CSM (Crypto Service Manager): Csm_AEADEncrypt(jobId, mode, inputPtr, inputLen, aadPtr, aadLen, cipherPtr, cipherLenPtr, tagPtr, tagLenPtr); Crypto Driver → HSM (SHE/TPM 2.0 via SPI); SecOC (Secure Onboard Communication) for CAN/Ethernet MACs; AUTOSAR AP IAM (Identity and Access Management); certificate chain validation: ara::crypto X509Provider::LoadCertificate(); TLS 1.3 ECDHE-ECDSA-AES128-GCM-SHA256 for DoIP (ISO 13400-3); security audit: ara::log::Logger for security events; TARA (Threat Analysis and Risk Assessment) per ISO 21434 identifies MACsec/IPsec requirements per asset
Network Management for Ethernet 40 min read
▸ AUTOSAR EthNm (Ethernet Network Management, SWS_EthernetNetworkManagement): UDP multicast NM PDUs (default 239.192.0.1:6009); NM PDU format: Source Node ID (1B) + Control Byte (CBV: Repeat Message Bit[0], Active Wakeup Bit[3], Partial Network bit[6]) + User Data; states: NORMAL_OPERATION→PREPARE_BUS_SLEEP→BUS_SLEEP→REPEAT_MESSAGE; NmMsgCycleTime: NM message interval (default 1 s in NORMAL_OPERATION); NmTimeoutTime: no message → PREPARE_BUS_SLEEP; EthNm_SetUserData() / EthNm_GetLocalNodeIdentifier(); EthNm_NetworkRequest() from ComM to stay awake
▸ Cluster sleep/wake coordination: NM cluster = group of ECUs that sleep together; ComM channel references NmChannel; sleep vote: each ECU sets NM CBV Sleep Ready Bit; coordinator initiates shutdown when all vote ready; EthNm triggers: TCP connection closure → SOME/IP StopOffer → EthSM→OFFLINE; TC10 wake: WUP from network → PHY asserts INH pin → MCU wakeup; AUTOSAR EthTrcv_GetWakeupReason() returns ETHTRCV_WU_BY_BUS or ETHTRCV_WU_BY_PIN; EcuM_CheckWakeup(EthTrcvWakeupSourceId) processes wakeup; full network sleep current: <1 mA total
▸ AUTOSAR EthSM (Ethernet State Manager): states: UNINIT→INIT→WAIT_TRCVLINK→ONLINE→ONHOLD→OFFLINE; EthSM_RequestComMode(NetworkHandle, COMM_FULL_COMMUNICATION) → ONLINE; EthSM_RequestComMode(NetworkHandle, COMM_NO_COMMUNICATION) → OFFLINE; EthSM calls EthTrcv_SetPhyTxMode() and EthTrcv_SetTrcvMode(ETHTRCV_MODE_ACTIVE / PASSIVE); AUTOSAR EthTrcv: EthTrcv_Init(), EthTrcv_SetTrcvMode(), EthTrcv_GetLinkState() returns ETHTRCV_LINK_STATE_ACTIVE or DOWN; link state change: EthIf_TrcvLinkStateChg()→EthSM_TrcvLinkStateChg()→ComM/NM notification
▸ Partial Network and diagnostic NM: EthNm PN filter mask: NmPnFilter in NM PDU CBV; ECU checks PN bit - if own ID matched, stay awake; others sleep; NmPnEnabled, NmPnHandleMultipleNetworkRequests in config; SJA1105 switch PN filter: multicast MAC filter to block NM wakeup for specific ports; diagnostic NM: entering extended UDS session → ComM_DCM_ActiveDiagnostic() prevents sleep; leaving session → ComM_DCM_InactiveDiagnostic() → NM resumes sleep countdown; DEM event: EthNm_E_CBV_MII_NM_Coord_Start logs coordinator loss; Wireshark EthNm: filter=udp.port==6009, check NM CBV fields
Hands-On: Complete Vehicle Ethernet Design 65 min read
▸ Design requirements: 4-zone vehicle network; 1× HPC (NXP S32G, 4× 1000BASE-T1 ports), 4× zone controllers (S32K3, 1× 1000BASE-T1 each), 1× central 5-port SJA1105P switch; services: cameras (4×, AVTP, VLAN 2, PCP=4), ADAS radar (SOME/IP, VLAN 1, PCP=5), DoIP (VLAN 20, PCP=3), infotainment (VLAN 10, PCP=0), gPTP/NM (VLAN 100, PCP=7); ARXML topology: EthernetCluster + 5 EthernetPhysicalChannels; Vector DaVinci Network Designer generates ARXML + connection matrix; TAS GCL: 1 ms cycle, safety slot 200 μs, camera slot 400 μs, guard band 12 μs
▸ AUTOSAR stack configuration: HPC (AUTOSAR AP): vsomeip for SOME/IP radar service, ptp4l as GM (priority1=128, clockClass=248), Linux bridge for routing, EthSM FULL_COMMUNICATION; Zone Controller (AUTOSAR CP): EthDrv + EthIf + EthSM + EthNm + SoAd + TCPIP; MCAL EthDrv_Cfg.c via EB Tresos (MAC address, speed=1000BASE-T1, DuplexMode=FULL); SoAd: one socket per SOME/IP service; SomeIpXf_Init() for serialization; TcpIp: 169.254.x.x static addressing; COM: ComGW bridges local ISignals to network PDUs; AUTOSAR RTE generated code connects SWC ports to SOME/IP events
▸ Network commissioning sequence: EthTrcv initializes TJA1101 PHY via MDC/MDIO (master mode); link up → EthSM: WAIT_TRCVLINK→ONLINE; gPTP: GM election, ptp4l sync loop, offset converges to <±1 μs within 10 s; SOME/IP SD: providers offer services after gPTP stable; consumers subscribe to radar EventGroup; TAS GCL activates after gPTP lock (base_time = current gPTP TAI + 5 s buffer); EthNm: all ECUs broadcast NM PDU (CoordSleepReady=0 = awake); Wireshark sequence: gPTP Sync/Follow_Up → SOME/IP SD Offers → AVTP camera streams → DoIP announcements
▸ Validation and compliance: OPEN Alliance SpecTester for 100BASE-T1/1000BASE-T1 PHY compliance (return loss, insertion loss, MDI characteristics); EMC: CISPR 25 Class 5 radiated in anechoic chamber; TSN validation: ETAS LA-850 measures GCL timing accuracy (target: <1 μs deviation); SOME/IP conformance: AUTOSAR conformance test suite; DoIP conformance: ISO 13400 test suite via Vector CANoe DoIP plugin; gPTP steady-state: ptp4l offset <±100 ns; end-to-end latency: IXIA/Spirent RFC 2544 for best-effort throughput; security scan (bench only): verify only port 13400 and SOME/IP service ports accessible; full system test: power-cycle all ECUs, verify all services online within 15 s

What You'll Learn

Design automotive Ethernet network architectures
Configure VLANs and IP addressing for vehicle networks
Implement TSN for deterministic real-time communication
Build SOME/IP services for inter-ECU communication
Set up DoIP for diagnostic access over Ethernet
Analyze and debug Ethernet traffic using Wireshark

Prerequisites

Basic networking concepts (OSI model)
Understanding of IP addressing
Familiarity with automotive bus systems (recommended)
Full Access
Free with Pro
Enroll Now Browse Modules

This course includes:

28 detailed documentation chapters
Downloadable resources
Searchable text documentation
Code snippets & technical diagrams
Hands-on exercises
Lifetime access
Certificate of completion