Reply
Highlighted
Posts: 5
Registered: ‎09-12-2017

WT32i: HSP failure to connect

I'm currently trying to interface several different CTOS bluetooth devices with the WT32i dev kit and have been unable to connect the HSP-AG profile. I have no issues using the HFP-AG profile, A2DPor AVRCP, so I figured that it was configuration issue. After following the application notes for the HFP/HSP I can't seem to solve the issue. It jams after the HSP connection is established, and on  screen their a AT+xyz command. I have attached an example of such a failure. I have also posted all the firmware and configuration details below.

 

Thank you ahead of time,

Felix

 

Here is the firmware information:

WRAP THOR AI (6.2.0 build 1122)

 

Here is the configuration:

set
SET BT BDADDR 00:07:80:cc:7b:58
SET BT NAME DKWT32i
SET BT CLASS 600204
SET BT AUTH * 0000
SET BT IDENT BT:47 f000 6.2.0 Bluegiga iWRAP
SET BT LAP 9e8b33
SET BT PAGEMODE 4 2000 1
SET BT PAIR 00:12:6f:11:8f:d4 6cbfa973355871f6082ac5933637f2aa
SET BT PAIR 00:1f:82:3a:8f:f8 9a10b130f1eaabdc154ed951c281dd33
SET BT PAIR 4c:cc:34:31:a9:26 3f2febb98c4796cf6b07ddc052175b4f
SET BT PAIR 00:23:78:e8:ea:c7 69cce84e85e7ca8a3fc97e236d04701b
SET BT POWER 6 6 6
SET BT ROLE 2 f 2580
SET BT SCO a 1 4d d 2 48
SET BT SNIFF 190 20 1 8 3c
SET BT SSP 3 0
SET BT MTU 667 672
SET CONTROL AUDIO INTERNAL INTERNAL EVENT
SET CONTROL BAUD 115200,8n1
SET CONTROL BIND 0 400 R VOLUME UP
SET CONTROL BIND 1 200 R VOLUME DOWN
SET CONTROL BIND 2 10 R AVRCP FORWARD
SET CONTROL BIND 3 8 R AVRCP PLAY
SET CONTROL BIND 4 1 R AVRCP PAUSE
SET CONTROL CD 00 0
SET CONTROL CODEC SBC JOINT_STEREO 44100 0
SET CONTROL CONFIG 0000 0000 0000 0d8b
SET CONTROL ECHO 7
SET CONTROL ESCAPE 43 00 1
SET CONTROL GAIN 8 8
SET CONTROL MICBIAS 8 2
SET CONTROL MSC DTE 00 00 00 00 00 00
SET CONTROL PIO 00 00 c6
SET CONTROL PREAMP 1 1
SET CONTROL READY 00
SET CONTROL RINGTONE &-5aaa;f:_6c-5a;f:_6c-5a_-6eee;f:_6c-5a;f:_6c-5a
SET CONTROL VREGEN 2 02
SET PROFILE A2DP SOURCE
SET PROFILE HFP Hands-Free
SET PROFILE HFP-AG HF Voice Gateway
SET PROFILE SPP Bluetooth Serial Port
SET PROFILE HSP-AG Voice Gateway
SET PROFILE AVRCP CONTROLLER 1f TARGET 0f
SET

 

 

Posts: 92
Registered: ‎06-05-2017

Re: WT32i: HSP failure to connect

Hello Flabelle,

at first please keep in mind that your module cannot behave both like HFP and HFP-AG. 

 

Also, could you please clarify, what is the second device you are trying to connect to? 

 

Regards,
Anna

Posts: 5
Registered: ‎09-12-2017

Re: WT32i: HSP failure to connect

Hello Anna,

My goal was not connect the WT32i as both a HFP and a AG, but rather picking off the PTT discrete on push-to talk device (Interceptor). The problem is that response from the WT32i terminal appears as "UNKNOWN 0: " on my terminal after the RFCOMM connection is established. Before hand it works, which I find odd (see attached photo). Before the connection I see:

 

HFP-AG 0 UNKNOWN (0): AT+XAPL=0A12-0001-0100,30\r
HFP-AG 0 UNKNOWN (0): AT+BTRH?\r
HFP-AG 0 UNKNOWN (0): AT+CSRSF=1,0,0,1,0,1,1\r
HFP-AG 0 UNKNOWN (0): AT+IPHONEACCEV=2,1,9,2,0\r
HFP-AG 0 UNKNOWN (0): AT+XEVENT=TALK,1\r
HFP-AG 0 UNKNOWN (0): AT+CTXD\r
HFP-AG 0 UNKNOWN (0): AT+CTKST=0,1\r
HFP-AG 0 UNKNOWN (0): AT+P\r
HFP-AG 0 UNKNOWN (0): AT+CKPD=200\r
HFP-AG 0 UNKNOWN (0): AT+XEVENT=TALK,0\r
HFP-AG 0 UNKNOWN (0): AT+CUTXC\r
HFP-AG 0 UNKNOWN (0): AT+CTKST=0,0\r
HFP-AG 0 UNKNOWN (0): AT+R\r

 

Afterwards:

HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):
HFP-AG 0 UNKNOWN (0):

 

This is why I wanted to connect by HSP to see if that resolved the issue, but after a bit of messing around, no matter what the mode I connect in I can not read the discrete after the RFCOMM is establish.

 

My real question is why does the AT command after "unknown(0): " disappear and how could I fix that?

 

I will link the information to the manafacturer's site for the BT device, but for now this will have to do: https://www.chiefsupply.com/earphone-connection-interceptor-bluetooth-wireless-speaker-microphone-w-...

Posts: 92
Registered: ‎06-05-2017

Re: WT32i: HSP failure to connect

Hi,

 

at the beginning please keep in mind that HFP-AG 0 UNKNOWN (0) message means that iWRAP does not recognize the AT command. 

Depending on SET CONTROL CONFIG optional_block_1 bit 7 configuration, iWRAP will respond with error to unknown messages or you need to response to them on your own.

 

Also, when there are ''empty'' unknown messages like this:

HFP-AG 0 UNKNOWN (0)

it seems that device is sending an empty string.

 

 

Posts: 5
Registered: ‎09-12-2017

Re: WT32i: HSP failure to connect

Hi Anna,

 

Thanks for your response, the information about the configuration of block 1 was particularly useful.

 

As far as the empty string goes, I have solved the problem. It is a problem with the UART to USB chain (I suspect it is tera term, but I have no idea). I connected an MCU directly to the UART and found that the strings were in fact not cutoff.

 

Is it possible to bind certain AT commands to GPIO, specifically unknown ones?