Avatar Blogs during GSoC-2025 period at RTEMS for the project - Providing SPARC GRETH Network Drivers for lwIP

Week-5 @RTEMS-GSoC-2025

Overview


This week, I completed the following tasks :

  • Debugging SIS for ensuring telnetd01.exe obtained after building RTEMS Net Services
  • Debugging SIS for ensuring ttcpshell01.exe obtained after building RTEMS Net Services
  • Tried using telnetd01.exe and telnetd02.exe programs from RTEMS Net Legacy

Work completed this week


  1. Debugging SIS to ensure telnetd01.exe, obtained after building RTEMS Net Serviecs, works in SIS

    • Once I have started SIS with the command
      >>> sudo ./sis -leon3 -bridge lxcbr0 -v
      (lxcbr0 bridge already started using
      sudo systemctl enable lxc-net.service
      sudo systemctl start lxc-net.service)
      I tried using ping 10.0.3.2 but using it, I got that the host was unreachable. This problem kept persisting, indicating SIS wasn’t responding to ICMP Echo Requests.
    • Noticed that I had used MAC Address 00:16:3e:00:00:00 for GRETH; however, this MAC address was also used for lxcbr0, due to this, the MAc address which was assigned to the newly created tap0 interface was also used for the GRETH device in SIS (MAC : 08:08:08:08:08:08). This could be causing communication failures. So I changed the MAC address of GRETH in config.inc file of RTEMS Net Services to NET_CFG_MAC_ADDR = 82:99:91:91:91:91; still GRETH used the MAc addresss of tap0 i.e. 08:08:08:08:08:08
    • Apparently, only when I set the MAC address for GRETH interface explicitly, irrespective of the configuration in config.inc of RTEMS Net Services, using :
      MAC_Address_config1
    • I got correct MAC Adderss used by GRETH :
      MAC_Address_SIS1
    • However, I found using
      >>> ip addr show
      that tap0 now used the MAC Address assigned to GRETH! So I assigned a different MAC Address : 08:08:08:08:08:08 to tap0 and tried running telnetd01.exe in SIS and
      >>> telnet 10.0.3.2 23
      on my linux host to connnect to the Telnet server, whoch was started successfully on SIS. But the client on linux host kept trying for telnet connection till timeout occured, without succussful connection between them.MAC_Address_SIS_telnet
  2. Debugging SIS to ensure ttcpshell01.exe, obtained after building RTEMS Net Serviecs, works in SIS:
    • Next i tried running ttcpshell01.exe in SIS in same setup.
    • Still, on running
      >>> ttcp -r -s on SIS and
      >>> ttcp -t -s on linux host MAC_Address_SIS_ttcp
  3. Tried using Telnet programs from RTEMS Net Legacy repository:
    • Some telnet programs are present in rtems-net-legacy/testsuites/telnetd01/ and rtems-net-legacy/testsuites/telnetd02/
    • telnetd01/init.c is to check if telnet server works. I used /build/sparc-rtems7-leon3/testsuites/telnetd01/telnetd01.exe, obtained after building RTEMS Net legacy, in SIS and this test gave positive results net-legacy-telnet1
    • telnetd02/init.c is to run a telnet server with a suitable network configuration. I configured these settings :
      NET_CFG_IFACE = greth0
      NET_CFG_BOOT_PROT = static
      NET_CFG_SELF_IP = 10.0.3.2
      NET_CFG_NETMASK = 255.255.255.0
      NET_CFG_MAC_ADDR = 82:99:91:91:91:91
      NET_CFG_GATEWAY_IP = 10.0.3.1
      NET_CFG_DNS_IP = 10.0.3.1
      NET_CFG_DOMAINNAME = localnet
      NET_CFG_NTP_IP = 10.0.3.1
      in config.inc file of RTEMS Net Legacy repository, built it and used /build/sparc-rtems7-leon3/testsuites/telnetd02/telnetd02.exe in SIS, to get result very similar to using telnetd01.exe from RTEMS Net Services in SIS telnet2

    • Furtehr, I also noticed, using
      >>> sudo arping -I lxcbr0 10.0.3.2
      which sends ARP requests to 10.0.3.2 to obtain MAC address associated with that IP address. This gave back positive results, indicating tehre is problem probably in using Ip addresses for communication given that telnet and ttcp dont work in spite of providing IP address of GRETH (10.0.3.2) while arping works and gives the correct, expected MAC address so there is no problem in communication via MAC addresses. Also, apr -n gives that 10.0.3.2 is accurately resolved to the MAC address we configure for GRETH arping1

Plans for next week


  1. Work using SIS on one end of the communication and otehr end being in a virtual environment established using platforms like QEMU, for complete virtualization of netork and separation from actual internet.
  2. Explore demo programs in RTEMS Legacy Networking Demos for testing GRETH Legacy Driver
  3. Complete code for Initialization of GRETH lwIP driver and work on packet transmission mechanism
  4. Create blog till Week-6