BC127 AT commands


#1

I’m using a BC127 with firmware 6.1.5 to make an HFP connection to a phone. I have AT commands enabled. On initial connection to the phone I receive a number of AT responses, but they are only “OK” and “ERROR”. I’m guessing these responses are a result of the BC127 sending the phone various HFP setup commands like AT+BRSF, AT+CIND=?, etc. My problem is I really need to see the full responses to these commands, not just the OK or ERROR responses. If I subsequently send the AT+CIND=? command to the phone to get the status indicator format, some phones will not work correctly after that. They don’t seem to like receiving that command more than once. ??

It’s pretty clear from documentation for much older firmware (6.0.16) that the full responses to these BC127 generated HFP setup commands used to be passed on to me rather than filtered out like they seem to be now. Is this intentional? It looks like a bug to me. Am I missing something? Is there a workaround?

Thanks!


#2

Hi,

Can you post some examples of what you are seeing/want/expect?

Regards

Matt


#3

Here is what the BC127 with 6.1.5 firmware sends me upon HFP connection to a phone:

OPEN_OK 13 HFP F895C7743386
AT 13 6
OK
ROLE_OK F895C7743386 M
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR

From the documentation for firmware version 6.0.16 page 64 we see the module used to send this:

AT 13 14
+BRSF: 999
AT 13 6
OK
AT 13 6
OK
AT 13 132
+CIND: (“call”,(0,1)),(“callsetup”,(0-3)),(“service”,(0-1)),(“signal”,(0-5)),(“roam”,(0,1)),(“battchg”,(0-5)),(“callheld”,(0-2))
AT 13 6
OK
AT 13 24
+CIND: 0,0,0,4,0,1,0
AT 13 6
OK
AT 13 6
OK
AT 13 20
+CHLD: (0,1,2,3)
AT 13 6
OK
OPEN_OK 13 HFP
AT 13 6
OK
ROLE_OK A49A585188C6 S
AT 13 9
ERROR
AT 13 6
OK

It appears the BC127 is now filtering out the response for +CIND instead of passing it along to me which I really need it to do. Some phones are ok with me doing the AT+CIND=? command again and some are not. So it is really important to me to be able receive and parse that initial +CIND response.


#4

I have performed the below and it all seems to work correctly.

status
STATE CONNECTED[0] CONNECTABLE[ON] DISCOVERABLE[ON] BLE[IDLE]
OK
version
BlueCreation Copyright 2017
Melody Audio V6.1.5
Build: 1496939390
        Bluetooth address 20FABB075DD3
        Profiles: A2DP AVRCP HFP BLE SPP PBAP MAP
        Codecs: SBC
OK
config
AUDIO=0 0
AUDIO_ANALOG=15 15 1 OFF
AUDIO_DIGITAL=0 44100 64 100A00 OFF
AUTOCONN=0
AUTO_DATA=OFF OFF OFF
BALANCE=100 100
BATT_CONFIG=OFF 145 4250 1500 150
BC_SMART_CONFIG=68E3 28F0 89F7 D93C
BEACON_DATA=0 00 11 22 33 44 55 66 77 88 99 AA BB CC DD EE FF 04 D2 16 2E EE
BLE_CONFIG=0 OFF 40 ON
BLE_CONN_PARAMS=128 12 6 40 0 400 50 400 400 61 400 400
BT_VOL_CONFIG=A A 10 1
CLASS_1=OFF
CMD_TO=20
COD=240404
CODEC=0 OFF
CONN_TO=0
DEEP_SLEEP=OFF
DEVICE_ID=0001 0002 0003 0004 0005 0006 0007 0008
DISCOVERABLE=2 0
ENABLE_BATT_IND=ON
ENABLE_CAPSENSE=OFF
ENABLE_LED=ON
ENABLE_SPP_SNIFF=OFF 0 0 0 0 0
GPIO_CONFIG=ON 0 255
HFP_CONFIG=OFF ON OFF OFF OFF
HIGH_SPEED=OFF OFF
LOCAL_ADDR=20FABB075DD3
MAX_REC=2
MM=OFF OFF 0 OFF OFF OFF OFF OFF
MUSIC_META_DATA=OFF
MUSIC_OLD_AVRCP=OFF
NAME=BC-075DD3
NAME_SHORT=BC75DD3
PIN=0000
PROFILES=2 0 0 2 2 1 2 1 0 0 1 0
REMOTE_ADDR=000000000000
SPP_UUID=00 00 11 01 00 00 10 00 80 00 00 80 5F 9B 34 FB
SSP_CAPS=3
TWS_CONFIG=OFF 1 2
UART_CONFIG=9600 OFF 0
USB_HOST=OFF
VREG_ROLE=1
OK
SET HFP_CONFIG=OFF ON OFF OFF ON
OK
OPEN_OK 13 HFP CC08E0AE578E			//Paired the device from an iPhone 4
ROLE_OK CC08E0AE578E S
AT 13 6			//As soon as the device was paried it output the below

OK

AT 13 9

ERROR

AT 13 6

OK

AT 13 6

OK

AT 13 18

+XAPL=iPhone,7

AT 13 6

OK

AT 13 6

OK

AT 13 6

OK

AT 13 6

OK

AT 13 9

ERROR

at 13 ati		//Fist attempt to send a command did not work
PENDING
AT 13 9

ERROR
at 13 at+cops?
PENDING
AT 13 28

+COPS: 0,0,"vodafone UK"

AT 13 6

OK

at 13 at+cind?
PENDING
AT 13 24

+CIND: 1,0,0,4,3,0,0

AT 13 6

OK

at 13 at+cgmr
PENDING
AT 13 16

+CGMR: 7.1.2

AT 13 6

OK

This is literally a pass through mode with the unit not interpreting or filtering any responses (including the ERROR messages), there is no reason for it to do this.

Regards

Matt


#5

If nothing is being interpreted or filtered then what are all the OK and ERROR responses immediately after the connection is established? These are in response to something. This is from your output:

AT 13 6         //As soon as the device was paried it output the below
OK
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 18
+XAPL=iPhone,7
AT 13 6
OK
AT 13 6
OK
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR

Section 4.2 of the HFP profile standard defines a number of commands and responses that must happen on initial connection before the device is considered to be in service. These include AT+BRSF, AT+CIND=? (the one I care about) and others. The fact that we end up with a usable HFP connection means this interaction successfully occurred between the BC127 and the phone. It still looks to me like the full responses to these setup commands were passed through in firmware 6.0.16, but not in later versions.

In your example, you send at+cind? and get a valid response. To know how to parse this response, by definition we must previously have received a response to the AT+CIND=? command which returns the format for parsing the +CIND: response. Is there some other way to get this information from the BC127?


#6

If you send the command to the handset manually then it will return the response from the handset. The at+cind command is a standard 3GPP command as defined in 3GPP 27.007. I have given it below.

AT+CIND? Response is +CIND: ,,,,

Another example is as I have just carried out

at 13 at+brsf?
PENDING
AT 13 13

+BRSF:495

I do not know what the initial unsolicited responses coming out are, however, if you are after a specific response to a specific command I would ignore them and manually send the AT command as per my example that way you are guaranteed to get what you want regardless of the phone you are connecting to as CIND is a mandatory 3GPP command to be implemented by anything and everything.

Regards

Matt


#7

Thanks for your reply. The format of the AT+CIND? response is not always the same. It is not safe to assume a certain order or range of values. The phone can define this however it wants and even add additional indicators. That is why it is necessary to first use the AT+CIND=? command to get the format that allows one to parse the response to subsequent AT+CIND? commands.

As I mentioned in my initial post, some phones are not happy if the AT+CIND=? command is sent more than once. Hence my need to know what the phone responded with when the BC127 sent the AT+CIND=? command while initially setting up the HFP connection. Again, firmware version 6.0.16 passed this response on. Version 6.1.5 does not. This is information that I need without querying the phone a second time. How can I get it?


#8

I have gone through the specs and the phones are able to order the parameters as they see fit but there are standard ones and to understand the format you will need to query the phone as I have done with he iPhone 4 and HTC A9 below I do not think there is any underlying protocol which allows the BC127 to do this over and above what any application can do.

version
BlueCreation Copyright 2017
Melody Audio V6.1.5
Build: 1496939390
        Bluetooth address 20FABB075DD3
        Profiles: A2DP AVRCP HFP BLE SPP PBAP MAP
        Codecs: SBC
OK
status
STATE CONNECTED[0] CONNECTABLE[ON] DISCOVERABLE[ON] BLE[IDLE]
OK
PAIR_PENDING                    //Connecting to an iPhone 4
PAIR_OK CC08E0AE578E
OPEN_OK 13 HFP CC08E0AE578E
ROLE_OK CC08E0AE578E S
AT 13 6
OK
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 18
+XAPL=iPhone,7
AT 13 6
OK
AT 13 6
OK
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR
at 13 at+cind=?
PENDING
AT 13 132
+CIND: ("service",(0-1)),("call",(0-1)),("callsetup",(0-3)),("battchg",(0-5)),("signal",(0-5)),("roam",(0-1)),("callheld",(0-2))
AT 13 6
OK
at 13 at+cind=?
PENDING
AT 13 132
+CIND: ("service",(0-1)),("call",(0-1)),("callsetup",(0-3)),("battchg",(0-5)),("signal",(0-5)),("roam",(0-1)),("callheld",(0-2))
AT 13 6
OK
CLOSE_OK 13 HFP CC08E0AE578E
unpair
OK
reset
BlueCreation Copyright 2017
Melody Audio V6.1.5
Build: 1496939390
Ready
PAIR_PENDING             //Connecting to HTC one A9
PAIR_OK 04C23E048A70
OPEN_OK 13 HFP 04C23E048A70
ROLE_OK 04C23E048A70 S
AT 13 6
OK
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR
AT 13 6
OK
AT 13 6
OK
AT 13 9
ERROR
at 13 at+cind=?
PENDING
AT 13 132
+CIND: ("call",(0,1)),("callsetup",(0-3)),("service",(0-1)),("signal",(0-5)),("roam",(0,1)),("battchg",(0-5)),("callheld",(0-2))
AT 13 6
OK
at 13 at+cind?
PENDING
AT 13 24
+CIND: 0,0,0,0,0,2,0
AT 13 6
OK
at 13 at+cind?
PENDING
AT 13 24
+CIND: 0,0,0,0,0,2,0
AT 13 6
OK
CLOSE_OK 13 HFP 04C23E048A70

I do not see why a phone would refuse a couple of CIND requests in a row as it is just requesting status information.

Regards

Matt


#9

Just because the phones you are testing with do not exhibit the problem does not mean that I don’t know what I’m talking about. There are phones that will lock up and need reset if we send them the AT+CIND=? command. Again based on the HFP spec, the BC127 must send the phone this command when connecting to it. I NEED THE RESULTS OF THIS QUERY. The Bluegiga WT32 gives us those results. We need the BC127 to do it as well. Can you please raise this question with the development team?
Thanks!


#10

I understand that not all phones are the same and just because the ones I have are not exhibiting this behaviour means none do but I have been working in this field for a long time and am surprised that this is the case (I have far more experience working with phones/modems than BT chipsets).

To have this raised with the development team it needs to go back through your commercial channel, can you tell me who this is?

Regards

Matt


#11

Ok, I guess that’s what I needed to know. We’re using relatively low quantities so I’m assuming we don’t have support through our commercial channel. I think our board house is maybe getting parts from Digikey, not sure??

Is there a way to purchase a support contract? It’s not clear to me how to go about that on your website. Can you give me any direction on that?
Thanks.
Brian


#12

Brian,

Now that BC has transitioned into Sierra it is a little difficult reconciling how they worked (small company) to how Sierra does (bigger, more established and rigid procedures because they need to be).

I have asked the dev team about this through Email which is the unofficial way of doing it and they will answer me when they have time. I will try to get back to you with some more information soon.

To answer your actual question, support contracts are only in place with key customers, we do not do them even for the medium sized guys, basically if the business case for number of units sold justifies it then it gets fixed/implemented, general support just happens and the procedures going through the distribution network ensures this, it is trying to be squared off now but the problems for getting definitive support from the super broad liners like Digikey will remain.

Regards

Matt


#13

Okay, thanks for your help.
Brian


#14

Brian,

I have confirmed with the dev team that the burst of command that comes out of the unit as soon as the HFP connects is from the other side not from the BC127. The BC127 does not send commands unless the application commands it to through the ‘AT’ command as per my examples so there is nothing to fix. You need to send the at+cind? command yourself and determine the format/order of the parameters before hand.

Regards

Matt


#15

I am using BC127 with firmware Melody Audio V5.0 RC11 .Can anyone help me out how to enable AT command in bc127 .


#16

The BC127 does not use AT commands it uses a verbose command set similar in principle to AT commands i.e. send the command wait for a response over the serial interface. The command set is given in the document at the below link.

https://source.sierrawireless.com/~/media/support_downloads/airprime/hardware_specs_user_guides/41112426%20melody%20audio%207%20user%20guide%20r1.ashx

Regards

Matt