Thanks for that. I didn't realize that you could specify more than two d's when debugging.
I just had a look in the code, and it'll handle basically any number of -d switches, it just increments a "debug level" counter.
In the code, where there's something that "could be" displayed, I simply display (or not) based on the value of that flag. It looks like I don't have anything that needs >2 (so -d and -dd).
Anyway figured it out. Gotta tell a story for some background first.
Always the way, for sure, and fully appreciate where you're coming from.
Once I disabled that port forward to 502 (which I no longer need), I was able to use NEWMODBUS via a PPtP VPN server running on the Mikrotik just fine:
I use (and have used) newmodbus over significant chunks of the internet. As long as the address (and port) are reachable, it just works.
(one of these days should set the time on the Classic, I guess, or is that the correct date shown in "european" format?) Time is correct...
printf(" %02d/%02d/%04d\n", midnite.date.day, midnite.date.month, midnite.date.year);
If I wanted to keep things such that I could still use MSView with the Morningstar, I suppose I could just change the Classic's
MODBUS port (I think it supports this) so that it isn't 502. But I see no option to tell NEWMODBUS about that. Will it just figure it out when it looks at the IP address?
Good point and fair question.
The framework is there for it:
int port=502; // modbus port number on classic
but I don't see anything that changes it. It'd be a pretty straightforward thing to add.
I don't really have the time to do it right now, but give me a whistle if it becomes urgent and I'll make time.
Just following though on the whole issue as a "just in case" exercise. I can still learn things after 60 yrs.
Thanks for the guidance.
No probs. Glad to assist.