BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 09-15-2008, 05:53 AM   #1
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default Bluetooth events / listener

Please Login to Remove!

HI,
i have got a digital pen attached to my BB via bluetooth. now i debug my application and the console has the following output:
PHP Code:
BT: HCI ACCEPT_CON_REQ
BT: BTEVENT_LINK_CONNECT
net.rim.bluetooth: DC00
BT: AUTHORIZATION_REQ
BT: SPP_EVENT_CONNECTED
BT: sdpUpdateServiceAvailability
url: https://someadress
BT: SPP_EVENT_DISCONNECTED
CMM: com_paperiq_bb_digitalpen_app_4_2_1(2524) no sig from 0x33
BT: freeSerialPort 106f87a0
BT: sdpRemoveRecord
BT: freeSdpAttributeData
BT: allocSerialPort 106f88f8
BT: sdpAddRecord
BT: allocSdpAttributeData
SSL:->CH
BT: BTEVENT_LINK_DISCONNECT
net.rim.bluetooth: DD13
GME Rx Cid: IPPP
SSL:<-SH
TLS:<-F
SSL:->CCS
Pen Response: <?xml version="1.0" encoding
...
Now i want to get and show the values listed in the console, e.g.:SPP_EVENT_CONNECTED, or the xml string.

are there some event listener for this?

thanks.
hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 09-15-2008, 06:47 AM   #2
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

what you see on the console is the debug output. "BT:" belongs to RIM's bluetooth manager. To listen on bluetooth events you have to create your own listener, however I think this is not what you want.

"Pen Response" output belongs to the bluetooth listener written by PaperIq guys which is actually the one your pen sends data to. I guess the output is also only for debugging purpose...

Maybe I could help you more if you tell me more about what you want to do...
Offline  
Old 09-15-2008, 06:57 AM   #3
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

Hi,
i've got this sourcecode:
PHP Code:
   public SampleApp()
    {
        try
        {
            
//we add a new DigitalPenListener at startup
            
digitalpen.addDigitalPenListener(this);
        } catch(
Exception e) {
            
Dialog.alert(e.toString());
        }
        
pushScreen(new WaitScreen(this));
    }
....
 
//Start DigitalPenListener
    
public void dataReceived(DigitalPenEvent e)
    {
        
Dialog.inform("Getting new data....");
        
sendmail((String) e.getData());
... 
this should be an event, which is raised if the pen sends new data. but this event isn't raised, so i thought i could get the data in a different way.

maybe someone has got a fresh idea ;)

thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 09-15-2008, 07:09 AM   #4
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

Never used the PaperIQ's listener. I would ask them for support if you get this code from them.

is the PaperIQ's module already running when you try to register your listener? Your application is not trying to do it during the boot up?
Offline  
Old 09-15-2008, 07:14 AM   #5
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

i've tried something new:
the console gives me somethink like an ip address (eg. 71.845.47.41, i know it's not a valied ip adress, but it looks like ;))

i have to enter this "address" to the DigitalPenSource, then teh event is raised, but only when i use the paperIQ demoform. if i try it with the easybook m³ the event is not raised.

maybe someone has got an idea to this.

PHP Code:
  public DigitalPenSourcexxx91;xxx93; getDigitalPenSources()
    {
        
DigitalPenSourcexxx91;xxx93; sources = new DigitalPenSourcexxx91;2xxx93;;
        
        
//we register for signature & xml data for the included test form
        
sourcesxxx91;0xxx93; = new DigitalPenSource(DigitalPenEvent.TYPE_SIGNATURE"71.845.47.41""71.845.47.41:191,284,207,78");
        
sourcesxxx91;1xxx93; = new DigitalPenSource(DigitalPenEvent.TYPE_XML_LITE"71.845.47.41");
                
        return 
sources;
    } 
hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 09-15-2008, 07:30 AM   #6
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

what you call an IP sddress is Anoto's pattern address. That would make sense if PaperIQ's listener would require it, because there might be different applications listening for different filled paper pages and only they would get the events on paper they are responsible for.

To get it working with the easybook try to register your listener with the pattern for the corresponding easybook page (it should be printed in very small letters in the left bottom corner)
Offline  
Old 09-15-2008, 08:16 AM   #7
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

Hi,
jo i have found the adress on the formpaper. then i took a look at the page of the easybook, typed in the address (4200.506.30132) and tried it again.

but it's always the same problem, the event was not raised.
i always tried the address from the paper at the end of the book, to send the data to the blackberry, the result is/was the same.

any ideas?

thanks hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Old 09-15-2008, 08:27 AM   #8
Ivanov
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Default

a pattern address has always 4 number blocks separated by a point.

It could also be that PaperIQ is blocking some pattern areas for beeing listened on. I would suggest that you cantact them. If you've payed for the integration kit you should also get support for it...
Offline  
Old 09-15-2008, 09:15 AM   #9
hibbert
Thumbs Must Hurt
 
Join Date: May 2007
Location: berlin, germany
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 163
Default

jo that's true, i will ask them now =)

but they have git a software that gets the data from the easybook, so there must be a way... i will ask paperiq, let's see what will happen.

thanks for your help.

hibbert
__________________
My English is so bad, that makes me nobody so quickly after
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MEASUREMENT COMPUTING PCI-DDA08/16 8-channel, 16-bit Analog Output Board 48 D IO picture

MEASUREMENT COMPUTING PCI-DDA08/16 8-channel, 16-bit Analog Output Board 48 D IO

$349.99



Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104 picture

Onset Computer Analog/Temp/RH/Light Data Logger MX1104 Onset Computer MX1104

$261.31



Measurement Computing 197728B USB 1608HS-2A0 16-Channel Digital DAQ +2 Analog picture

Measurement Computing 197728B USB 1608HS-2A0 16-Channel Digital DAQ +2 Analog

$422.50



Computer Boards Measurement Computing PCM-DAS08 picture

Computer Boards Measurement Computing PCM-DAS08

$200.00



Measurements Computing PCI-DDA02/16 Analog Output and Digital I/O Card picture

Measurements Computing PCI-DDA02/16 Analog Output and Digital I/O Card

$699.99



Measurement Computing CIO-DAS08 Multifunction Analog and Digital I/O Board picture

Measurement Computing CIO-DAS08 Multifunction Analog and Digital I/O Board

$599.99







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.