Open gitaeuber opened 6 years ago
Patches are welcome. Do you think you could contribute something?
Patches are welcome. Do you think you could contribute something?
I don't think I'm able to contribute useful code. I'm not really a coder. Sorry.
Is a patch for this even actually welcome? it seems way out of scope
Why not adding debug and analyze code to the library, for example in a tools-dir? We could still debate on a patch once it's there. IMHO.
Hi there!
This is a try to introduce a function for sniffing on a serial line. It isn't complete yet.
The attached diff is a patch against
#define LIBMODBUS_VERSION 3.1.4
What do you think about this?
I get compiling errors I can't resolve. Could you help me?
.libs/modbus-data.o:(.data.rel.local+0x0): multiple definition of `ucl_msg_type'
.libs/modbus.o:(.data.rel.local+0x0): first defined here
.libs/modbus-rtu.o:(.data.rel.local+0x0): multiple definition of `ucl_msg_type'
.libs/modbus.o:/tmp/libmodbus/src/modbus.c:45: first defined here
.libs/modbus-tcp.o:(.data.rel.local+0x0): multiple definition of `ucl_msg_type'
.libs/modbus.o:/tmp/libmodbus/src/modbus.c:45: first defined here
collect2: error: ld returned 1 exit status
Makefile:447: recipe for target 'libmodbus.la' failed
make[2]: *** [libmodbus.la] Error 1
Makefile:500: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
Makefile:386: recipe for target 'all' failed
make: *** [all] Error 2
Thanks and best regards Lars sniff_serial.diff.gz
PS: Is there an open mailinglist somewhere? I don't have a google account and don't want one.
Please use Github's Pull-request feature for code-reviews. (Clone this repo onto your account, push to it and then "Create Pull Request")
Hi,
I'm not sure if understood you correctly. Here is a pull request I managed to create against my own repo: https://github.com/gitaeuber/libmodbus/pull/1 I could not manage to create a pull request to the original libmodbus repo. And I don't like to do this either, because the patch doesn't compile.
Thanks
Just mention in your PR that it doesn't work and that you just want a review. People are generally nice here because all useful contribution efforts are seen as a great thing.
I managed to make a pull request. I had to fork the repo to my account first. Thanks
That's what I wanted to say with clone to your account. Fork is the right word.
Hello
I've got a use case where I need to monitor traffic between two endpoints without putting additional traffic on the bus Has this functionality been made available in the general library?
QModMaster uses two custom callbacks to implement Bus Monitor functionality:
modbus.c --> send_msg() --> busMonitorRawRequestData()
//***Not part of libmodbus - added for QModMaster***//
busMonitorRawRequestData(msg, msg_length);
modbus.c --> _modbus_receive_msg() --> busMonitorRawResponseData()
//***Not part of libmodbus - added for QModMaster***//
busMonitorRawResponseData(msg, msg_length);
Do you think it makes sense to add registration of such callbacks? For example, something like this:
typedef void modbus_raw_monitor_handler(uint8_t* data, int len);
int modbus_add_raw_request_monitor(modbus_raw_monitor_handler* handler);
int modbus_add_raw_response_monitor(modbus_raw_monitor_handler* handler);
Hi everybody,
for the network modbus there is the wireshark tool for sniffing. But there is none for the serial line (RS485) for the (Linux) console afaik.
Please add some functions to sniff the protokoll on serial lines. Maybe some functions like: modbus_sniff(ctx) that could be called by modbus_sniff_and_parse(ctx)
Thanks a lot and best regards.