I don't know what the margin is on hardware, and I'm sure it varies significantly, but unless I'm missing something, assuming the 30% is revenue and $100 is the total:
Costs of 5% of a $100 are $5
$5/$30 is ~17% so net margin would be 100-17 = 83%
At 10% cost, net margin is 66%
At 20% cost, net margin is 33%
At 22.5% cost, net margin is 25%