ami: added packet loop for pb_test