How to add IR remote support on VIM4?

Hy @goenjoy Thanks for the updates. Yes we need to update the code and please provide firmware also for test. Thanks.

@goenjoy We have checked the key mapping for VIM4

VIM4 IR Key_Mapping

OnKeyUp 19
OnKeyDown 20
Left 21
Right 22
OK 66
Back 4
Home 122
VolumeUp 24
VolumeDown 25

we got this key_mapping for IR remote for VIM4. can you please check and update
And can you please shear the path for this key_mapping of VIM4. so we can check it.

Bluetooth remotes traditionally send a device to sleep when “powering off” and wake it up when “powering on”.(ex: Nvidia Shield).

The lack of response from the OK button can be resolved via hwdb.

@VikasP

device/khadas$ git diff
diff --git a/common/keyboards/Vendor_0003_Product_0003.kl b/common/keyboards/Vendor_0003_Product_0003.kl
index cfc8679..7daf2b0 100644
--- a/common/keyboards/Vendor_0003_Product_0003.kl
+++ b/common/keyboards/Vendor_0003_Product_0003.kl
@@ -4,6 +4,7 @@ key 103   DPAD_UP
 key 108   DPAD_DOWN
 key 105   DPAD_LEFT
 key 106   DPAD_RIGHT
+key 28    DPAD_CENTER
 key 232    DPAD_CENTER
 key 114   VOLUME_DOWN
 key 63   F5

@goenjoy Thanks for update. can you please share the same for key code for HOME key

@VikasP device/khadas/common/keyboards/Vendor_0003_Product_0003.kl
You can check it yourself. The corresponding key values are all here.

Hi @goenjoy Thanks for solving OK_Key issue.

Now OK Key is working fine

Do you have any suggestions for this remaining issues.
so we can check and try to solve that.

It has been revised again. Please look back.

@VikasP @mbakshi @suhasj These bugs have been solved and relevant codes have been updated. Please download the verification. VIM4_IR_V220908 Firmware upload.

Hi @goenjoy Thanks for providing the Solution

Please Can we get the patches for this …to update in August build

@VikasP @mbakshi @suhasj These bugs have been solved and relevant codes have been updated. Please download the verification. VIM4_IR_V220908 Firmware upload.

@goenjoy, for our releases and further development, we need to freeze the Android code baseline. So, for this, we have decided to use the August release as our baseline code. However, we want to get the further fixes related to IR remote.
So, can you please provide the patches or code where all the IR related issues are fixed?
We will apply these patches in August baseline code and will integrate into our code base.
Thanks!!

@mbakshi You can execute the synchronization code directly.

repo sync -j4

If you need the corresponding patch, you can find the modification code record below.

https://github.com/khadas/android_packages_apps_Settings/commits/khadas-vim4-r-64bit

@goenjoy Thanks for the solution.

Now we are able to make changes to these TWO solutions
2.Settings App (we are not able to select any option in settings)
3.Permission Pop-up Allow/Deny (we are not able to select Allow/Deny option for Application’s using remote)

But still, one is pending

So, can you please provide the patches for this also for the August release.

https://github.com/khadas/android_packages_inputmethods_LatinIME/commits/khadas-vim3-p-64bit

Hi @goenjoy

As i checked We already have these changes in august build but it’s still not working for Virtual Keyboard (we are not able to access the virtual keyboard using IR remote)
can you please check once

@goenjoy

Also one thing we noticed IR remote is not working for Files Application
please give us the solution for this also

You upgrade my firmware(VIM4_IR_V220908 Firmware ) to verify whether this problem is OK? If it is OK, please carefully check whether the value is correct again.

The Files application belongs to Google’s file manager. We will delete this application later. Please use the FileBrowse application.

@VikasP Sorry, we just found that a new bug has been introduced to solve the infrared remote control problem. Please update this submission.
https://github.com/khadas/android_frameworks_base/commits/khadas-vim4-r-64bit

HI There

just picked up a VIM4 for corelec use and was wanting to add this, i believe i have managed to source the IR receiver 3638n3, but is anyone able to dumb this down for me? i can solder and twist wires together but not much more than that i have no idea what half of this means :frowning:

Will a USB IR receiver dongle work for remote on VIM4, out of the box?

Will a bluetooth remote work on VIM4, out of the box?