Skip to content

Instantly share code, notes, and snippets.

View ixnisarg's full-sized avatar
🤔
thinking

GreatEel21st ixnisarg

🤔
thinking
  • india
View GitHub Profile
@JGrossholtz
JGrossholtz / modbus_rs232_master_client.c
Last active May 24, 2024 09:30
A sample libmodbus client / server (master/slave) using RS232 to request data from a modbus client (tested with libmodbus3.0.6)
#include <stdio.h>
#include <unistd.h>
#include <modbus.h>
#include <string.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/serial.h>
#include <asm/ioctls.h>
#define NB_REGS 2