The first one is very close to other trees, so there is no practical way to keep the squirrels off -- they can jump from other trees or from the fence. And as a result, they have consistently stripped the tree of any nuts before they are ready for us to pick them.
The second one, on the other hand, is still fairly small and distant from other trees and the fence.
To keep the squirrels off of it, we tried first a collar (like a cone for a dog or cat) on the trunk, but that didn't stop them. So now we have put a metal stove pipe over the trunk.
We bought a 5 foot (length) by 4 inch (diameter) and then cut it down to 46 inches in length, to fit between the lowest branch and the trunk flare at the bottom. Its slippery surface should prevent squirrels from climbing up the trunk.
If this works, then we will have pecans!