[Q] Android Bluetooth Communication - Java for Android App Development

Hi,
I am currently trying to write an application that connects to a bluetooth module and sends it some data.
At the moment the app is capable of doing the following things:
- enable/detect bluetooth
- discover devices
- create a socket
However, once the socket is created I try to use the connect() method. This method failes every time, giving me the following errors :
get bluetooth service() called with no bluetooth manager callback
DISCOVERY_COMP_EVT slot id:4, failed to find channle, status:1, scn:0
invalid rfc slot id 4
java.io.IOException: read failed, socket might closed or timeout, read ret: -1
at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:505)
at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:516)
at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:320)
at app.bluetooth.bluetoothcommunicationv1.ConnectThread.run(ConnectThread.java:53)
ConnectThread.java line 53 is this line :
mmSocket.connect();
where mmSocket is a BluetoothSocket
I have tried to fix these erros in various ways but I havent found a single solution that works for me, so I was hoping someone has had this problem before and remembers how he/she fixed it.
I have been looking around at the examples that can be found at the android development site, watched a youtube tutorial series, found some code on git but they all use the code that can be found in the google API about bluetooth.
And it is this code that is not working for me.
I am a new user so apparently I am not allowed to post links, the code I am using is found on the Bluetooth API page from google (connecting as a client).
I could really use some help to get me back on track with my app.

Related

Writing a Device Driver for XDA I or II

I am attempting to write a simple Stream device driver. Although I can't find any sample driver code, the following link: http://www.cegadgets.com/wincedevfaq.htm#5.7 leads to a simple device driver (intended for detecting power-down, which is irrelevant to my problem).
Taking this code and making it into a project for Pocket PC gives me a Device Driver which works fine in the emulator, and fails on the XDA itself.
Specifically, when my test application calls RegisterDevice(L"PWR", 0, L"PWRDLL.DLL", 0) it fails (returns 0) and GetLastError returns 2 (File not Found).
My test application and the DLL are both in the root directory. When I try this on the emulator it works fine; if I move the DLL to a different directory it still works provided I put the full path in the RegisterDevice call.
If anyone has a stream device driver sample which actually works on the XDA - or any practical advice - I would be delighted to receive it.
look at msdn
David,
have a look at msdn.microsoft.com/embedded/ Here you'll find most of the things you need. If you have a broadband connection you can download all tools and source codes MS has to offer. If you don't have a fast connection they'll send out an evaluation DVD [key code is valid for 120 days] with current Visual C++ (4.0) embedded compiler and the source code for their current CE release as long as the copyrights are left with them. I enjoy wading through the code and look for ideas or implementations.
Give it a try instead of browsing the internet for sources you'll not find.
Kind regards
Udo

New BT STACK(BCHS) has Release at 31 May 2006

The New BT STACK(BCHS) has Release at 31 May 2006 , Can anybody find the setup file ?
the old BCHS ver.107 ( 1107 ) , See:
O2 MINI NEW BLUETOOTH STOCK.
The New one is ver.1740 , Description :
Release Description BCHS 15.1.0
Thanks !!
ps: Sorry !!! It's " Stack " , Not " Stock " ...
The Release File contains:
The 15.1 serie contains the following new features:
- The Phone Book Access Profile has been added
- The device side of the HID-profile has been added
- In the AV, FTC, OPC, BPP, CM and SC it is now possible to cancel an
action started by:
AV_CONNECT_REQ
FTC_CONNECT_REQ
OPC_CONNECT_REQ
BPP_CONNECT_REQ
CM_SDC_SEARCH_REQ
CM_SDC_UUID128_SEARCH_REQ
SC_BOND_REQ
Besides the new features a number of bugfixes has also been addressed in this release.
Below a short description of the content of the bugfixs that has been solved in this release is listed.
Release 15.1.0
--------------
Introduction
------------
The 15.1.0 release contain a number of bugfixes and improvments as liste
above.
And more old Release.......
link doesnt work....
Link brings up error "you dont not have the authorization to download this content"
I am very interested in seeing this!
It is a stack, you ...!
Hey Chatty,
i'm interested to see whether or not this updated version of the bluetooth stack (that i'm already using) has any of the bugs fixed that the original had.
If you looked at the old stack and the amount of attention it got maybe you should just let people follow what interests them and if you dont like it ... DONT READ IT!
People have the right to read what they want and say what they want! But they should be able to do it with out have someone personally attack them, ESPECIALLY IF THAT PERSON HAS NOTHING CONSTRUCTIVE TO ADD TO THE CONVERSATION!
Anyway
enjoy your night Chatty and relax a little!
we love ya anyway
Nice edit Chatty!
The Release File :
The 15.1 serie contains the following new features:
- The Phone Book Access Profile has been added
- The device side of the HID-profile has been added
- In the AV, FTC, OPC, BPP, CM and SC it is now possible to cancel an
action started by:
AV_CONNECT_REQ
FTC_CONNECT_REQ
OPC_CONNECT_REQ
BPP_CONNECT_REQ
CM_SDC_SEARCH_REQ
CM_SDC_UUID128_SEARCH_REQ
SC_BOND_REQ
Besides the new features a number of bugfixes has also been addressed in this release.
Below a short description of the content of the bugfixs that has been solved in this release is listed.
Release 15.1.0
--------------
Introduction
------------
The 15.1.0 release contain a number of bugfixes and improvments as liste
above.
Bugfixes
------------------
D-0095 Fixed problem in ./common.h with endian dependend macro's for
bytestream manipulation. The macros have been made endia
independent.
D-0307 Linux: Using BCHS in the Linux Kernel mode, the scheduler did
not correctly clean up the timed event queue upon shutdown.
D-0419 Linux: Using BCHS in the Linux User mode, the scheduler did
not correctly clean up the timed event queue upon shutdown.
D-0578 Linux: In the Linux kernel port, it must be possible to
specify an alternate panic handler, such that special
platform/application specific handling can be performed
instead of the default BCHS sched_panic() function.
D-0717 Linux: The Linux userspace USB driver must support the new
kernel-driver interfaces for Reset and EnterDFU.
D-0797 Linux: The Linux kernel USB driver supports a
non-documented customer-supplied "extra" interface to augment
the standard USB driver
D-0804 Linux: It is now possible to setup maximum number of
outstanding ISOC frames in the USB driver at runtime, instead
of having to define it at compile time.
D-0805 Linux: The Linux kernel USB driver is slow due to inefficient
URB usage pattern and too many payload copying.
D-0863 Linux: The Linux kernel driver will sometimes crash when being
unloaded.
D-0879 Linux kernel: Crashes/oopses have been seen to occur when
loading/unloading the USB driver multiple times.
D-0888 Linux: If the Linux kernel BSL (PAN) network interface was
loaded, but not configured (ie. not connected), the module
would crash on unload/unregister.
D-0901 Linux kernel: The USB driver must support the UsbDrv_Reset()
API call required by the USB interface.
D-0904 Linux kernel: The USB driver keeps too much track of the
outstanding URBs.
D-0959 All demo applications: Added "-A <bluetooth-address>" command
line argument for all demo applications. This option can be
used to skip device inquery in the demo application.
D-1017 Linux: The verify_area() Linux kernel API function has been
deprecated since at least Linux version 2.6.11 and completely
removed from at least version 2.6.14. The function access_ok()
should be used instead.
D-1082 Fixed problem in ./common.h with endian dependend macro's for
bytestream manipulation. The macros have been made endia
independent.
D-1100 OBEX/Common: Corrected miscalculation of unicode string length
D-1107 Linux USB: Fixed a problem in the Linux USB driver where a
transfer buffer was allocated based on a predefined value
instead of the value defined by the device
D-1155 BPPS: Support for mandatory features has been completed,
including status and referenced object channel has been
included.
D-1235 Linux USB: Fixed a problem in the Linux USB driver where URB's
could be leaked.
D-1238 Linux: The USB-driver can now handle a warm-reset so it is
possible to use USB ROM devices.
D-1239 Bootstrap: now possible to also use bootstrap when using USB.
A new Library is created for use with USB. The library name
is bccmd_boot_strap_usb.lib for windows and
libbccmd_boot_strap_usb.a for Linux. The old
bccmd_boot_strap-library still contains the serial boot strap
implementation.
D-1254 HFG: Disabling of status indicators using the AT+CMER is now
implemented.
D-1259 HFG: The actual status indicator values are now stored in the
HFG separately for each connection.
D-1265 Linux: The default BCHS sched_panic() now generates a kernel
stack dump when using the Linux kernel BCHS port.
D-1269 In BCHS version 15.0.0 the OBEX profiles writes the total file
size erroneous. This has now been fixed
D-1277 PAN DEMO: updated to prompt user for passkey instead of using
a fixed value.
D-1284 SBC: An overflow could occur in the decoded SBC sound
D-1432 samples, if the sound was played with maximum amplitude at the
time of encoding
D-1293 OBEX/FTC,OPC: The FTC and OPC profiles has had a general code
cleanup.
D-1297 OBEX/OPC: The prim->bodyType in the opcPutReq library function
is only assigned a value if the bodyType in the lib call is
not NULL. I.e. the bodyType contains garbage when arriving in
OPC profile resulting in a crash when OPC pfree it. This has
when fixed so the library set it to NULL.
D-1298 BPP: Could not initiate two requests on different channels at
the same time. This is now fixed.
D-1299 HFG: If the connection was disconnected during a service
search, it was not possible to initiate any further connections
from the HFG since service search resources were not released.
D-1300 Build: Problem compiling without
EXCLUDE_EXCEPTION_HANDLER_MODULE but with ENABLE_SHUTDOWN has
been solved.
D-1305 JSR82: Cancelling an inquiry through the JSR-82 layer led to a
delayed access violation in some cases, because a timed event
was not cancelled. The timed event is now removed when an
inquiry is cancelled.
D-1306 HFG: Fixed problem with Ring request
D-1310 OBEX/FTP: The FTP client API have been updated so the Get and
Put signal describes the new interface
D-1313 Linux: It is now possible to use bootstrapping when running in
the Linux User to kernel mode split.
D-1329 Changed the page scan mode to HCI_PAGE_SCAN_MODE_MANDATORY.
D-1339 Build: The WIN macro has been replaced by the build-in _WIN32
D-1340,D-1341 macro for windows builds. WIN is no longer needed.
D-1344 AV: Avoided AV forcing link to active in case of sniff request
by remote device.
D-1345 DUNC demo app.: Added menu item for hanging up a call and
updated the AT command call setup sequence
D-1350 SC: The SC module does not called sc_db_write() if the peer
device updates a link link which already exits. This has been
fixed so the sc_db_write() function is called when the link
key is updated.
D-1351 SC: If a peer device initiates a connection while the local
device is in high security mode, the class of device parameter
in a SC_BOND_IND msg is zero. A fixed has been made so this
parameter is valid in this situation.
D-1357 BCCMD: Removed memleak in SetPcmChannel
D-1360 VDP-Demo: SD_IFACEQUEUE added to tasks.c
D-1361 VDP-Demo: Alignment set to 8 byte
D-1364 Optimized the HID parser.
D-1365 HFG: When an incoming connection from a headset is initiated
at the same time of a connect request from the application it
is possible that both connections will fail.
D-1367 VDP demo: In order for properly interfacing the external video
library demuxing functions, BCHS libraries and the demo
application must be built using the same alignment as the
external library alignment. Instructions on how to do so has
been added in the demo description.
D-1371 HFG: Fixed handling of AT+CHLD=? in profile and Demo app.
D-1372 VDP Demo: ScPasskeyResSend updated to use proper result format.
D-1373 JSR82: An ill-behaved, threaded Java program could cause rfcomm
packets from the JSR-82 layer to arrive out-of-order. A message
queue has been added to handle this.
D-1374 VDP-Demo: If multiple media packets were sent in the same l2cap
packet then a temporary buffer was freed, causing an error.
This pfree has been removed.
D-1376 OBEX/OPC: If the OPC put an object which need to be spilt up in
multiple OBEX packets, the OPC is some cases keeps sending the
OBEX headers(name, type length).
D-1379 DUNC demo app.: Added response to port negotiation.
D-1380 CM: Under rare condition the Connection Manager could restore
its local queues when it is not allow to. The consequences of
this are that it can send more than one signal to the lower
layer and in worst case a dead lock could happen.
This has been fixed.
D-1381 JSR82: The inquiry procedure of the JSR-82 layer requests names
for all found devices. This has been changed to only request
names when requested from application layer.
The inquiry is now usable for selectService implemented in
upper layer.
D-1382 TCS: The SDP record of the TCS GW contained an incorrect value
of the protocol descriptor list. This incorrect value
(UUID TCS-BIN) has been changed to the correct value
(UUID TCS-BIN-CORDLESS)
D-1389 BPP: Removed potential memory leak when sending document to
printer, by pfreeing printContent.
D-1410 JSR-82: The inquiry procedure may cause a segmentation fault
if no device names are fetched during this. The event
responsible is now properly cleaned up.
D-1411 HFG-Demo: Cleaned up the handsfree demo application and removed
some macro re-definitions.
D-1416 OBEX/OPC: If the OBEX clients (FTC, OPC, BIPC) is release while
setup an OBEX connection their could go into a state where it
has not possible to make a new OBEX connection. This has now
been fixed.
D-1417 OPC: Removed potential memory leak when putting an object to
the server, by pfreeing the object received by the application.
D-1418 OPS: If an OBEX PUT packet includes a type header the OPS
profile did write an invalid byte into the OBEX PUT packet,
which made the rest of it invalid. This has now been fixed so
an invalid byte is not put into the OBEX PUT packet.
D-1420 HFG: HfgAtCmeErrorSend has been added to the Hfg-lib file.
D-1421 HFG: Library function HfgAtCopsSend now returns the correct
structure.
D-1423 BPP: Added description of docTypeLength and printContentLength
in API.
D-1424 HF: Fixed compilation problem when ADVANCED_HF was deined and
new SCO interface is used.
D-1426 BPPS: Activation issue for the BPPS profilemanager solved.
D-1428 BCSP: Fixed problem in BCSP where it was not possible to
initialise BCSP multiple times.
D-1429 Linux kernel: The USB driver should adjust the SCO packet size
after the VOICE_SETTING in usr_config.h.
D-1435 DUNC: Corrected 'maxMsgSize' assignment in the DUNC_STATUS_IND
primitive
D-1438 Handsfree: Fixed interoperability issue with some car kits that
does not follow HFP specification
D-1440 HFG: Fixed problem with incoming and outgoing connection at the
same time
D-1444 AV: Update of the AV API document so it now also states that
the AV profile supports video streaming
D-1445 AV: The description of the roleType parameter in the
AV_STATUS_IND message was wrong. This has been corrected so
the description matches the parameter
D-1446 HIDH Demo: The second parameter of the
HidhConnectAcceptReqSend(...) call in the HIDH demo is invalid.
D-1447 Handsfree: Updated default values for eSCO connections.
D-1456 AVRCP: Update of AVRCP API description, particularly connection
establishment issues.
D-1457 Build: It is now possible to compile BCHS with the
EXCLUDE_BCHS_L2CA_MODULE and/or EXCLUDE_BCHS_RFC_MODULE
compiler defines.
D-1463 BCHS: BCHS has been updated to support RFCOMM so it may be used
together with the 21d Firmware version
D-1467 AVRCP: Prevented forcing connection out of low power mode when
low power was changed by remote device
D-1473 Build: Problem compiling without
EXCLUDE_EXCEPTION_HANDLER_MODULE but with ROM_BUILD_ENABLE
has been solved.
D-1476 HFG: Transmission of callheld status indicator from the HFG is
added.
D-1477 HFG: Fixed the supported features written in service record.
D-1478 BPP-Client: Added description of
BPP_CONNECT_IND and BPP_CONNECT_RES which was missing in the
API documentation (bchs-api-023_obex_bpp_client_api)
D-1482 HFP: PICS document has been updated
D-1488 Corestack: Fixed an issue where the max_frame_size field of an
RFC_START_CFM contained the locally requested value and not the
negotiated value.
D-1489 TCS-Demo: Fixed the GW part of TCS demo application. The GW did
not respond with an alert message due to an imporperly set
variable.
D-1491 FTS: Added low power mode control.
D-1494 HFG: Updated HFG to mutually exclude RING and audio connections
for HSP according to ESR1 E2112.
D-1500 JSR82: For short local names, the JSR-82 layer would read
outside of the string, due to an incorrect cast. The name is
now copied properly.
D-1501 BPP: Made sure that BPP can be activated in NULL state.
D-1502 BPP: Only perform one SDC attribute search during BPP connect.
D-1503 BPP: Fixed problem with handling channels disconnecting in
random order in BPP.
D-1505 The following two compiler defines is added to usr_config.h:
PAGE_SCAN_TYPE
INQUIRY_SCAN_TYPE
These defines allow the customer to select which Page Scan Type
and Inquiry Scan Type BCHS is using.
D-1506 SAPS: Added Bluetooth address of remote device for incoming
connections to the SAPS_CONNECT_IND.
D-1507 BPP: Removed possibility of getting an incorrect structured
OBEX packet on the BPP Object Channel.
D-1509 TCS: Added support for the Samsung SIT105EW access point in the
terminal part of TCS
D-1515 HF: Updated API document with some missing lib. functions.
D-1516 CM: Added more error code mappings from HCI-error codes to
BCHS error codes.
D-1518 Optimized the HID parser
D-1519 HFG: Updated API document with some missing lib. functions.
D-1521 JSR-82: L2CAP connections may leave remaining data when Java
application is closed. This caused new connections in a new
Java application to fail. This data is now cleared.
D-1524 BPP: Corrected the security setting for BPP Object Channel to
none.
D-1525 Obex/Push App: Removed the references to C-code files in
profile_mangers etc. directories and insert the use of
libraries instead.
D-1526 BPP: Corrected the requested max OBEX packet size for BPP Job
and Status Channel.
D-1527 BPP: Added description of channelId and ConnectionId to
documentation of BPP_DISCONNECT_IND.
D-1530 BPP: Added extra security so BPP only accepts incoming Object
Channel connections from a connected printer.
D-1532 HFG: Fixed handling audio request when signals are crossing
D-1533 SC: The cod is zero in the SC_PASSKEY_IND and SC_BOND_IND in
the scenario where:
A successful bond has been made between dev 1) and dev 2).
If dev 2) debonds dev 1) and dev 1) afterwards initiate a
connection to dev 2) then dev 2) will initiate a new bond
sequence against dev 1) and in this case the SC_PASSKEY_IND
will popup with a cod=0 at dev 1).
This has been fixed now by adding a read to the SC_DB if cod=0.
D-1534 HFG/HF: Fixed error in SCO negotiation if application specified
eSCO parameters
D-1535 Changed default sniff mode parameters to 40 in order to follow
the BT spec.
D-1544 BIP: Optimized the BIP code and removed some bugs.
D-1545 AV,FTC,OPC,BPP,CM,SC: A new feature was been made which allowed
the application to cancel a:
AV_CONNECT_REQ
FTC_CONNECT_REQ
OPC_CONNECT_REQ
BPP_CONNECT_REQ
CM_SDC_SEARCH_REQ
CM_SDC_UUID128_SEARCH_REQ
SC_BOND_REQ
D-1547 OBEX/SYNC: Who header length corrected from (10 to 9) in the
obex-sync-server.
D-1548 The compiler define DEFAULT_LINK_SUPERVISION_TIMEOUT has been
added to usr_config.h.
This allows to adjust the default link supervision timeout for
all new ACL links created.
D-1550 OBEX/SYNC: Who header length corrected from (10 to 9) in the
obex-sync-server.
D-1552 SBC:When the SBC decoder decodes an audio signal, encoded with
max amplitude, the output signal occasionally drops to zero at
the peak values. This has been fixed now by fine tuning the
final scaling boarders.
D-1555 BPP: Fixed converter error in BPP related to getEvent,
getJobAttributes, and cancelJob, so it does not forget the
number zero.
D-1559 BCHS: Removed the use of put_message_in, put_message_at and
cancel_timed_message. These functions are planned to be removed
from the BCHS scheduler in the future (date of removal has not
been fixed yet)
D-1560 FTC: In BCHS 15.0.4 FTC always request the link to go to
ACTIVE mode even if it is already in this mode. This has been
change so FTC only request to go to ACTIVE mode if the link is
not in this mode.
D-1561 BPP: Now possible to cancel a job without getting a
disconnection in BPP.
D-1563 CM: In the situations where a peer device releases its L2CAP
connection before it has been configured, the connection
Manager (CM) could go into a state where it keeps rejecting
incoming connection attempts. This has now been fixed
D-1565 TCS: Lib functions has been updated to use bchs_msg_transport
which makes it more easy to split applications from BCHS.
D-1566 Linux: The library: sc_db-file was not built for Linux. This
has now been fixed.
D-1571 HIDD: The device side of the HID profile has now been
implemented conforming to the specifications.
D-1573 Handsfree: Memory leak when a AT command is not encoded as it
should has been fixed.
D-1576 API document updated with additional description, including
examples of how to use library functions.
D-1577 API documentation is updated with additional information on new
library functions and example on how to use all library are
added.
D-1578 PAN: Now only possible to build PAN for HCI and not RFC,
because PAN is only to be runned on HCI-builds.
D-1579 JSR-82: If the JSR-82 layer received a disconnect from the
remote device on an L2CAP connection while sending data,
it could enter a state where it would stop responding to any
signals sent to it. This issue has been cleared up.
D-1581 Handsfree: The body and the data fields are now switched so
that the contents are according to the API document.
D-1583 Handsfree: Length value of the body and the data fields is now
corrected so that the 0-terminations is also included.
D-1584 HFG: Format changed for CIND response, so that the call_setup
element is closed properly.
D-1585 HFG Demo App: OK is now send after HFG demo app has all +CLCC
results to HF.
D-1587 SDP: The SDP layer now does full comparison for 128bit UUIDS,
allowing searches for non-bluetooth (e.g. JSR-82 Java)
applications.
Note: This fix has only been applied to HCI builds.
D-1588 AV: When unregistering the service record when running as
SINK the wrong service record was used. This has now been fixed
D-1595 BCSP: Added init of timer ID to avoid cancelling already
expired timers
D-1597 HF: Fixed problem with string handling for +CLCC. and +CNUM.
D-1600 obex/fts: The connection-ID was wrongly set to 0xFFFFFFFF when
a connection was terminated. This has now been fixed so the
correct connection ID is returned.
D-1605 Handsfree: In the unsolicited +CLIP message send form the HFG a
needed space is added after the ":" so that the message now is
+CLIP: xx, where xx is a number.
D-1606 Handsfree: In different unsolicited message send form the HFG a
needed space is added after the ":" so that the message now
is +CLIP: xx, where xx is a number.
D-1608 Handsfree: The support AT-functions are corrected so that they
are according to the AT specification format.
D-1611 Handsfree: The errors in the function HfSendHfCmeeInd have been
corrected. It is not able to handle a space after :
(example:+CME ERROR: 32) and the digits send in the error code
are not mixed up any more so that a received code is send
corecltly to the app.
D-1613 Handsfree: Implemented signal interface is corrected so that
COPS function will work in HF and HFG API is updated for
HFG_COPS_RES.
D-1614 Linux kernel: The USB driver should have the functionality to
bring the interface into DFU mode.
D-1615 Changed default sniff mode parameters to 40 in order to follow
the BT spec. in the
bchs-api-005_connection_mgm_api documentation
D-1618 HF: Function HfSendClccInd is now able to handle space after :
D-1620 Linux: The userspace part of the USB driver does not support
entering DFU mode or USB reset.
D-1622 Phone Book Access Profile is implemented according version 1.0
of the specification.
The profile has two modules:
PAC is the client side e.g. Car kits
PAS is server side e.g. Mobile phones.
D-1628 BCHS has now been updated to support the BC3MM AV-router
v1.2.2 solution.
D-1630 SPP: Made API for changing low power mode on SPP connections
D-1632 SBC: The SBC decoder has undergone a minor optimization round
to improve the general decoder MIPS performance.
D-1634 CM: If the Connection Manager(CM) receives an incoming L2CAP
connection while the local message l2cap_connect_accept_req is
stored on a local queue, the CM will reject the incoming L2CAP
connection.
This has been changes so if a l2cap_connect_accept_req message
is stored the incoming L2CAP connection is also stored. In this
way the CM will not reject it.
D-1636 BPP: A cancel connect attempt can no longer result in a
BPP_CLOSE_SEARCH_IND.
D-1637 BPP: Made sure that the abort timer is cancelled if a
disconnection happens simultaneous.
D-1641 BPP: Fixed problem with uninitialised memory when using Object
Channel.
D-1642 FTS now sends CmModeChangeReq (for LINK_STATUS_CONNECTED)ONLY
once on rx of CM_DATA_IND while NOT in LINK_STATUS_CONNECTED
and obex is connected.
D-1644 FTS now sends CmModeChangeReq (for LINK_STATUS_CONNECTED)ONLY
once on rx of CM_DATA_IND while NOT in LINK_STATUS_CONNECTED
and obex is connected.
D-1647 Linux: The Linux userspace UART driver now correctly perform
the pthread shutdown sequence.
D-1648 In BCHS 15.0.5 FTC will request the link to go to ACTIVE mode
even if it is already in this mode. This only happens if FTC
receives a FTC_CANCEL_CONNECT_REQ in connected state.
This has been change so FTC only request to go to ACTIVE mode
if the link is not in this mode.
D-1649 Linux USB: A memory leak has been found in the Linux userspace
USB driver in the UsbDrv_Rx() function, where the rx-queue
element itself was not freed after the data has been send to
the stack.
D-1655 Linux user: The USB driver does not use the correct pthread
shutdown sequence.
D-1659 PAC: Added handling for low power mode and cancel connect.
D-1664 HIDH: solved free of non allocated data
D-1665 SPP Demo App: mapping between client and instance number made
more intuitive
D-1672 SAP: Updated Service record for SAP server to be compatible
with WinCE devices
D-1673 FTC: FTC accidently uses more than one timer to control
lowpower. This has been fixed so FTC only use one timer to
control this.
D-1674 HIDH: When calling HIDHConnectReqSend(..) with SdpInfo as a
NULL pointer undefined Memory access is read. This has now been
fixed.
D-1677 HFG: New signal "HFG_STATUS_INDICATOR_SET_REQ" is created to
enable the application to update the actual status indicator on
all link at the same time and in any state of the HFG.
D-1679 AV: Av app. will now receive a negative connect confirm also
when a cancel connect arrives too late to make actual cancel -
when the connection establishement is done but has not yet been
reported to app.
D-1680 An incorrect offset calculation that caused searches for more
than one 128 bit UUID to fail has been fixed.
Note: This fix has only been applied to HCI builds.
D-1681 HIDH: When HIDH luses the connection and should automatically
reconnect. If the reconnect fails, a HIDH_CONNECT_CFM is send
to the application instead of a HIDH_DISCONNECT_IND. This is
Fixed.
D-1682 HIDH: A problem in the HIDH package fragmentation routing which
did not work for packages larger than the MTU size has been
fixed.
D-1685 OBEX: Optimize the OBEX profiles so the clients release the
connection and the servers send a response code with error, if
the peer device sends an OBEX packet larger than agree on.
D-1688 TCS: Doing shutdown the tcs_deinit function did not pfree the
payload in a CM_L2CA_CONNECTIONLESS_DATA_IND_T message, causing
a potential memory leak. This has now been fixed.
D-1691 HIDH: Problems with Connect Accept and Reconnect Flag and
Virtual Cable Flag are True and Normally Connectable Flag is
False. This has been fixed.
D-1694 HIDH: Fixed a memory leak in HIDH which occured when packages
bigger that the MTU size was send. The user payload was then
not free'ed. This is now free'ed.
D-1704 OBEX documentation: Added connected state to the sequence
overview diagram.
D-1740 CM: In BCHS 15.0.6 TCS_IFACEQUEUE were hardcoded into the
Connection Manager (CM). If TCS_IFACEQUEUE were removed from
the bchs_task.h bchs could not compile.
This has now been fixed.
quite list there! will be interesting to see what the possibilities for the magician shall be!
Thanks for the heads up and i look forward to reading more
now to wait for the cab file...
The most important question for me: Will the modem work now?
Good!
Only two questions:
1) When it can be downloaded? From where?
2) That HUGE list of improvements it's really confusing. What is this new stack going to do respect the previous? It's worth install it?
Really thanks to people like wensonlau that discover interessant unpgrades to the magician
Cheers, MocciJ
still no working download to this hotly anticpated release?
What a pity... no one got access.
Was hoping this would make my Magaician work better with my Pioneer Bluetooth head unit....damn dissapointed it hasn't emerged.
UP
where?
I didn't say, I uploaded it. I just meant to put this thread to the top.
Can Anybody please tell me if this works fro Prophet (Xda neo), too ?
I have some Problems with my HT-820....
@meisterlampe2000: just try the older version and you'll know. Or just read the thread about the old version. How to find it? Use the SEARCH function!
SO kind of you !
I`ve read everything now, didn`t expect a different answer from you !
I hope to find a Link to that new Stack soon - Would be nice to listen to Music withoput interruptions.
THX

[UNDER DEVELOPMENT]Windows Mobile 6 Bluetooth and Wiimote

I am currently trying to develop some software that allows to use a wiimote or a ps3 controller (ex. for fpsece).
all in vb.net
I currently discovered that I am unable to connect. I have already found a similar project that stopped because of the same problem!
I have read that the problem is the missing HID/S2CAP support of 32feet.net
The other software uses BlueTools so there may be the same problem!.
Does anyone know something that allows me to connect to my wiimote?! Maybe some SDK with HID/S2CAP support?!
You own an HD2 and another WinMob device and want to help? Take a look here: http://forum.xda-developers.com/showpost.php?p=5553883&postcount=10
Sorry, i cant help you but i will love control a wii with my HD...
I am speaking of the other way round , but I could also try that ^^.
I am talking about to control your HD with a Wiimote
It would be easy, if there is any idea how succesfull connect to the wiimote
I have found something here: http://www.eggheadcafe.com/software/aspnet/31158420/big5bxf276hrqkrnsut.aspx
I will see if it helps
Mhh, to bad, I cannot find the source files I would need
They maybe in the "Windows CE 5 platform builder" But the Online Setup I was able to get doesn't work anymore
scilor said:
I am speaking of the other way round , but I could also try that ^^.
I am talking about to control your HD with a Wiimote
It would be easy, if there is any idea how succesfull connect to the wiimote
Click to expand...
Click to collapse
Control your Wii with HD... It would be a great app.. if you can write it...
Thanks my Friend.
I was looking at doing this at one point. The HD2 with its Widcomm bluetooth stack supports BT HID, and the later WM6.5.X builds have Bth_HID in the SYS.
Pairing doesn't get you very far though. I found some C++ code for using the Wiimotes, but I haven't transfered it yet.
@l3v5y Why you have always the same ideas I do
The Bluetooth Stack of the HD2 seems to be a little bit buggy:
If I try to use a Bluetooth chat, it just works from my HD2 to my Kaiser, not the other way round. It is as my HD2 blocks all incoming Bluetooth connections
Any idea?
please setup a team , winmo need you
cheer
Ok, I have attached the Bluetooth Chat here.
It would be nice if other HD2 users could test it(You will need the HD2 and another WinMob Phone with a Widcomm Stack). Please always post the Roms of the devices, especailly the HD2's.
If it is only occurs on some ROMS, it would be fine, so I will do a Rom upgrade for further testing
My results where:
HD2 - T-Mobile ROM 1.43.11.2 (70315) Ger
Kaiser - Custom Rom WinMob 6.5
Message HD2 to Kaiser: Works fine, but takes a second.
Message Kaiser to HD2: Connection error, no message!
I found following in the thread of WiiMöb: http://wiimob.codeplex.com/Thread/View.aspx?ThreadId=10953
"But it seems likely that any purely bluetooth work was a red herring, and we just need to tackle BTHHID.DLL and devise a P/Invoke library that will get us a Filehandle to the device through the HID stack."
Hi everybody,
I'm also looking for a solution for that.
As I had similar problems with my Notebook (Widcomm-BT-Stack), I could solve it with a different BT stack. But I don't want to part with the Widcomm on my HD2.
I think the main problem is that the OK softbutton is disabled as long as there is no passcode in the inputbox. It only gets enabled if you enter somthing, which would never match up with the empty passcode of the WiiMote (somthing <> nothing ;-).
If the OK softbutton was enabled even with empty passcode box, the codeless pairing might actually work.
Is there anybody capable of unlocking this OK button?
Please
ScruffR
The problem is that the WM Devices misses a special HID driver . You may connect it with out a passcode with some tricks but this won't help because you cannot connect to the device
Look at this Symbian project http://www.symbianresources.com/projects/wiirider.php - maybe that will help. I got the same problem like everybody - can't pair device :s
We cannot connect the WiMote low-level easily, that is the big problem. If we could it would be easy.
...I'm assuming this has been abandoned? :/
Until someone finds a way to get a stream, the development is stopped
There is a way to connect to the Wii Remote with a WM 6 device.
The driver you want to look for should come with WM 5 and 6 devices. It has the prefix "BHI" it is not meant for production use, and it somewhat bare-bones, however you can successfully connect to the Wii Remote with it.
The registry path for this driver is:
HKLM\Software\Microsoft\Bluetooth\Hid\Hid_Class
and
HKLM\Software\Microsoft\Bluetooth\Hid\Instance
If you activate these drivers using the Win32 ActivateDeviceEx command (upon hard reset you don't have to do this), you should be able to open up a file stream to the driver.
Code:
HANDLE read_test = CreateFile(L"BHI0:", 0, 0, NULL, OPEN_EXISTING, 0, NULL);
Code:
unsigned __int64 wii_addr = 0x002659F4EEEDL; // BT_ADDR, 64 bits (8 bytes)
Then, I call the DeviceIoControl function to connect to the Wii Remote:
Code:
bool device_io_success = DeviceIoControl(read_test, 1, &wii_addr, sizeof(wii_addr), NULL, 0, NULL,NULL);
e = GetLastError();
Just replace the wii_addr with your Wii Remote's Bluetooth address.
The source code for this driver can be found by googling:
"bthhid.cxx source code" it should be the first link.
The set of APIs it provides is minimal, and I was not able to get any other function to work besides HIDConnect.
I'm still working on getting some sort of data from it.
Let me know if this works for you,
Mike
Could you send me a link to the source? I am finding any
I will take a look later, maybe we get it running
Unfortunately, I can't post the link due to spam restrictions (I just joined the forums recently). However, I have attached the folder that includes all the source files with this post.
This folder comes with Windows CE Platform Builder. It is located here (if you have Platform Builder installed):
C:\WINCE500\PRIVATE\WINCEOS\COMM\BLUETOOTH\PROFILES\HID
If you navigate to the BASE folder, you will find bthid.cpp. This is the main source that contains the stream driver implementation.
The main section of this file to examine is around line 2500 on down. These are the functions that are exposed when you create a file handle to the driver.
Let me know how it works out,
Mike

Uninitialized AudioRecord error

Hi,
I'm a hardware programmer who is new to the Android programmer world and I'm running into a bit of a weird issue. I'm trying to make an app that transmits and receives data through the 3.5mm audio jack. I have one app that runs perfectly and in order to create the new app I just transplanted the code into the new app. I've made very few alterations to the main activity class and the layout.xml to change the view, but now I get the error "startRecording() called on an uninitialized AudioRecord." I've been unable to figure out why the system thinks that the audioRecord is uninitialized. I've even gone so far as to move the initialization of the audioRecord to the line immediately preceding the call to start the recording. The initialization code is as follows:
Code:
_audioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT,
_sampleFrequency, AudioFormat.CHANNEL_IN_MONO,
AudioFormat.ENCODING_PCM_16BIT, recBufferSize);
_audioRecord.startRecording();
the error occurs at the line _audioRecord.startRecording();
Why would this work in one app and not in another? What could be causing this? Any help would be greatly appreciated. Thank you in advance,
-Chris

[Q] Extract JSON data and display in ListView with Searchbox

Hi Everyone,
I am currently a very new starter in the Android App Development stage. I have tried to develop a ListView with Searchbox facility to search data that comes from a specific URL in the form of JSON data. I managed to understand displaying this data in ListView, but adding a search facility is something I'm struggling to grasp somehow.
The code attached is a reference code I am trying to tune before I move on to actually developing my app. However, it doesn't seem to work on the emulator, giving me the error that the MainActivity file has stopped working.
I am unsure if there is a fundamental error somewhere, and would be really grateful to get some advice on this. I have looked online and can't seem to find a good resource that explains merging ListView with JSON data effectively with a Searchbox.
ajitmenezes said:
Hi Everyone,
I am currently a very new starter in the Android App Development stage. I have tried to develop a ListView with Searchbox facility to search data that comes from a specific URL in the form of JSON data. I managed to understand displaying this data in ListView, but adding a search facility is something I'm struggling to grasp somehow.
The code attached is a reference code I am trying to tune before I move on to actually developing my app. However, it doesn't seem to work on the emulator, giving me the error that the MainActivity file has stopped working.
I am unsure if there is a fundamental error somewhere, and would be really grateful to get some advice on this. I have looked online and can't seem to find a good resource that explains merging ListView with JSON data effectively with a Searchbox.
Click to expand...
Click to collapse
You should implement the search on the listview adapter, not on the activity itself.
Take a look at the following article:
http://www.mokasocial.com/2010/07/arrayadapte-filtering-and-you/

Categories

Resources