So after few tries I have compiled code from example rfcomm into
xcode project. Anyway I have still problem with establish connection
to my PC. When I'm trying to connect windows is prompt for password
but after I type correct one connection is refused. Below is log.
Trying connection to 11-11-11-11-11-11 channel 1
unhandled event : 0f
Please enter PIN 0000 on remote device
unhandled event : 18
unhandled event : 61
unhandled event : 03
unhandled event : 1b
unhandled event : 13
unhandled event : 13
L2CAP connection to device 11-11-11-11-11-11 failed. status code 103
I assume that this unhandled events cause windows when trying to
retrieve bluetooth services. So I turn off pairing on windows side.
After that windows is not prompting for password anymore but
looks like rfcomm application on iphone still trying to use pairing.
How to turn it off?
Trying connection to 11-11-11-11-11-11 channel 1
unhandled event : 0f
Please enter PIN 0000 on remote device
L2CAP connection to device 11-11-11-11-11-11 failed. status code 34
What that all unhandled event means? Where I can get manual for
rfcomm protocol to fix that unhandled event?
Matthias is there any ETA when rfcomm support will be implemented in
BTstack?
to enable/disable pairing from the BTstack side, you can use the hci_write_authentication_enable command (search in rfcomm.c for it) and use 0/1 in the call.
in your attached log, you get a connection error 0x22: from bluetooth spec 2.1
2.34 LMP RESPONSE TIMEOUT (0X22)
The LMP Response Timeout error code indicates that an LMP transaction failed to respond within the LMP response timeout.
I'm not sure, but I guess the pairing code is not answered on the remote site.
also, it seems like Bluetooth.com changes their links periodically. I've updated the RFCOMM wiki to only point to the main specification site.
Best
Matthias
> --
> You received this message because you are subscribed to the Google Groups "btstack-dev" group.
> To post to this group, send email to btsta...@googlegroups.com.
> To unsubscribe from this group, send email to btstack-dev...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/btstack-dev?hl=en.
>
> <hci_dump.pklg>
You have right pairing disable on client side didn't change anything.
Now I'm getting always:
Trying connection to 11-11-11-11-11-11 channel 1
unhandled event : 0f
unhandled event : 61
unhandled event : 03
unhandled event : 1b
unhandled event : 13
unhandled event : 13
L2CAP connection to device 11-11-11-11-11-11 failed. status code 103
So the only changes is that 0x18 HCI_EVENT_LINK_KEY_NOTIFICATION is
no longer appear.
That erros defined in hci_cmds.h means L2CAP_CONFIG_RESPONSE_RESULT_UNACCEPTABLE_PARAMS
How to solve it? Do I need to handle this events?
0x0f HCI_EVENT_COMMAND_STATUS
0x03 HCI_EVENT_CONNECTION_COMPLETE
0x1b HCI_EVENT_MAX_SLOTS_CHANGED
0x13 HCI_EVENT_NUMBER_OF_COMPLETED_PACKETS
Thanks
> Hi Norbert
> Best
> Matthias
--
Pozdrowienia,
Norbert Lis
Please attach an hci_dump.pklg - the program output will, in the best case, tell you that something went wrong, or that it failed to connect at all.
If it says "L2CAP_CONFIG_RESPONSE_RESULT_UNACCEPTABLE_PARAMS", then, well, the parameters are not liked by the remote side. You're connecting to a Windows PC right now?
Best
Matthias
I'm sending requesting file in attachment. That's right I'm trying to
connect to Windows PC. I wrote simple client/server app for windows
based on rfcomm and I was able to send and receive data. So bluetooth
module and drivers works fine. I will ge grateful if you can help me.
> Hi Norbert
> Best
> Matthias
--
Pozdrowienia,
Norbert Lis
in this log, you get the error "Connection refused - no resources available". I don't know how to interpret this in your context. Do you have another device connected already? Maybe RFCOMM is only allowed with authentication? Maybe you can try to connect to another device and compare the dumps? (note: you can also configure BTdaemon to write out log in the format used by blueZ or a generic hexump style - see daemon.c for this)
best
Matthias
I have tried on another PC and below it's log. Still no successful but
this time it seems that it's negotiating connection. Could you look on
this log and tell more. What that unidentified commands mean?
Trying connection to 11-11-11-11-11-11 channel 1
unhandled event : 0f
unhandled event : 61
unhandled event : 03
unhandled event : 1b
unhandled event : 13
Channel successfully opened: 11-11-11-11-11-11, handle 0x0c, psm 0x03, source cid 0x45, dest cid 0x40
Sending SABM #0
unhandled event : 74
unhandled event : 74
unhandled event : 13
Received RFCOMM unnumbered acknowledgement for channel 0 - multiplexer working
Sending UIH Parameter Negotiation Command
unhandled event : 74
??: address 0b, control 0f: 0B 0F 01 66
??: address 01, control 53: 01 53 01 9C
unhandled event : 13
unhandled event : 73
unhandled event : 73
unhandled event : 73
unhandled event : 73
unhandled event : 73
unhandled event : 71
unhandled event : 13
unhandled event : 61
Basebank connection closed, exit.
I tried to configure daemon.c to change write log format but
I have problem with compile btstack with 3.1.2 SDK. I remember that
older version of btstack was compiled by me without problem.
I just checked your log, too.
In the first few tries, this happens:
[19:36:16.510] [RFCOMM SEND] UIH Modem status command COMMAND
[19:36:16.511] [HCI EVENT] Undecoded Event Type -
[19:36:16.511] [RFCOMM RECEIVE] UIH Modem status command COMMAND
[19:36:16.539] [RFCOMM RECEIVE] UIH Modem status command RESPONSE
...
what's missing is that rfcomm.c should send a UIH Modem status command RESPONSE. however, my quick & dirty code from last year doesn't do that. I'm sorry, but you can either try to fix this, or wait until I release the next version of BTstack that includes a full (more or less) RFCOMM implementation, which I hope to do this month - as I said before, this will come when my OBEX integration is done.
Best
Matthias