This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2564: Unable to connect SPPDemo to Ubuntu serial port

Part Number: CC2564

SPPDemo on STM32F4 eval board.

Having failed to get SPPDemo to connect to Windows, I've tried it with Ubuntu (14.04) and hcidump,  with SPPDemo as client, and :

#
# RFCOMM configuration file.
#

rfcomm0 {
    # Automatically bind the device at startup
    bind no;

    # Bluetooth address of the device
    device 00:17:E9:E5:79:AE;

    # RFCOMM channel for the connection
    channel    3;

    # Description of the connection
    comment "SPPDemo Serial Port connection";
}

CC2464B SPPDemo dialogue:

Client>inquiry

Client>
Inquiry Entry: 0x001583E59271.

Client>
Inquiry Entry: 0x001A7DDA7114.

Client>open 2
Result: 1,0x001583E59271.
Result: 2,0x001A7DDA7114.

open 2 3

SPP_Open_Remote_Port success.

Client>
SPP Open Confirmation, ID: 0x0001, Status 0x0002.

Client>

 

Ubuntu hcidump output:

HCI sniffer - Bluetooth packet analyzer ver 2.5
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff
> HCI Event: Connect Request (0x04) plen 10
    bdaddr 00:17:E9:E5:79:AE class 0x001f00 type ACL
> HCI Event: Command Status (0x0f) plen 4
    Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
> HCI Event: Connect Complete (0x03) plen 11
    status 0x00 handle 71 bdaddr 00:17:E9:E5:79:AE type ACL encrypt 0x00
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 0
> HCI Event: Command Status (0x0f) plen 4
    Unknown (0x00|0x0000) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
    status 0x00 handle 71
    Features: 0xff 0xfe 0x2d 0xfe 0xdb 0xff 0x7b 0x87
> HCI Event: Command Status (0x0f) plen 4
    Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Read Remote Extended Features (0x23) plen 13
    status 0x00 handle 71 page 1 max 1
    Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
> HCI Event: Disconn Complete (0x05) plen 4
    status 0x00 handle 71 reason 0x13
    Reason: Remote User Terminated Connection

The HCI Logger output (levels 3 & 4) for SPPDemo are in these screenshots: BTLogger_1.pdf and BTLogger_2.pdf

It seems as though the client is terminating the connection, possibly on account of the query from  the PC?  I get the same client response in Win10 x64. I've tried with/without __SUPPORT_LOW_ENERGY__, and get the same response if I (successfully) pair (from the PC host) prior to the open.  I'm using 6763.CC256XB.h as service pack.

Hugely appreciate any pointers as to why there is an initial connection which is dropped after a few seconds. Stuck for over a week on this and got to the point of considering designing out the device....

Brian

  • Can, you send the complete BT log output without filtering and HCI viewer enabled.

    Thanks
  • Hari,

    Here it is, including the initalisation with the service pack, with no filters and the HCI/LMP dialogue : BS20.txt

    The equivalent SPPdemo dialogue is:

    Client>inquiry

    Client>
    Inquiry Entry: 0x001A7DDA7114.

    Client>
    Result: 1,0x001A7DDA7114.

    Client>open 1 3

    SPP_Open_Remote_Port success.

    Client>
    SPP Open Confirmation, ID: 0x0001, Status 0x0002.

    As far as I can see, things start going wrong at event 1297 (10:44:13.009) when the host does a HCI_Write_Link_Supervision_Timeout (0x7D00), to which the device responds with an HCI_Command_Complete_Write_Link_Supervision_Timeout_Event, parameter: 0xC(Command Disallowed).

    Any pointers gratefully appreciated.

    Brian

  • Brian, We will look at the log.. Did, you try in server mode..
    Please check this thread.. It seems SPP demo have worked fine on Win10, MacOS :
    e2e.ti.com/.../2138809
  • Hari,

    Here is server log: BS21.txt

    Pairing was initiated on the Ubuntu machine with entry of PINCodeResponse in SPPDemo. An open  appears to work in SPPDemo, and the minicom port on Ubuntu displays the correct baudrate, but is silent in the log (as though it was already opened at pairing) . Neither write nor read work from SPPDemo.

    Server>
    atPINCodeRequest: 0x001A7DDA7114
    Respond with: PINCodeResponse

    Server>pincoderesponse 983252
    GAP_Authentication_Response(), Pin Code Response Success.

    Server>
    atLinkKeyCreation: 0x001A7DDA7114
    Link Key Stored.

    Server>write
    Function Error.

    Server>read
    Function Error.

    Server>open 1 3
    Server Opened: 1.

    Server>write
    Function Error.

    Server>read
    Function Error.

    Value any pointers.

    Brian

  • I agree SPPDemo no doubt worked at a time; I have tried it with the current service pack from Vihang and cannot get it to work on the currently released port on STM32F4 on either Windows10 x64 or Unbuntu 14.04.

    Brian
  • I supplied the log files two weeks ago and since then have heard nothing. Is there any chance that someone can try current service pack with STM32F4 eval board and confirm whether or not SPPDemo connects and works?

    Thanks,

    Brian

  • Some progress...by defining USE_SOFTWARE_CTS_RTS I've managed to make an SPPDemo connection to a Windows 10 x64 box and transfer data. Same build claims to be able to open a port to a Ubuntu box, but nothing out on minicom as of yet, so likely a Ubuntu issue. It looks to me like the STM32F4 port doesn't work with hardware RTS/CTS out of the box, and if there is an indication that you have to define USE_SOFTWARE_CTS_RTS, I certainly missed finding it. Open to correction....

    Brian