It seems like you are describing smth similar to this: String values from app button to device
Is it?