I feel silly posting this, and it took me a while to work up the courage, but I can't communicate with mega2560s, if they're connected to a ramps1.4. This is new, several of these boards used to work. If this is an old subject, which I can't believe it's not, I apologize, believe me, I searched.
I can write sketches to the mega, and access it from the various printer software, if it's not plugged into a ramps.
I've tried different USB ports, on different hubs on the MB. I've tried at least 5 different Ramps boards, from different sources, even different revisions. Mega 2560 boards from elabs, Chinese Arduino counterfeits, and Chinese ch340 boards, all communicate, if it's not plugged into a ramps.
The Ramps test works fine, as long as I upload it without a ramps plugged into the mega.
The 12v from a computer supply is smooth and steady (no scope), and has no apparent effect on the problem whether it's connected or not. The current pots are all set around .5v, except one which required almost 1 to turn dependably in the ramps test (lower resistance than I usually buy). The 5v supply tends to be 4.5 to 4.9, when the supply's connected or not. I didn't check them all, I was mostly looking for power, but they never seem to be quite 5v, most around 4.8. The one at 4.5 made me wonder about a short, but the regulator wasn't hot, and it works on a USB.
In repetier, it usually says 'connected', and sometimes, if I send a command, it gets through, but causes the stepper to release while it's supposed to be moving. EN is low, and sleep, reset, and fault stay high, yet the stepper turns off completely while it's supposed to be turning, then locks again after 10 sec. (I set max rate low, so it takes 10 sec to go 10mm.) Sometimes I get a timeout after one command, but sometimes when I send multiple commands, they have no effect on the steppers, but I get endstop hit messages, so the processor is still running, and there's some communication. Repetier is the only program that gets a partial connection, and it shortly gets a time out. This is the only com' I've gotten between a host and the printer interface.
The stepper thing doesn't sound to me like a com problem (little I know though), but the voltage at the drv8825 holds steady. Haven't been able to put a scope to the driver control pins. The processor apparently thinking it's moving the motors, puzzles me if it's a com problem.
I loaded OctoPi on a raspberry pi. I shows 'connected' with no ramps, and just negotiates the baud rate till it says something like 'no usable baud rates found', with a ramps plugged in, powered or not. If I set the baud rate, it just times out. This is with a new raspberry pi, new ramps, new mega, marlin 1.1 downloaded and not changed at all. The only change to configuration.h being to lower the baud rate after the first try. I tried 115200, 57600,38400, and I think I might have tried 2400 once. Yes several different USB cables, including the one from my lazer printer. I did try marlin 2.0, with no difference.
If it means anything, I couldn't even get Arduino to connect in Ubuntu 18.04, but that could be my ignorance of Linux (the only thing I've failed to get connected to, though). After writing that, I went back into Ubuntu and uploaded a sketch without a ramps (don't think I'd tried it unplugged, before), and then one with a bare ramps board plugged in (first time since this started that I got a sketch to upload while plugged in), but it wouldn't do it a second time. Still can't get repetier to connect. get the message 'no start signal detected - forcing start', then 'Communication timeout - reset send buffer block'. Cura doesn't connect, but there's no way to tell whether it sees the ports, that I can tell. Ubuntu and windows both correctly identify the ch341, not that that means alot. Ponterface doesn't want to load today, for some reason.
Even though I seem to be able to reproduce this problem without fail, I can't seem to find anyone else with the same problem, when I search, although I'm poor at searches (can never think of the right search words).
I'm an experienced troubleshooter, but can't see something here, unless I've bought 6+ ramps boards with the same defect, from multiple suppliers, over more than a year.... They're cheap Chinese boards, but still, they mostly worked before. I have more ramps in sealed bags to experiment with, but am out of sealed mega2560s LOL (ruined one of the eLab ones yesterday).
My oscope is buried, and long unused (decades), and I haven't dug it out, though I have a cheap USB scope coming from china. I was in hopes one of you folks would be able to tell me what I'm doing, before I have to dig that deep.
Sorry for going on, but I want to reiterate, that as a sanity check, I got out brand new boards, in sealed anti-static, tried to get arduino to connect to them plugged together, failed, then programed with totally unmodified marlin (unplugged), only to have them exhibit exactly the same symptoms as the previous sets. Nothing connected but the 2 boards.
I'm probably overthinking this, and am going to feel silly when you tell me what I'm doing.