SlideShare a Scribd company logo
1
2
C/Embedded Base Camp
Individual Task: UDP Server Extension
Petro Shevchenko
November 2021
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
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

More Related Content

More from Roman Brovko (20)

PPTX
Networking essentials lect3
Roman Brovko
 
PPTX
Gl embedded starterkit_ethernet
Roman Brovko
 
PPTX
Networking essentials lect2
Roman Brovko
 
PPTX
Networking essentials lect1
Roman Brovko
 
PPTX
Bare metal training_07_spi_flash
Roman Brovko
 
PPTX
Bare metal training_06_I2C
Roman Brovko
 
PPTX
Glesk worshop
Roman Brovko
 
PPTX
Bare metal training_05_uart
Roman Brovko
 
PPTX
Bare metal training_04_adc_temp_sensor
Roman Brovko
 
PPTX
Bare metal training_03_timers_pwm
Roman Brovko
 
PPTX
Bare metal training_02_le_ds_and_buttons
Roman Brovko
 
PPTX
Bare metal training_01_hello_world
Roman Brovko
 
PPTX
Bare metal training_00_prerequisites
Roman Brovko
 
PPTX
C language lect_23_advanced
Roman Brovko
 
PPTX
C language lect_22_advanced
Roman Brovko
 
PPTX
C language lect_21_advanced
Roman Brovko
 
PPTX
подготовка рабочего окружения
Roman Brovko
 
PPTX
C language lect_20_advanced
Roman Brovko
 
PPTX
C language lect_19_basics
Roman Brovko
 
PPTX
C language lect_18_basics
Roman Brovko
 
Networking essentials lect3
Roman Brovko
 
Gl embedded starterkit_ethernet
Roman Brovko
 
Networking essentials lect2
Roman Brovko
 
Networking essentials lect1
Roman Brovko
 
Bare metal training_07_spi_flash
Roman Brovko
 
Bare metal training_06_I2C
Roman Brovko
 
Glesk worshop
Roman Brovko
 
Bare metal training_05_uart
Roman Brovko
 
Bare metal training_04_adc_temp_sensor
Roman Brovko
 
Bare metal training_03_timers_pwm
Roman Brovko
 
Bare metal training_02_le_ds_and_buttons
Roman Brovko
 
Bare metal training_01_hello_world
Roman Brovko
 
Bare metal training_00_prerequisites
Roman Brovko
 
C language lect_23_advanced
Roman Brovko
 
C language lect_22_advanced
Roman Brovko
 
C language lect_21_advanced
Roman Brovko
 
подготовка рабочего окружения
Roman Brovko
 
C language lect_20_advanced
Roman Brovko
 
C language lect_19_basics
Roman Brovko
 
C language lect_18_basics
Roman Brovko
 

Recently uploaded (20)

PPTX
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
PDF
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
PPTX
Virus sequence retrieval from NCBI database
yamunaK13
 
PDF
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
PPTX
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
PPTX
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
PPTX
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
PPTX
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
PPT
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
PPTX
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
PPTX
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
PPTX
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
PPTX
Basics and rules of probability with real-life uses
ravatkaran694
 
PPTX
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
PPTX
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
PPTX
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
PPTX
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
PDF
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Dakar Framework Education For All- 2000(Act)
santoshmohalik1
 
My Thoughts On Q&A- A Novel By Vikas Swarup
Niharika
 
Virus sequence retrieval from NCBI database
yamunaK13
 
EXCRETION-STRUCTURE OF NEPHRON,URINE FORMATION
raviralanaresh2
 
How to Track Skills & Contracts Using Odoo 18 Employee
Celine George
 
HEALTH CARE DELIVERY SYSTEM - UNIT 2 - GNM 3RD YEAR.pptx
Priyanshu Anand
 
Applied-Statistics-1.pptx hardiba zalaaa
hardizala899
 
The Future of Artificial Intelligence Opportunities and Risks Ahead
vaghelajayendra784
 
DRUGS USED IN THERAPY OF SHOCK, Shock Therapy, Treatment or management of shock
Rajshri Ghogare
 
How to Close Subscription in Odoo 18 - Odoo Slides
Celine George
 
Gupta Art & Architecture Temple and Sculptures.pptx
Virag Sontakke
 
Command Palatte in Odoo 18.1 Spreadsheet - Odoo Slides
Celine George
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
LDP-2 UNIT 4 Presentation for practical.pptx
abhaypanchal2525
 
Basics and rules of probability with real-life uses
ravatkaran694
 
Rules and Regulations of Madhya Pradesh Library Part-I
SantoshKumarKori2
 
Applications of matrices In Real Life_20250724_091307_0000.pptx
gehlotkrish03
 
Continental Accounting in Odoo 18 - Odoo Slides
Celine George
 
K-Circle-Weekly-Quiz12121212-May2025.pptx
Pankaj Rodey
 
Antianginal agents, Definition, Classification, MOA.pdf
Prerana Jadhav
 
Ad

Individual task Networking

  • 1. 1
  • 2. 2 C/Embedded Base Camp Individual Task: UDP Server Extension Petro Shevchenko November 2021
  • 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