smartspaces-io / bluecove

Automatically exported from code.google.com/p/bluecove
0 stars 0 forks source link

BlueCove Compliance with JSR-082 Breaks Some Applications #64

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
Connecting to a device on PSM below 0x1001

What is the expected output? What do you see instead?
Expect a successful connection, instead get:
BlueCove version 2.1.0 on bluesoleil 
java.lang.IllegalArgumentException: PCM values restricted by JAR82 to minimum 
4097 
        at 
com.intel.bluetooth.MicroeditionConnector.validateL2CAPPSM(MicroeditionConnector
.java:434 
) 
        at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:336) 
        at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:513) 
        at javax.microedition.io.Connector.open(Connector.java:97) 
        at wiiremotej.WiiRemote.construct(WiiRemote.java:298) 
        at wiiremotej.WiiRemote.<init>(WiiRemote.java:216) 
        at wiiremotej.WiiDeviceDiscoverer.getDevice(WiiDeviceDiscoverer.java:122) 
        at wiiremotej.WiiRemoteJ.findDeviceInternal(WiiRemoteJ.java:270) 
        at wiiremotej.WiiRemoteJ.findDevice(WiiRemoteJ.java:244) 
        at wiiremotej.WiiRemoteJ.findRemote(WiiRemoteJ.java:285) 
        at SimpleTest.main(SimpleTest.java:8)

What BlueCove version are you using (include build number for SNAPSHOT)? On 
what operating 
system and jvm? Is this 64-bit or 32-bit OS and jvm?
Applicable to all.

Please provide any additional information below.
Note that Sun itself has recognized this problem and therefore has this note in 
their documents:
"Note: Valid PSM range: 0x0001-0x0019 (0x1001-0xFFFF dynamically assigned, 
0x0019-
0x0100 reserved for future use)" which can be found here: 
http://java.sun.com/javame/reference/docs/sjwc-2.0-
web/docs/doxygen/html/group__jsr82l2cap.html

Original issue reported on code.google.com by ctt...@gmail.com on 29 Dec 2008 at 3:30

GoogleCodeExporter commented 8 years ago
No.  for JSR-82 Legal PSM values are in the range (0x1001..0xFFFF), and the 
least
significant byte must be odd and all other bytes must be even.

https://opensource.motorola.com/sf/discussion/do/listPosts/projects.jsr82/discus
sion.jsr_82_1_2_open_discussion.topc1808

also see: 
http://snapshot.bluecove.org/bluecove/apidocs/com/intel/bluetooth/BlueCoveConfig
Properties.html#PROPERTY_JSR_82_PSM_MINIMUM_OFF

Anyway bluesoleil do not support L2CAP

Original comment by skarzhev...@gmail.com on 29 Dec 2008 at 3:47

GoogleCodeExporter commented 8 years ago
Ah, that flag is nice. Thanks.

Original comment by ctt...@gmail.com on 29 Dec 2008 at 4:21

GoogleCodeExporter commented 8 years ago
How do you run L2CAP on bluesoleil anyway?

Original comment by skarzhev...@gmail.com on 29 Dec 2008 at 4:32

GoogleCodeExporter commented 8 years ago
Hi, I am facing the same problem and I just dont know what is happening. I am 
trying
to use wiigee API to connect my wiimote to my pc. I am running windows XP pro, 
using
eclipse 3.2 as IDE, jvm: 1.5.

this is my stacktrace.

 java.lang.IllegalArgumentException: PCM values restricted by JAR82 to minimum 4097
    at
com.intel.bluetooth.MicroeditionConnector.validateL2CAPPSM(MicroeditionConnector
.java:434)
    at com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:336)
    at com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:513)
    at javax.microedition.io.Connector.open(Connector.java:97)
    at device.Wiimote.connect(Wiimote.java:131)
    at device.Wiimote.<init>(Wiimote.java:115)
    at control.DeviceDiscovery.getDiscoveredWiimotes(DeviceDiscovery.java:95)
    at control.Wiigee.discoverWiimotes(Wiigee.java:165)
    at control.Wiigee.<init>(Wiigee.java:44)
    at control.Wiigee.getInstance(Wiigee.java:52)
    at wiigeemain.main(wiigeemain.java:18)

the line of code is this one:

this.controlCon =
(L2CAPConnection)Connector.open("btl2cap://"+this.btaddress+":11;authenticate=fa
lse;encrypt=false;master=false",
Connector.WRITE);

I hace read the referenced page by Vlald, but I just cant understand where 
should I
do the modifications??????

Any clue explained in normal mortal language?

Original comment by Mels...@gmail.com on 5 Feb 2009 at 8:15

GoogleCodeExporter commented 8 years ago
When you start java try start it like this:
java -Dbluecove.jsr82.psm_minimum_off=true  yourClass

Or in your code:
System.setProperty("bluecove.jsr82.psm_minimum_off", "true");
or
System.setProperty(BlueCoveConfigProperties.PROPERTY_JSR_82_PSM_MINIMUM_OFF, 
"true");

Original comment by skarzhev...@gmail.com on 5 Feb 2009 at 8:29

GoogleCodeExporter commented 8 years ago
hi skarzhevskyy
that's my ansuer
Thank you!!

Original comment by uki...@gmail.com on 12 Aug 2009 at 4:47

GoogleCodeExporter commented 8 years ago
Hi!
I tried the above quick fix. But Now I am getting the following error:-

com.intel.bluetooth.NotSupportedIOException: Not Supported on winsock
    at 
com.intel.bluetooth.BluetoothStackMicrosoft.l2OpenClientConnection(BluetoothStac
kMicr
osoft.java:859)
    at 
com.intel.bluetooth.BluetoothL2CAPClientConnection.<init>(BluetoothL2CAPClientCo
nnect
ion.java:36)
    at 
com.intel.bluetooth.MicroeditionConnector.openImpl(MicroeditionConnector.java:39
5)
    at 
com.intel.bluetooth.MicroeditionConnector.open(MicroeditionConnector.java:513)
    at javax.microedition.io.Connector.open(Connector.java:97)
    at org.wiigee.device.Wiimote.connect(Wiimote.java:133)
    at org.wiigee.device.Wiimote.<init>(Wiimote.java:119)
    at 
org.wiigee.control.WiimoteDeviceDiscovery.getDiscoveredWiimotes(WiimoteDeviceDis
cover
y.java:98)
    at org.wiigee.control.WiimoteWiigee.discoverWiimotes(WiimoteWiigee.java:145)
    at org.wiigee.control.WiimoteWiigee.getDevice(WiimoteWiigee.java:87)

Could kindly someone help me understand what is happening here ? I am not able 
to 
understand

Original comment by 2abhij...@gmail.com on 25 Feb 2010 at 4:18

GoogleCodeExporter commented 8 years ago
I have the problem ! Any support would be very appreciated !

PS: I'm running on Windows XP SP2 (bootcamp !)

Original comment by oliver.p...@gmail.com on 3 Mar 2010 at 8:09

GoogleCodeExporter commented 8 years ago
Any progress on this as i'm getting this problem as well but with bluesoleil?

Original comment by dale2...@gmail.com on 12 May 2010 at 1:53

GoogleCodeExporter commented 8 years ago
Hey guys,
I know this thread is dead for 2 years, anyway.. have you tried 
System.setProperty("bluecove.stack", "widcomm"); ?

Original comment by pedr...@gmail.com on 28 May 2012 at 5:25

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
hi every one , I had been the same problem and had tryed all this options to 
change  the  bluetooth stack winsock to widcoom with out sucess 

System.setProperty(BlueCoveConfigProperties.PROPERTY_STACK_FIRST, "widcoom"); 

and the

System.setProperty("bluecove.stack", "widcomm");

Have any one the ideia of how to change it?

Original comment by everton....@gmail.com on 3 Jan 2015 at 4:34