BT and Java - Btl2Cap Connection (Mobile phone and Digital Pen)

Hi!
First a short Introduction:
For a project I have to stream data from Maxell Penit DP201(4.1) to a mobile device (over a midlet). Data Connection is built up over Bluetooth.
My Questions are: Is btl2cap the right method for connecting digital pen and mobile phone?
If yes, is the btl2cap string correct?
The pens device adress is 00-07-CF-56-05-5D
Does anyone know a sample application like this I want to program?
Structure;
package /
Midlet
Class extending thread
Here's the code:
public void run() {
    //Bluetooth
    //String connString = "btspp://0007808303AA:1;master=false";
    String connString = "btl2cap://localhost:0007cf56055d;ReceiveMTU=512;TransmitMTU=512";
    System.out.println(connString);
    try {
            LocalDevice local = LocalDevice.getLocalDevice( ) ;
// build ServiceRecord
            local.setDiscoverable(DiscoveryAgent.GIAC);
L2CAPConnectionNotifier service = (L2CAPConnectionNotifier)
Connector.open(connString);
ServiceRecord sr = local.getRecord(service);
// accept Connection
L2CAPConnection connection = (L2CAPConnection ) service.acceptAndOpen( );
        } catch (Exception e) {
            e.printStackTrace();
        }Thanks to all who can help me to reach the next step in my project.
Best regards

Hi,
The reason for the compilation error is that the IDE is not able to find the jar file where bluetooth api is packed. try to put the jar file in lib directory of the project. Some IDE generates class files even though there are some compilation errors in java file.
So it is better to resolve compilation errors before putting it in the device.
The reason why the app freezes in the device is that you have not used a seperate thread to do the inquiry, try to use a thread where the inquiry will be done so that the apps main thread will respond to the user input.
Hope this help you.

Similar Messages

  • Connecting Flash with Java inside a mobile phone

    Hello,
    I'm working on a TBOT project that is running on Java on
    mobile phones, and we have been pondering the possibilities of
    making the UI with Flash Lite 2.0. Currently we are thinking of
    using XML / textfiles to get the data to FL from the java, but
    sending data back to the Java client inside the mobile phone is
    something I have no experience of, and was wondering if it is
    possible even?
    Basically can a FL application connect with / contact other
    applications / services in the same mobile phone? EG. Sending data
    to somewhere in a mobile phone? Or can the Java somehow intercept
    stuff Flash lite sends out for example?
    Thank you for all your help.
    Cheers
    Niilo

    I think you will be happier if you go about it through Bluetooth. I had a dongle for my Ibook 1.2 and now my Ibook 1.33 is bluetooth enabled.
    I use Verizon and have a Motorola V710 (bluetooth) . The connection works perfect everytime! I am disappointed that this new model Verizon phone does not support Isync. To sync data from the computer to the phone. I did find that Verizon was not very helpful as they don't seem to know much about Macs. I had to find out on how to connect via Google. Good luck! Geof

  • How do I use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?

    We are attempting to use SharePoint 2010 in combination with Exchange 2010 to implement shared calendars and contact lists throughout our organization.  We are able to connect the lists to Outlook 2010, but have been unsuccessful in viewing
    the calendars and contact lists from our mobile phones.  How do we use Active Sync to view SharePoint Lists (Contacts and Calendars) on a Mobile Phone?
    In trying to answer this question, we have come across a few different possibilities, all of them falling just short of a long term solution for us.  After doing research, we found that Active Sync will only show the default folders of the account.  To
    solve this, we downloaded an Add-In for Outlook (CodeTwo FolderSync) to synchronize folders and synchronized our SharePoint list with a new Contact list in the default folder.  The issue we came across with this method is that the Add-In we are using
    is not capable of automatic synchronization.  There is a button and it must be clicked after every update is made, which is not ideal for our solution.  We then went to the company (CodeTwo) and found server side software (Exchange Sync) that they
    offer which will automatically synchronize the folders.  After installing that on the Exchange Server, we now are running into the issue of not being able to locate the SharePoint lists on the Exchange Server.
    Does anyone happen to know how we can get to the SharePoint lists from the Exchange Server?  Has anyone else been able to use shared contacts lists and calendars from SharePoint on their mobile phones using Active Sync?  If so, are we in the right
    direction with what we have found so far?
    Thanks,
    Brad

    You cannot use ActiveSync for that, but there are SharePoint clients for the iPhone. Windows Mobile 7 natively supports SharePoint with SharePoint Workspace Mobile, part of Microsoft Office Mobile. Android and BlackBerry might also have some apps.
    Use Microsoft SharePoint Workspace Mobile
    http://www.microsoft.com/windowsphone/en-us/howto/wp7/office/use-office-sharepoint-workspace-mobile.aspx
    iPhone SharePoint Apps Shootout
    http://www.codeproject.com/KB/iPhone/iPhoneSharePointApps.aspx 
    Comparing SharePoint iPhone Apps
    http://blog.praecipio.com/2010/11/02/comparing-sharepoint-iphone-apps/
    MCTS: Messaging | MCSE: S+M

  • Software for mobile phone and the G4

    I have recently obtained a Panansonic GD87 mobile phone and would like to transfer images and data from it to my G4. I contacted Panasonic and they stated that the GD87 is not compatible with Mac.
    Does anyone know if there is any software which can enable me to connect the phone to my G4 please?
    Thanks in advance!

    if its bluetooth enabled, just use bluetooth (you'd need to buy a third-party adaptor), you can google app called Nokia Collector i heard that works with some phones outside nokia (although it fails to work with my nokia 6682 which is really annoying)

  • Different Bluetooth connections for phone and music streaming

    Can I have different Bluetooth connections for phone and music streaming functions on my 4s? If I can is there a way that the will automatically select (remember) the proper bluetooth receiver?

    TDMA interference, and is a type of RFI (Radio Frequency Interference) unique to GSM mobile phones. It affects all GSM mobile phones, but is not harmful to you or your electronics. It is just an audible indicator of network activity.
    GSM mobile phones generate this interference when they communicate with the cellular network. You don't need to be actively using the phone, as it constantly accessing the network to check signal strength, synchronize the clock, or perform other network-related tasks. The only way to stop this interference is to turn off the phone or its network capabilities. For example, by using Airplane Mode.

  • I am trying to transfer pictures and music from my phone to my computer, and when I connect my phone, it says Device not installed correctly. I can not see my files or nothing. What can I do?

    I am trying to transfer pictures and music from my phone to my computer, and when I connect my phone, it says Device not installed correctly. I can not see my files or nothing. What can I do?

    Try downloading these http://www.samsung.com/us/support/owners/product/SCH-I535MBBVZW
    or searching for it here Verizon Wireless Cell Phones - Verizon Wireless Accessories | Samsung

  • Hi,  I had an update massage for a wile on my phone and yesterday I decided to do the update and so I downloaded the soft w. and started to install but in the middle of the process the phone got stocked and said to connect to iTunes and so i did it a

    Hi,
    I had an update massage for a wile on my phone and yesterday I decided to do the update and so I downloaded the soft w. and started to install but in the middle of the process the phone got stocked and said to connect to iTunes and so i did it and again the process gets interrupted first saying "the software on Iphone needs to be restored to factory settings or update" and so i do it..then it comes the message the an error -39 and I can not do it and it says that I need to restore..and so I do it..but its a circle and it never ends..and I have no phone since yesterday.. all my contacts, my work..
    Can any one help please?

    Hi
    A little information will be of a great help, witch iPhone did you upgrade, memory , and version of software ( iOS 8.x.x )?
    Try restarting you iPhone and make sure you have a god internet connection , get as close to your wifi router (1-3 meter / 2-9 feet ) as possible. Don't use restore to factory  settings before you tried other options .  And most imported du you have an iCloud backup.
    //Sorenc

  • I need help my computer isn't working and there is no was to get on my iTunes and I just updated my phone and now it's stuck on where it shows the plug connected to iTunes help!!!!

    I need help my computer isn't working and there is no was to get on my iTunes and I just updated my phone and now it's stuck on where it shows the plug connected to iTunes help!!!!

    There is no other way than to plug into a computer to restore the phone. You can use another computer to do so, but in case you did not back up to iCloud your data and settings will be gone.
    Follow this article to connect in recovery mode:
    iOS: Unable to update or restore

  • When i back up an iphone on itunes does it save my social network passwords and stuff so when i connect another phone and sync it it'll all be there and i won't have to sign into everything again?

    when i back up an iphone on itunes does it save my social network passwords and stuff so when i connect another phone and sync it it'll all be there and i won't have to sign into everything again? because, i don't know most of my passwords im just signed in to everything on my phone but i'm getting a new one.
    please help

    Hey menaelraghy,
    Thanks for the question. The following resource outlines what is backed up, you may be interested in this section:
    iTunes: About iOS backups
    http://support.apple.com/kb/HT4946
    - Keychain (includes email account passwords, Wi-Fi passwords, and passwords you enter into websites and some applications)
    If you encrypt the backup, you can transfer the keychain information to the new device. With an unencrypted backup, you can restore the keychain only to the same iOS device. If you're restoring to a new device with an unencrypted backup, you need to enter these passwords again.
    Thanks,
    Matt M.

  • I had to upgrade from ios7 to ios8 but it needed more storage than i had so i backed up my phone to my computer then deleted the content on my phone and upgraded to ios8.  i have not connect my phone and computer since.  how do i get my content back?

    i had to upgrade from ios7 to ios8 but it needed more storage  i had so i backed up my phone to my computer then deleted the content on my phone and upgraded to ios8.  i have not connect my phone and computer since.  how do i get my content back? 

    Restore the backup from your computer

  • I am using iphone 3gs since last 4 days. Till yesterday night it was working fine and i have connected this phone for charging . Morning there was apple logo in the screen and every 1mte (approx) it is blinking. I could not restart the phone.Plz help

    I am using iphone 3gs since last 4 days. Till yesterday night it was working fine and i have connected this phone for charging . Morning there was apple logo in the screen and every 1mte (approx) it is blinking. I could not restart the phone.Plz help . I have tried to reset even by pressing sleep and home button but it could not help. Please suggest. Still i have connected for charging .

    Sounds like you have corrupt backup data, if this occurs from one phone to another. Try restoring the phone as a new device, without a backup. Try using for a day before installing any other apps, etc. See if that improves the battery life. Then try syncing back applications a couple at a time. Something seems to be locking in the processor which is draining the battery.
    Do you live in an area where there are Apple Stores? If so, try making an appointment with the Genius Bar to have the device checked out.

  • Device Channel Rules for All mobile phones and Tablets?

    I am developing master pages for different devices, my target is to develop different master page for Desktop, Mobile phones and Tablet.
    Default device channel works for desktops, “$FallbackMobileUserAgent" works for both mobile phones and tablets but I want to design different master
    page for all tablets.
    Is there any fall back rule that targets all tablets? and any rule that targets mobile phones only?
    Update: I found "ipad" and "iphone" inclusion rule works across all apple devices.

    Hi,
    According to your post, my understanding is that you want to create rule that targets mobile phones or tablets only.
    Per my knowledge, channels control which master page is used to show your site on for example iPhone or iPad. Channels are bound to master pages, and channels are bound to user agent string of device in use (phone, tablet or PC).
    You need to supply different user agent substrings and order of device channels.
    For more information, you can refer to:
    http://msdn.microsoft.com/en-us/library/office/jj862343(v=office.15).aspx
    http://sp2013.blogspot.com/2012/07/channels-in-sharepoint-2013.html
    http://jussionsharepoint.com/targeting-multiple-browsers-and-devices-in-sharepoint-2013-using-device-channels/
    Thanks,
    Linda Li                
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Linda Li
    TechNet Community Support

  • HT1766 I  have an I phone 4S and I usually back it up threw I Cloud but since my phone is pretty old and has been shutting off on me I decided to back it up in I tunes. I connected the phone and clicked Back Up Now. When it was done I picked up the phone

    I  have an I phone 4S and I usually back it up threw I Cloud but since my phone is pretty old and has been shutting off on me I decided to back it up in I tunes. I connected the phone and clicked Back Up Now. When it was done I picked up the phone and tried to open an app and discovered that all of my apps have been restored as if I had just down loaded them from the app store. So I lost all progress on them. Is there anything I can do to change it back? And I don't understand what I did wrong.

    This means the iPhone has not been connected or synced with your computer since the passcode lock was enabled on the iPhone and too late now.

  • GPS enabled mobile phones and their respective SDK's

    hello people !!
    plz tell me the list of GPS enabled mobile phones and their respective SDK's
    and their is one more request which sdk is supported for motorola i730 mobile phone.

    Motorola has its own api and i assume this phone would support that
    go to motocoder and find out

  • My Mac will not allow me to downlode the latest iTunes and now I can not connect my phone and computer. THis is very frustrating! HELP!!!

    My Mac will not allow me to downlode the latest iTunes and now I can not connect my phone and computer. THis is very frustrating! HELP!!!

    Get more information about your computer. Go to the Apple in the upper left corner of any window, then  "About This Mac".  Write down what it says about "version"and report that here.  Now continue to "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).
    Even my 12 year old Mac lets me download the newest iTunes.  Of course I can't install it but any computer can download the installer files so we need to know precisely what you are trying and what error messages you are seeing.

Maybe you are looking for

  • Does Safari/Tiger have a "Windows 7 Snap" feature in it al all

    We have just moved to windows 7 at work and one of the good things about it is their Snap feature. This is where you can drag a window to the side and it will ping back taking up half the screen. You can then do the same on the other side. Its great

  • PO number change in Sales Order.

    Hi, We created one sales  order. ( Here we given Sold to Party, Ship to party and PO number). After that we did partial delivery and Billing. We opened the sales order and removed the PO numer and saved for some reasons. Again we opened the sales ord

  • Error in loan processing

    Experts, Getting the error while processing a loan type Error during cumulation  No entry found in the table                  T512W  Key       40 1LOP 20090430 I could not find the table,Please let us know

  • Underline behavior in sortable report column headings

    Hi -- I have a report that uses generic columns, all of which have been given custom names. All columns except the edit link are sortable. When the report is first displayed, all column headers are underlined. The first column happens to be the one u

  • 0xc0040396 Error When Joining EMS Array

    I am trying to migrate ISA 2006 Enterprise to TMG 2010 Enterprise.  I built the Windows 2008 R2 EMS server and successfully imported the configuration which I had exported from ISA (single server "array").  I then installed TMG 2010 on my intended fi