@phaedrux Yea my problem was the USb cable I was using, apparently it was power only, I tried a thicker one and it worked, from my pc at least. I also tried it from the pi, but it keeps saying it could not communicate with the duet, at least it recognized it this time. So I just used my pc and now everything works fine, no more of that looping.
Thank you very much, I really appreciate you taking the time to help me.