Shop OBEX P1 Docs P2 Docs Learn Events
Bluetooth module — Parallax Forums

Bluetooth module

ktastktast Posts: 2
edited 2013-05-10 11:45 in Accessories
Good evening to the forum,

First of all i must say that i m beginner in electronics.....and because i want to get better in electronics i figure that the best way to to do this is to build my own project...! and here it is..:

I live in a complex building with 18 apartments and all of us we are sharing the same garage door, and because the door repaired needs 100euro to make a copy of the remote control, i want to make a bluetooth receiver door opener which is able to pair more than 18 devices (cellphones) one at a time.

So

The receiver must paired with all the phone of the residents of the apartments who have adroid or iphone cell phone, and if somone want to open the door, just launch the application (which my mate can build it), the application connect with the bluetooth module and sents a command to the bluetooth module to open the door. And in order to execute the command i connect the TX of the module with a transistor, so when tx is up the door opens. My problem is that :


I search in the internet and i found some solutions but the have limitations in the pairing list, for example RN42 keeps only the last 8 pairings etc., and for any other bluetooth module i can not find how many devices (mac adresses) can store.

I hope that i dont confuse us and i look forward for your answer....

Every comment about the design is acceptable.

Thannk you in advance!!!

PS : I apologize about my English...I m from Greece

Comments

  • SRLMSRLM Posts: 5,045
    edited 2013-05-10 09:51
    I think the easiest thing to do would be to have several RN-41 devices. If you have three then that's 24 "channels" of Bluetooth.

    I'd be wary of something as simple as "if tx/rx, then open door." It wouldn't be hard to just connect to random Bluetooth devices and get it to open. I'll have to look through the RN-41 datasheet, but it may have some useful security features (although I suspect limited), and I think it has some GPIO that you could use (via the bluetooth) to control the motors (via relays).

    ps: Welcome to the forums!
  • ktastktast Posts: 2
    edited 2013-05-10 11:19
    SRLM, thank you for your quick response!!!!!

    If i have 3 RN-42 Devices, i think that is more difficult to build the celphone application, because we have 3 bluetooth modules to find and connect..

    Can we have another solution....??

    If we use an andruino or a RasberryPi with a bluetooth module.... and two buttons one for pairing (like bluetooth headset) and store the mac address in the memory, and the other button to delete... and every time you connect with the module, checks the mac address of the paired device in the memory, an if it is in the memory opens the door.....????

    Can somethink like this work??
  • Mike GreenMike Green Posts: 23,101
    edited 2013-05-10 11:31
    The RN-42 devices can't be used with the iPhone. The RN-42 devices use a protocol called SPP (serial port profile) which emulates a conventional asynchronous serial port with flow control. The iPhone does not understand this and the RN-42 doesn't understand the other serial protocols that the iPhone does support.

    The RN-XV is a WiFi module that fits in an xBee module socket. It can be set up to use an existing WiFi network in a building or it can be configured to set up a "private" WiFi network (ad hoc network). You can have any number of devices (including Android and iPhone) send a packet to it using the UDP protocol. This packet can contain any information. In your case, you'd have some private code, unique to each user, to open or close the door.
  • SRLMSRLM Posts: 5,045
    edited 2013-05-10 11:40
    ktast wrote: »
    SRLM, thank you for your quick response!!!!!

    If i have 3 RN-42 Devices, i think that is more difficult to build the celphone application, because we have 3 bluetooth modules to find and connect..

    Can we have another solution....??

    If we use an andruino or a RasberryPi with a bluetooth module.... and two buttons one for pairing (like bluetooth headset) and store the mac address in the memory, and the other button to delete... and every time you connect with the module, checks the mac address of the paired device in the memory, an if it is in the memory opens the door.....????

    Can somethink like this work??

    I don't think additional bluetooth modules would make it more difficult. With Android, before you can connect to a bluetooth device, you have to pair with it. The pairing process only has to be done once, and then your clients don't need to worry about which device they connect to ever again. You could name the devices something like:
    Garage - Residents Floor 1
    Garage - Residents Floor 2
    Garage - Residents Floor 3
    

    Then, you just have them select the correct floor to pair with and it's done. No more worrying about that bit, and to the Android App it doesn't matter if there is one or three: each instance of the app is only aware of one paired device anyway.

    In case you haven't seen it, here is the Android Bluetooth page: http://developer.android.com/guide/topics/connectivity/bluetooth.html

    The problem with having only one device that has less than your 18 pairing memory spots is that your clients will be constantly fighting to have the most recent pairs. Those that haven't been through the process recently will have to repair, in turn booting out somebody else. The pairing process isn't difficult, but it's annoying to the user and takes a little while. I'd avoid repeated pairing if at all possible.

    BTW, the pairing (with the RN-41/42) is done onboard the module itself. You'll have to look at the datasheet for a definitive answer, but I don't think you can do that onboard the host processor.

    You could also look at a cell phone receiver (such as this: http://store.3drobotics.com/products/dronecell). With that system, I'm thinking that the user could send a text to the number and it would open the gate. Of course, the text would have to be encrypted, but that wouldn't be a problem on Android (and you can have your app do all of that in the background). The main downside that I see is that your users could open the gate when they are not located close by, either maliciously or unintentionally. You could get around this by using the location based services, but it's a bit of a hack. Anyway, I'm just throwing this idea out there.
  • SRLMSRLM Posts: 5,045
    edited 2013-05-10 11:45
    Mike Green wrote: »
    The RN-42 devices can't be used with the iPhone. The RN-42 devices use a protocol called SPP (serial port profile) which emulates a conventional asynchronous serial port with flow control. The iPhone does not understand this and the RN-42 doesn't understand the other serial protocols that the iPhone does support.

    Actually, it looks like you can use a special version of the RN-41/42 devices with Apple products. According to their brief, it looks like it's roughly plug and play (once you are registered for the MFi program). It also mentions a single Apple device pair connection, though. On the upside, it supports dual stacks so you could still have you SPP profile for Android.

    www.rovingnetworks.com/resources/download/117/RN41APL_RN42APL

    The Wifi idea is a good one.
Sign In or Register to comment.