Bluetooth Module connection

walterf25

Expert
Licensed User
Longtime User
Hello everyone, i'm working on a project which consists in communicating with an RN-41 bluetooth module with SPP protocol, i remember being able to connect to it before with my HTC Hero device, i now have a Motorola Photon 4G and i'm trying to connect to the module but everytime i try to do it i get a message that says "Connection Refused", i've never seen this error before, maybe someone here has seen this issue and has been able to figure out why?

below is the log i get when this happens, by the way i'm using the bluetooth example provided by Erel, I really hope is not an issue with the phone, although i'm able to see the module's mac address from my phone and even pair with it but can not connect to it, help anyone!


thanks,
Walter
 

walterf25

Expert
Licensed User
Longtime User
Bluetooth

Ok, i just tried the old version of bluetooth example and when i try to connect to my RN-41 bluetooth module i get a java.io.exception Service Discovery Failed error, and then when i initialize the connection process with the RN-41 module it connects just fine even though i first receive the above mentioned error, what is going on, i don't really understand what the difference is, i can now send data from a hyperterminal to the phone through the RN-41 module, but i can't send any data back from the phone to the RN-41 module, why is that?

hope anyone can help me figure this out! :sign0085:

thanks,
Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Bluetooth module

Hi Erel thanks for the suggestion, i have already tried that and it still gives me the same issue what is the difference between the serial.connect and serial.connect3?

Thanks,
Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Bluetooth module

Hi Erel thanks for that link, and yes i did pair the devices first, it works with the old example if i initiate the connection with the RN-41 module.
 
Upvote 0