... after a long research I noticed that it is needed a pull down resistor on pin 0 to make it work.Now it works flawlessly without any modification in the code.Without this pull down resistor at pin 0 the arduino can not read the data received through the BT shield.
Please enter a valid email to subscribe
We need to confirm your email address.
To complete the subscription, please click the link in the
email we just sent you.
Thank you for subscribing!
via Egeo 16