Page 1 of 34 1234567891011 ... LastLast
Results 1 to 10 of 339

Thread: BT Mobilephone Plugin

  1. #1
    Variable Bitrate Fox_Mulder's Avatar
    Join Date
    Apr 2004
    Location
    Melbourne, Australia The Truth Is Out There
    Posts
    319

    BT Mobilephone Plugin

    Hey guys,

    I've decided to release the plugin I wrote for myself to the public.

    Essentially its a bluetooth mobile phone plugin which has the following features:
    Phonebook download from the phone
    Pause/Resume Music based on call status
    Pause/Resume Music based on Siri status (for iPhone users)
    Siri Can be triggered through an RR command (In my setup I have a button via a car2pc adaptor mapped via ExecTBL.ini to trigger Siri)
    If you are on a phone call before entering the car, when RideRunner loads, the plugin will detect the phone is in a call and automatically pause the music
    If you manually dial a phone number using the phone keypad it still pauses and resumes the music when you are finished
    Phone is automatically reconnected upon disconnection
    And lastly phone audio is routed through the PC

    I have only included the source code and not a compiled DLL as this is not designed to be a production release, just for those that feel if existing bluetooth plugins don't meet their needs, then they can make their own!

    It is written in VB.NET and requires BlueSoleil. I have used this with BlueSoleil 8.0.395
    It does not use a wrapper DLL to call the BlueSoleil SDK, rather it interfaces directly with the BlueSoleil SDK DLL
    I used the documentation from http://www.bluesoleil.com/download/f..._UserGuide.pdf

    It requires that the phone mac address be inserted into the constructor of the BT class
    It requires that the phone be paired previously (this is for simplicity). The functionality is there within the BlueSoleil SDK to allow pairing on the fly.
    It is written using Visual Studio 2012.
    It has been tested on Windows 8 & Windows XP

    Credit to Lambo and his original bluetooth wrapper/plugin http://www.mp3car.com/rr-released-pl...ne-plugin.html which got me pointed towards the Bluesoleil SDK

    All I ask is if you do decide to release a plugin based on the code just give me a small mention

    If you have questions post away!

    Cheers,

    Asela
    Attached Files Attached Files
    Last edited by Fox_Mulder; 12-19-2012 at 12:58 AM.
    Fox Mulder
    2004 Toyota MR2
    Intel Dual Core 2.0Ghz 1Gb DDR2 160GB SATA2 M4ATX Xenarc 700TSV TS BU353 DiNovo Mini Car2PC ODBII Bluetooth HF 16x2 Character LCD

  2. #2
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    Thanks for this share !
    I have an error into the BT.vb class:
    phoneAddr(5) =
    phoneAddr(4) =
    phoneAddr(3) =
    phoneAddr(2) =
    phoneAddr(1) =
    phoneAddr(0) =
    I have commented these lines and i can to compile !

    and you can also add, if you want the menuitem property for the dynamics menus:
    Case "menuitem"
    Properties = Chr(34) + "LOAD;MOBILECALL.skin" + Chr(34) + ",MobilePhone,Icons\Phone.png,MobilePhone,MobilePh one is selected"

  3. #3
    Variable Bitrate Fox_Mulder's Avatar
    Join Date
    Apr 2004
    Location
    Melbourne, Australia The Truth Is Out There
    Posts
    319
    You have to place your phones mac address in for phoneAddr

    Like if your phones mac address is 00:11:22:33:44:55

    then you would have

    phoneAddr(5) = 0 '00
    phoneAddr(4) = 17 '11
    phoneAddr(3) = 34 '22
    phoneAddr(2) = 51 '33
    phoneAddr(1) = 68 '44
    phoneAddr(0) = 85 '55

    phoneAddr() has to be in decimal whereas your phones mac address in in hex. So a simple conversion between hex and decimal is needed

    http://www.statman.info/conversions/hexadecimal.html
    Last edited by Fox_Mulder; 12-10-2012 at 05:19 AM.
    Fox Mulder
    2004 Toyota MR2
    Intel Dual Core 2.0Ghz 1Gb DDR2 160GB SATA2 M4ATX Xenarc 700TSV TS BU353 DiNovo Mini Car2PC ODBII Bluetooth HF 16x2 Character LCD

  4. #4
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    What code do i add for load the contacts list with the pictures of contacts

  5. #5
    Variable Bitrate Fox_Mulder's Avatar
    Join Date
    Apr 2004
    Location
    Melbourne, Australia The Truth Is Out There
    Posts
    319
    To do that you will need to add a RR command to get the list of contacts in the RRExtension class. Contacts are stored as a list of type Contact in the BT class. I do not know of a way of transferring pictures off the phone for contacts. There seems to be an issue with my restoreConnection subroutine. It isn't actually really necessary unless the phone could possibly be paired with the computer before the plugin runs. I have updated the code attached in the first post.
    Fox Mulder
    2004 Toyota MR2
    Intel Dual Core 2.0Ghz 1Gb DDR2 160GB SATA2 M4ATX Xenarc 700TSV TS BU353 DiNovo Mini Car2PC ODBII Bluetooth HF 16x2 Character LCD

  6. #6
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    Quote Originally Posted by Fox_Mulder View Post
    To do that you will need to add a RR command to get the list of contacts in the RRExtension class. Contacts are stored as a list of type Contact in the BT class. I do not know of a way of transferring pictures off the phone for contacts. There seems to be an issue with my restoreConnection subroutine. It isn't actually really necessary unless the phone could possibly be paired with the computer before the plugin runs. I have updated the code attached in the first post.
    I know how to build a RR custom list, but i don't know how to use the contact class !

  7. #7
    Constant Bitrate eugenweij's Avatar
    Join Date
    Aug 2010
    Location
    Rozenburg, Netherlands
    Posts
    220
    this looks interesting , downloaded and will try it tomorrow
    View my worklog here

  8. #8
    FLAC
    Auto Apps:loading...
    EL CAMINO's Avatar
    Join Date
    Jul 2005
    Location
    upland california us
    Posts
    1,283
    nice plugin, im having some issues to connect to my phone, in a quick test im able to connect to phone, see phone name, and some other info, using .Dial(13234) doesnt seem to work for me. like i said a quick test. and outside RR, i import youre BT.vb Phonebook.vb and contact.vb to a test form. what i did was change the constructor sub


    Code:
      Public Sub New(ByVal Address() As Byte)
            name = "MR2"
            initVars()
            agService = BTSDK_INVALID_HANDLE
            hfService = BTSDK_INVALID_HANDLE
    
            ' Set phone_addr Here
            phoneAddr = Address
    
            'Prevent Garbage Collection
            connEventGlobal = AddressOf connEvent
            hfEventGlobal = AddressOf hfEvent
    
            threadWaitForPhone = New Thread(AddressOf waitForPhone)
            threadWaitForPhone.IsBackground = True
            threadWaitForPhone.Start()
    
        End Sub
    and on my form load i use this.


    Code:
     
     Dim Mac As String = "D4:20:6D:35:C2:80"
     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles Me.Load
            Try
                Dim Mac() As String = Me.Mac.Split(CChar(":"))
                Dim ADDRS(6) As Byte 
                For i As Integer = 5 To 0 Step -1
                    ADDRS(i) = CByte("&H" & Mac(i))
                Next
                BT = New BT(ADDRS)
            Catch ex As Exception
           
            End Try
    
        End Sub
    Last edited by EL CAMINO; 12-24-2012 at 01:52 PM.

  9. #9
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    I have done the same change that EL CAMINO into my plugin but i can't connect my phone !

    code changed into the BT.vb class:
    Code:
      Public Sub New(ByVal Address() As Byte)
            name = "MR2"
            initVars()
            agService = BTSDK_INVALID_HANDLE
            hfService = BTSDK_INVALID_HANDLE
    
            ' Set phone_addr Here
            phoneAddr = Address
    
            'Prevent Garbage Collection
            connEventGlobal = AddressOf connEvent
            hfEventGlobal = AddressOf hfEvent
    
            threadWaitForPhone = New Thread(AddressOf waitForPhone)
            threadWaitForPhone.IsBackground = True
            threadWaitForPhone.Start()
    
        End Sub
    and

    and this code into the RRExtension.vb class:
    Code:
        Public Sub Initialize(ByRef pluginDataPath As String)
    
            On Error Resume Next
            If Directory.Exists(pluginDataPath) = False Then Directory.CreateDirectory(pluginDataPath)
    
            Dim Mac As String = "44:4E:1A:1C:C6:15"
            Dim dt() As String = Mac.Split(CChar(":"))
            Dim ADDRS(6) As Byte
            For i As Integer = 5 To 0 Step -1
                ADDRS(i) = CByte("&H" & dt(i))
            Next
            bluetooth = New BT(ADDRS)
    
        End Sub

  10. #10
    Raw Wave pierrotm777's Avatar
    Join Date
    May 2008
    Location
    Bordeaux, France
    Posts
    2,870
    I play with this plugin source and i don't understand why the plugin return nothing for:
    phoneModel
    phoneManufacturer

    An idea please ?

Page 1 of 34 1234567891011 ... LastLast

Similar Threads

  1. .net Bluetooth Mobilephone Plugin
    By lambosprit in forum RR Released Plugins
    Replies: 1339
    Last Post: Today, 03:10 AM
  2. Andrea Stereo USB mic SUMA & Mobilephone Plugin
    By Paul Murray in forum Road Runner
    Replies: 3
    Last Post: 09-06-2011, 06:37 PM
  3. for Mobilephone Plugin,help!
    By wy_nb in forum Road Runner
    Replies: 4
    Last Post: 12-22-2009, 07:23 PM
  4. Mobilephone Plugin help
    By Joshc8503 in forum RR Plugins
    Replies: 0
    Last Post: 12-21-2009, 09:44 AM
  5. MobilePhone v1.0.0.2 (alpha)
    By Lucifer in forum RR Plugins No Longer Supported
    Replies: 18
    Last Post: 02-19-2009, 04:27 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •