This is my arduino code.If
#define rxPin 0
#define txPin 1
you get everything to work with the USB cable, and
you are using hardware
serial, it should
mean that your code is kosher. But here, things might not be so clear, as you are using pins 0,1 - the hardware serial pins - as software serial. This cannot be a good idea and I submit you need to make one of two choices.
1. In the unlikely event that you have good reason to use software serial, define and use some other pins for that purpose, or
2. Ditch software serial and use pins 0,1 for hardware serial as God and Arduino intended.
In the latter course, you can prove your code is kosher by using the serial monitor, but you need to disconnect Bluetooth as you do so.