If your Python code works for the same channel, then the problem is most likely in the steps leading up to your while loop (since you say you receive PINGs fine).
If your Python code works for the same channel, then the problem is most likely in the steps leading up to your while loop (since you say you receive PINGs fine).