Optimal PHY and MAC protocols for power-limited ad-hoc networks