Text this: Opportunistic spectrum access algorithm based on cross-layer optimization