3. UDP Server Extension
● Due to the UDP server was implemented on the second practical lesson, there is no sense
to estimate this solution. Therefore, implement the UDP server extension instead
● Apply patch 0001-add-UDP-server-implementation.patch to the tcp_socket_client project to
add the UDP server implementation:
$ git apply 0001-add-UDP-server-implementation.patch
● Implement the UDP server extension, that creates one more UDP socket, receives commands
to read GPIO pins states of LEDs. Use select() and tips marked with TODO comments
● The UDP server extension must accept and execute the following command from the UDP
client :
○ read gpio<PORT> <PIN> : read GPIO status, where PORT=d PIN = 12, 13, 14, 15
○ Example: read gpiod 13
● The reply should be the following:
○ GPIOD.<PIN>=<STATE>, where PIN = 12, 13, 14, 15 STATE = 0 or 1
○ Example: GPIOD.15=1
4. UDP Server Extension (Cont.)
● LED pinout table:
○ LED3 GPIOD 13
○ LED4 GPIOD 12
○ LED5 GPIOD 14
○ LED6 GPIOD 15
● Use ncat utility as the first UDP client to manage LEDs :
● $ ncat -u <IP of the board> 5678
led6 off
OK
● Use ncat utility as the second UDP client to get statuses of LEDs:
$ ncat -u <IP of the board> 1234
read gpiod 15
GPIOD.15=0
● Use Wireshark, output through USB-UART to debug your application
● Provide a link to your solution