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.

SK-AM62P-LP: Enable CAN interface on Android

Part Number: SK-AM62P-LP

Tool/software:

Hi TI Experts,

I am trying to enable the CAN interface on the SK-AM62P-LP board. The board is running Automotive Android OS 14 (SDK 10.0).

I used the command ip link show from adb shell, but it didn't list any CAN interfaces.

I would like to know the following:

  1. How do I enable the CAN interface and use it in Android?
  2. Which transceiver should be used to enable communication with external devices?
  3. Which pins on the board should be used for connecting to the transceiver?

Thank you!

  • Thank you, Guillaume, for your support. It is working now, and can0 is now showing in the ifconfig list.

    Here are the steps we followed:

    Initially, we tried the instructions from the link you provided:

    However, we encountered the following error:

    Fullscreen
    1
    2
    [ 3.226616][ T136] can_dev: exports protected symbol can_eth_ioctl_hwts
    [ 3.243376][ T136] ueventd: Failed to insmod '/vendor/lib/modules/can-dev.ko' with args '': Permission denied
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    To resolve the exports protected symbol can_eth_ioctl_hwts error, we commented out can_eth_ioctl_hwts in common/android/abi_gki_protected_exports_aarch64.

    We then encountered a similar error for can_ethtool_op_get_ts_info_hwts:


    Fullscreen
    1
    2
    [ 3.589176][ T138] can_dev: exports protected symbol can_ethtool_op_get_ts_info_hwts
    [ 3.597601][ T138] ueventd: Failed to insmod '/vendor/lib/modules/can-dev.ko' with args '': Permission denied
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    So we tried commenting all the CAN related functions from the file common/android/abi_gki_protected_exports_aarch64.

    I have attached the patch file with modifications.

    8750.can_enable.patch.txt
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    diff --git a/android/abi_gki_protected_exports_aarch64 b/android/abi_gki_protected_exports_aarch64
    index 4afadd916..1c05de4ab 100644
    --- a/android/abi_gki_protected_exports_aarch64
    +++ b/android/abi_gki_protected_exports_aarch64
    @@ -5,11 +5,6 @@ __hci_cmd_sync_sk
    __hci_cmd_sync_status
    __hci_cmd_sync_status_sk
    __nfc_alloc_vendor_cmd_reply_skb
    -alloc_can_err_skb
    -alloc_can_skb
    -alloc_candev_mqs
    -alloc_canfd_skb
    -alloc_canxl_skb
    baswap
    bt_accept_dequeue
    bt_accept_enqueue
    @@ -44,37 +39,6 @@ btbcm_set_bdaddr
    btbcm_setup_apple
    btbcm_setup_patchram
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please share your thoughts on this.

  • Hi Tony,

    Thanks a lot for sharing your solution with us.

    It's a bit odd that can symbols cannot be used according to the GKI symbol list. We will give it some more thought.

  • Hi Tony,

    Your changes are ok for now, we have not other solutions for now to fix this protected symbols problem,
    we will do a patch with your change to be include in next release.

    Thanks.
    Guillaume