SlideShare a Scribd company logo
1 of 25
Contiki Libraries
Contiki ringbuf
• Interrupt-safe way to pass bytes from
interrupt to non-interrupt code
• Ring buffer size must be even power of
two
• Ring buffer can only pass bytes (uint8_t)
ringbuf
Void ringbuf_init (struct ringbuf *r,
uint8_t *a, uint8_t size_power_of_two);
int ringbuf_put (struct ringbuf *r, uint8_t c);
int ringbuf_get (struct ringbuf *r);
int ringbuf_size (struct ringbuf *r);
int ringbuf_elements (struct ringbuf *r);
The list library
• Convenient way to keep arbitrary structs on a
list
• Only requirement is a ->next pointer at
beginning of the struct
• Example:
struct my_data {
struct my_data *next;
int some_data;
uint8_t more_data[8];
}
The list library
The list library
void list_init (list_t list)
Initialize a list.
void *list_head (list_t list)
Get a pointer to the first element of a list.
void list_push (list_t list, void *item)
Add an item to the start of the list.
void *list_pop (list_t list)
Remove the first object on a list.
void *list_item_next (void *item)
Get the next item following this item.
The list library
#include "lib/list.h"
struct example_list_struct {
struct *next;
int number;
};
LIST(example_list);
static void my_function(void) {
struct example_list_struct *s;
list_init(example_list);

list_add(example_list, &element1);
list_add(example_list, &element2);
for(s = list_head(example_list); s != NULL; s = list_item_next(s)) {
printf("List element number %dn", s->number);
}
}
The memb library
• Manage a chunk of memory
• A fixed set of structs that can be allocated
and deallocated
• Size of set specified at compile time
The memb library
• MEMB(name, structure, num)

– Declare a memory block.
• void memb_init(struct memb *m)

– Initialize a memory block.
• void *memb_alloc(struct memb *m)

– Allocate a memory block.
• int memb_free(struct memb *m, void *ptr)

– Free a memory block.
The memb library
struct my_structure {
int a, b;
}

MEMB(my_mem, struct my_structure, NUM_STRUCTS);
static void my_function(void) {
memb_init(&my_mem);

struct my_structure *s = memb_alloc(&my_mem);
memb_free(s);
}
Memory allocation with a list
• Typical usage pattern:
– Allocate memory from memb
– Maintain on a list

• Makes it easy to keep track of things to
deallocate them later
Memory allocation with a list
struct example_num {
struct example_num *next;
int num;
};
#define MAX_NUMS 16
LIST(num_table);
MEMB(num_mem, struct example_num, MAX_NUMS);
void init_num(void) {
memb_init(&num_mem);
list_init(neighbor_table);
}
Memory allocation with a list
void add_num(int num) {
e = memb_alloc(&neighbor_mem);
if(e != NULL) {
e->num = num;
list_add(num_table, e);
}
}
struct example_num {
void remove_num(struct example_num *e) {
list_remove(num_table, e);
memb_free(&num_mem, e);
}
Memory allocation with a list
struct example_num *find_num(int num) {
struct example_num *n;
for(n = list_head(num_table); n != NULL; n = list_element_next(n)) {
if(n->num == num) {
return n;
}
}
return NULL;
}
The mmem library
• Managed memory allcator
• Maintains a fragmentation-free memory
area
• Sometimes useful
• Somewhat tricky to use
The mmem library
The mmem library
• MMEM_PTR(m)
– Provide a pointer to managed memory.

• int mmem_alloc(struct mmem *m,
unsigned int size)
– Allocated managed memory.

• void mmem_free(struct mmem *)
– Free managed memory.

• void mmem_init(void)
– Initialize the managed memory library.
The lower layers of the netstack
The radio driver
• Input
– Read packet from the radio into packetbuf
– Call NETSTACK_RDC.input();

• Output
– Prepare radio for sending
• NETSTACK_RADIO.prepare()

– Send the packet
• NETSTACK_RADIO.transmit()
Radio driver gotchas
• Radio driver works in two layers
– Interrupt context
– Contiki context

• SPI bus must be protected
– Disable interrupts during an SPI transfer

• Radio core must be protected
– Maintain flag to avoid interrupts when radio
driver is active
Radio driver energy estimator
• The Contiki energest module keeps track
of energy consumption
–
–
–
–

ENERGEST_ON(ENERGEST_TYPE_LISTEN);
ENERGEST_OFF(ENERGEST_TYPE_LISTEN);
ENERGEST_ON(ENERGEST_TYPE_TRANSMIT);
ENERGEST_OFF(ENERGEST_TYPE_TRANSMIT);
queuebufs
• “Enough” queuebufs are needed
• Difficult to say beforehand how many that
is
• Trial and error may be needed
Hands-on: HTTP POST
Build big-red-button.c as a
firmware image
•
•
•
•
•

Copy big-red-button.c from demo.thsq.io
Compile and upload on the hardware
Connect the button
Sniff the packets on screen
Code walk-through
More

http://thingsquare.com

More Related Content

What's hot

Clojure - Revenge of the Verbs
Clojure - Revenge of the VerbsClojure - Revenge of the Verbs
Clojure - Revenge of the Verbs
Tim Lossen
 

What's hot (13)

C dynamic ppt
C dynamic pptC dynamic ppt
C dynamic ppt
 
Pf presntation
Pf presntationPf presntation
Pf presntation
 
Presentation about arrays
Presentation about arraysPresentation about arrays
Presentation about arrays
 
Pointers and Dynamic Memory Allocation
Pointers and Dynamic Memory AllocationPointers and Dynamic Memory Allocation
Pointers and Dynamic Memory Allocation
 
Dynamic memory Allocation in c language
Dynamic memory Allocation in c languageDynamic memory Allocation in c language
Dynamic memory Allocation in c language
 
Dynamic Memory allocation
Dynamic Memory allocationDynamic Memory allocation
Dynamic Memory allocation
 
7.basic array
7.basic array7.basic array
7.basic array
 
Dynamic memory allocation in c
Dynamic memory allocation in cDynamic memory allocation in c
Dynamic memory allocation in c
 
TF.data & Eager Execution
TF.data & Eager ExecutionTF.data & Eager Execution
TF.data & Eager Execution
 
Complier
ComplierComplier
Complier
 
Dynamic Memory Allocation(DMA)
Dynamic Memory Allocation(DMA)Dynamic Memory Allocation(DMA)
Dynamic Memory Allocation(DMA)
 
Clojure - Revenge of the Verbs
Clojure - Revenge of the VerbsClojure - Revenge of the Verbs
Clojure - Revenge of the Verbs
 
tf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input Pipelinetf.data: TensorFlow Input Pipeline
tf.data: TensorFlow Input Pipeline
 

Viewers also liked

Introduction to Tiny OS
Introduction to Tiny OSIntroduction to Tiny OS
Introduction to Tiny OS
Sudharsan S
 

Viewers also liked (16)

Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
Building the Internet of Things with Thingsquare and Contiki - day 1, part 2
 
Building day 2 upload Building the Internet of Things with Thingsquare and ...
Building day 2   upload Building the Internet of Things with Thingsquare and ...Building day 2   upload Building the Internet of Things with Thingsquare and ...
Building day 2 upload Building the Internet of Things with Thingsquare and ...
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
Building the Internet of Things with Thingsquare and Contiki - day 2 part 1
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
Building the Internet of Things with Thingsquare and Contiki - day 1, part 3
 
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
Building the Internet of Things with Thingsquare and Contiki - day 1, part 1
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
Building the Internet of Things with Thingsquare and Contiki - day 2 part 2
 
Contiki Presentation
Contiki PresentationContiki Presentation
Contiki Presentation
 
Contiki Operating system tutorial
Contiki Operating system tutorialContiki Operating system tutorial
Contiki Operating system tutorial
 
protothread and its usage in contiki OS
protothread and its usage in contiki OSprotothread and its usage in contiki OS
protothread and its usage in contiki OS
 
Contiki introduction I.
Contiki introduction I.Contiki introduction I.
Contiki introduction I.
 
Contiki os timer tutorial
Contiki os timer tutorialContiki os timer tutorial
Contiki os timer tutorial
 
Implementing Lightweight Networking
Implementing Lightweight NetworkingImplementing Lightweight Networking
Implementing Lightweight Networking
 
Implementing Lightweight Networking
Implementing Lightweight NetworkingImplementing Lightweight Networking
Implementing Lightweight Networking
 
Introduction to Tiny OS
Introduction to Tiny OSIntroduction to Tiny OS
Introduction to Tiny OS
 

Similar to Advanced Internet of Things firmware engineering with Thingsquare and Contiki - day 1, part 3

Laboratory 04 Circularly Linked ListDownload the following files.docx
Laboratory 04 Circularly Linked ListDownload the following files.docxLaboratory 04 Circularly Linked ListDownload the following files.docx
Laboratory 04 Circularly Linked ListDownload the following files.docx
festockton
 
Ctutorial-Pointers 1.ppt
Ctutorial-Pointers 1.pptCtutorial-Pointers 1.ppt
Ctutorial-Pointers 1.ppt
DEEPAK948083
 
Array , Structure and Basic Algorithms.pptx
Array , Structure and Basic Algorithms.pptxArray , Structure and Basic Algorithms.pptx
Array , Structure and Basic Algorithms.pptx
MrNikhilMohanShinde
 
11 Introduction to lists.pptx
11 Introduction to lists.pptx11 Introduction to lists.pptx
11 Introduction to lists.pptx
ssuser8e50d8
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
kalai75
 

Similar to Advanced Internet of Things firmware engineering with Thingsquare and Contiki - day 1, part 3 (20)

ch08.ppt
ch08.pptch08.ppt
ch08.ppt
 
Laboratory 04 Circularly Linked ListDownload the following files.docx
Laboratory 04 Circularly Linked ListDownload the following files.docxLaboratory 04 Circularly Linked ListDownload the following files.docx
Laboratory 04 Circularly Linked ListDownload the following files.docx
 
UNIT 3a.pptx
UNIT 3a.pptxUNIT 3a.pptx
UNIT 3a.pptx
 
exp2-sparse.pptx
exp2-sparse.pptxexp2-sparse.pptx
exp2-sparse.pptx
 
PYTHON.pptx
PYTHON.pptxPYTHON.pptx
PYTHON.pptx
 
06 linked list
06 linked list06 linked list
06 linked list
 
dynamic-allocation.pdf
dynamic-allocation.pdfdynamic-allocation.pdf
dynamic-allocation.pdf
 
Ctutorial-Pointers 1.ppt
Ctutorial-Pointers 1.pptCtutorial-Pointers 1.ppt
Ctutorial-Pointers 1.ppt
 
Array , Structure and Basic Algorithms.pptx
Array , Structure and Basic Algorithms.pptxArray , Structure and Basic Algorithms.pptx
Array , Structure and Basic Algorithms.pptx
 
C Programming - Refresher - Part III
C Programming - Refresher - Part IIIC Programming - Refresher - Part III
C Programming - Refresher - Part III
 
Pointers and Memory Allocation ESC101.pptx
Pointers and Memory Allocation ESC101.pptxPointers and Memory Allocation ESC101.pptx
Pointers and Memory Allocation ESC101.pptx
 
C language introduction
C language introduction C language introduction
C language introduction
 
11 Introduction to lists.pptx
11 Introduction to lists.pptx11 Introduction to lists.pptx
11 Introduction to lists.pptx
 
Chp4(ref dynamic)
Chp4(ref dynamic)Chp4(ref dynamic)
Chp4(ref dynamic)
 
L 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptxL 5 Numpy final ppt kirti.pptx
L 5 Numpy final ppt kirti.pptx
 
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptxQ-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
Q-Step_WS_06112019_Data_Analysis_and_visualisation_with_Python.pptx
 
Programming in C sesion 2
Programming in C sesion 2Programming in C sesion 2
Programming in C sesion 2
 
Introduction linked list
Introduction linked listIntroduction linked list
Introduction linked list
 
C programming day#2.
C programming day#2.C programming day#2.
C programming day#2.
 
NumPy.pptx
NumPy.pptxNumPy.pptx
NumPy.pptx
 

Recently uploaded

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Recently uploaded (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 

Advanced Internet of Things firmware engineering with Thingsquare and Contiki - day 1, part 3

  • 2. Contiki ringbuf • Interrupt-safe way to pass bytes from interrupt to non-interrupt code • Ring buffer size must be even power of two • Ring buffer can only pass bytes (uint8_t)
  • 3. ringbuf Void ringbuf_init (struct ringbuf *r, uint8_t *a, uint8_t size_power_of_two); int ringbuf_put (struct ringbuf *r, uint8_t c); int ringbuf_get (struct ringbuf *r); int ringbuf_size (struct ringbuf *r); int ringbuf_elements (struct ringbuf *r);
  • 4. The list library • Convenient way to keep arbitrary structs on a list • Only requirement is a ->next pointer at beginning of the struct • Example: struct my_data { struct my_data *next; int some_data; uint8_t more_data[8]; }
  • 6. The list library void list_init (list_t list) Initialize a list. void *list_head (list_t list) Get a pointer to the first element of a list. void list_push (list_t list, void *item) Add an item to the start of the list. void *list_pop (list_t list) Remove the first object on a list. void *list_item_next (void *item) Get the next item following this item.
  • 7. The list library #include "lib/list.h" struct example_list_struct { struct *next; int number; }; LIST(example_list); static void my_function(void) { struct example_list_struct *s; list_init(example_list); list_add(example_list, &element1); list_add(example_list, &element2); for(s = list_head(example_list); s != NULL; s = list_item_next(s)) { printf("List element number %dn", s->number); } }
  • 8. The memb library • Manage a chunk of memory • A fixed set of structs that can be allocated and deallocated • Size of set specified at compile time
  • 9. The memb library • MEMB(name, structure, num) – Declare a memory block. • void memb_init(struct memb *m) – Initialize a memory block. • void *memb_alloc(struct memb *m) – Allocate a memory block. • int memb_free(struct memb *m, void *ptr) – Free a memory block.
  • 10. The memb library struct my_structure { int a, b; } MEMB(my_mem, struct my_structure, NUM_STRUCTS); static void my_function(void) { memb_init(&my_mem); struct my_structure *s = memb_alloc(&my_mem); memb_free(s); }
  • 11. Memory allocation with a list • Typical usage pattern: – Allocate memory from memb – Maintain on a list • Makes it easy to keep track of things to deallocate them later
  • 12. Memory allocation with a list struct example_num { struct example_num *next; int num; }; #define MAX_NUMS 16 LIST(num_table); MEMB(num_mem, struct example_num, MAX_NUMS); void init_num(void) { memb_init(&num_mem); list_init(neighbor_table); }
  • 13. Memory allocation with a list void add_num(int num) { e = memb_alloc(&neighbor_mem); if(e != NULL) { e->num = num; list_add(num_table, e); } } struct example_num { void remove_num(struct example_num *e) { list_remove(num_table, e); memb_free(&num_mem, e); }
  • 14. Memory allocation with a list struct example_num *find_num(int num) { struct example_num *n; for(n = list_head(num_table); n != NULL; n = list_element_next(n)) { if(n->num == num) { return n; } } return NULL; }
  • 15. The mmem library • Managed memory allcator • Maintains a fragmentation-free memory area • Sometimes useful • Somewhat tricky to use
  • 17. The mmem library • MMEM_PTR(m) – Provide a pointer to managed memory. • int mmem_alloc(struct mmem *m, unsigned int size) – Allocated managed memory. • void mmem_free(struct mmem *) – Free managed memory. • void mmem_init(void) – Initialize the managed memory library.
  • 18. The lower layers of the netstack
  • 19. The radio driver • Input – Read packet from the radio into packetbuf – Call NETSTACK_RDC.input(); • Output – Prepare radio for sending • NETSTACK_RADIO.prepare() – Send the packet • NETSTACK_RADIO.transmit()
  • 20. Radio driver gotchas • Radio driver works in two layers – Interrupt context – Contiki context • SPI bus must be protected – Disable interrupts during an SPI transfer • Radio core must be protected – Maintain flag to avoid interrupts when radio driver is active
  • 21. Radio driver energy estimator • The Contiki energest module keeps track of energy consumption – – – – ENERGEST_ON(ENERGEST_TYPE_LISTEN); ENERGEST_OFF(ENERGEST_TYPE_LISTEN); ENERGEST_ON(ENERGEST_TYPE_TRANSMIT); ENERGEST_OFF(ENERGEST_TYPE_TRANSMIT);
  • 22. queuebufs • “Enough” queuebufs are needed • Difficult to say beforehand how many that is • Trial and error may be needed
  • 24. Build big-red-button.c as a firmware image • • • • • Copy big-red-button.c from demo.thsq.io Compile and upload on the hardware Connect the button Sniff the packets on screen Code walk-through