KW36: HID keyboard to iphone doesn't work

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

KW36: HID keyboard to iphone doesn't work

3,597 Views
skalyan2
Contributor IV

Hello,

I changed the hid report map from hid mouse to hid keyboard in hid_device example of KW36 and tried to send the "volume up" via ble hid keyboard to Samsung A30 and iphone X(ios version : 12.4) , Samsung A30 increases the volume whereas the iphone does not increase the volume, seeking your support here asap.

Regards,
Sai Kalyana Raman

15 Replies

2,811 Views
bankinfozone54
Contributor I
0 Kudos

2,811 Views
xing_chang
NXP Employee
NXP Employee

Hi skalyan2@visteon.com‌,

Please modify the code as below

PRIMARY_SERVICE(service_device_info, gBleSig_DeviceInformationService_d)     CHARACTERISTIC(char_manuf_name, gBlaseSig_ManufacturerNameString_d, (gGattCharPropRead_c) )         VALUE(value_manuf_name, gBleSig_ManufacturerNameString_d, (gPermissionFlagReadable_c), sizeof(MANUFACTURER_NAME)-1, MANUFACTURER_NAME)     CHARACTERISTIC(char_model_no, gBleSig_ModelNumberString_d, (gGattCharPropRead_c) )         VALUE(value_model_no, gBleSig_ModelNumberString_d, (gPermissionFlagReadable_c), 14, "HID Mouse Demo")    CHARACTERISTIC(char_serial_no, gBleSig_SerialNumberString_d, (gGattCharPropRead_c) )         VALUE(value_serial_no, gBleSig_SerialNumberString_d, (gPermissionFlagReadable_c), 7, "BLESN01")    CHARACTERISTIC(char_hw_rev, gBleSig_HardwareRevisionString_d, (gGattCharPropRead_c) )         VALUE(value_hw_rev, gBleSig_HardwareRevisionString_d, (gPermissionFlagReadable_c), sizeof(BOARD_NAME)-1, BOARD_NAME)
0 Kudos

2,811 Views
skalyan2
Contributor IV

Hi xingzhang‌,

Thanks xing for your response.

It works finally:smileyhappy: 

Regards,

Sai Kalyana Raman

0 Kudos

2,811 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,


Could you please share your sniffer log ? Is the connection being made in the iPhone ? How are you sending the packets ? The sniffer log will help so we can compare what it's sending in the android side vs what its sending in the iOS side.

Regards,

Estephania

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hi estephania_martinez‌,

Yes the connection is being made in iphone. I am sending packets through hid.

Please find the attachment.

Request to provide your quick support here.

If i connect the android and try to send the same hid events via ble hid (for eg: volume up), the android does react to it and hid works very well but iphones doesn't.

Regards
Sai Kalyana Raman

0 Kudos

2,811 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

In which format are those files saved? I was not able to open them, are those the Bluetooth LE logs? Because I need the Bluetooth LE ones.

How are you setting the report for the volume ? Are you setting both volume up and down ? Are you using 1 byte? 2 bytes or 3 bytes?

Regards,

Estephania

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hi estephania_martinez‌,

The files are saved in .cfa format, you may open using this software tool:

http://fte.com/support/download.aspx?demo=SD&type=capture&iid=1v , 

The attached logs are Bluetooth le logs only.

I am setting report for volume, i am setting for volume up only.

I use one byte in the report for sending only volume up.

Please analyze and come back asap as i am need of this, many thanks for your understanding.

Regards,

Sai Kalyana Raman

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hi estephania_martinez‌, 

Can you please provide your analysis as i am need of meeting my delivery deadlines.

Many thanks for your understanding.

Regards

Sai Kalyana Raman

0 Kudos

2,811 Views
estephania_mart
NXP TechSupport
NXP TechSupport

Hello,

Sorry for the late response, I have been checking and investigating about the issue you are experiencing. If the command works well in the android device , it would seem that the issue might be due to the restriction in the HID commands from the iOS side, it seems that it need an application to control the volume for what you are trying to do, which would be more in the app development side.

Sorry for the inconveniences this might cause you.

Regards,
Estephania

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hello,

I have one question:

If my hid keyboard device is successfully paired,bonded and connected to iphone, then the apple virtual keyboard should not appear right, since my connected device acts as a physical keyboard right?
Why virtual keyboard is still appearing to type text ?

According to apple accessory requirements, the device needs to be just paired and bonded to execute hid commands,

if the device is not bonded successfully then only it seems ios will not allow executing hid commands.
i suspect my FRDM-KW36 POC board (running with hid-device) is not bonded successfully with ios device though i have enabled gAppUseBonding_d.

Could you please check wheather KW36 hid device example is getting bonded successfully with iphones because i see some issues in autoconnection of iphones to kw36 also?

Regards,
Sai Kalyana Raman

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hello,

I request to provide an immediate analysis for my query as it is a blocker for us.

Please provide your support.

Regards

Sai Kalyana Raman

0 Kudos

2,811 Views
Xiang_Li
NXP Employee
NXP Employee

Hi Sai Kalyana Raman,

I did some google on this topic. It seems that all HID events are directly consumed by iOS. The user app cannot see the HID events. If you did send a HID message to control the volume on an iphone, at the end, it is the iOS to decide how to interpret and react to this message.

I don't know much about apple development. But it is apparent that Apple wants to control which HW can be connected to and be used together with a iDevice. So I'd suggest to contact Apple, try to understand how to make a HID device for them.

Btw, aside from volume, do your other HID features working on the iphone?

Regards,

Xiang

2,811 Views
skalyan2
Contributor IV

Hi nxa20520‌,

I tried sending a,b,c via hid keyboard to iphone,it is also not working, no hid features are working.

In android phones, there is option to disable virtual keyboard when physical keyboard is connected , so when i connect my kw36 successfuly with android phone and when that option "virtual keyboard" in android phone is disabled, my kw36 acts as a physical keyboard  and virtual keyboard of android  disappears and if i send a,b,c it is successfully received by android.

I do not have any option to disable "virtual keyboard" in iPhone like android.

 Also one of our third party app developer have tried with arduino chipset and he has just paired and bonded successfully with iphone and tried hid keyboard commands like a,b,c etc are all executing properly without any issues, he also tried by sending directly volume commands also, it is working without any issues, he said that apple phone just expect to pair,bond and connect  hid successfully to execute hid commands.

When i use kw36, i have taken apple log and saw that apple has recieved it but didnt execute hid keybaord commands like a,b,c , so when i checked with my colleague, he said that the only requirement  that apple phones expect is just the phone to be paired and bonded successfully with kw36 to execute hid commands and also what he said was,  if pairing and bonding is successfully happened with iphone, then ios automatically will  not show the native virtual keyboard till the kw36 is disconnected  or unbonded/unbounded. Can you please check the apple accessory requirements for connection parameters and pair,bond,connect with iphone and try sending "a" via hid keyboard? The only way we csn confime that we have bonded with iphone is the native virtual keyboard shall disapper.

Regards,

Sai Kalyana Raman 

0 Kudos

2,811 Views
Xiang_Li
NXP Employee
NXP Employee

Hi Sai Kalyana Raman,

Sorry but there is not much info I could get from your description. Basically you said:

- An arduino chipset works, but kw36 doesn't

- After connection/pairing/bonding, it should just work.

For arduino, could you at least tell which board type it is, what chipset exactly it is using? arduino does not produce silicon chips. They only make boards.

Also you could try to make a sniffer log with arduino which works, and another log with KW36. Comparing the difference, and it should give you more insights.

On the kw36 side, how do you build your HID application, do you start from an example from our SDK? If yes, please also provide that information.

I don't have an iphone at hand to do this test. Also I don't think it is within our scope of work to do so. We can try to help you, but you also need to do 1 level deeper analysis.

Kind regards,

Xiang

0 Kudos

2,811 Views
skalyan2
Contributor IV

Hi nxa20520‌ / xingzhang / jameszhang1z

@xing zhang and @james zhang : As discussed in today's call, i have attached the iphone snoop log,

As mentioned above, we have tried sending some hid commands to iphone from arduino which was successfully executed by iphone and we can see hid is working in iphone,

Attached iphone snoop log File name: hid_Working_with_arduino_SnoopLogs_taken_in_iphone.7z

Also attached the airtrace and iphone snoop log taken between KW36 and iphone (file name :  airtrace_and_iphone_snoop_log_taken_with_kw36.zip)

The only requirement that ios has to execute hid commands is, to successfully pair and bond with it.

Please analyze the attached logs and get back to us asap.

Thanks

Regards,

Sai Kalyana Raman

0 Kudos