iMX8MPLUS - ANDROID BSP

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

iMX8MPLUS - ANDROID BSP

342 Views
parvathitp
Contributor I

Hello,

I am new to the i.MX platform and Android BSP.
I am using i.MX8M Plus with the NXP Android BSP, and I am developing a display system (digital cluster) that communicates with the CAN bus.

I want to confirm if my understanding of the process is correct:-

-> I download and flash the Android BSP image from NXP (which includes the Linux kernel and CAN drivers).

->The BSP already supports SocketCAN, so I don’t need to modify the CAN HAL or kernel code.

->From Android Studio, I can build an app that:

          -Opens the SocketCAN interface (e.g.,can0 using C/C++ via NDK/JNI

 

          -Receives CAN frames from the bus

          -Decodes them and updates UI variables (like speed, RPM, etc.) in the Android app                       (Java/Kotlin layer)

->In the future, I plan to add camera and navigation features, which I also plan to implement in the same Android Studio app.

 

Could you please confirm:

-> Is this overall approach correct for using CAN communication in an Android BSP environment?

-> Is it the right way to open and read SocketCAN data from an app using Android Studio (through JNI)?

-> For camera and navigation integration, is it also fine to develop them directly in Android Studio (application layer)?

->If this process is not correct, could you please explain the proper method or architecture I should follow?

 

I am very new to this platform, so I would really appreciate a clear explanation or references to official documentation that describes the correct flow for Android BSP development with CAN.

0 Kudos
Reply
1 Reply

298 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

Mostly yes, you are correct if you want to create an app for android using Android studio is your way to go, for this you'll need to check Android documentation and there is no better place than Android developer web page:
https://developer.android.com/studio/intro

Also, I would recommend to first have a couple of testings on Linux first so you get used to the board and the CAN interface and then switch to the Android world.

Best regards/Saludos,
Aldo.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2180973%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EiMX8MPLUS%20-%20ANDROID%20BSP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2180973%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSTRONG%3EHello%2C%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EI%20am%20new%20to%20the%20i.MX%20platform%20and%20Android%20BSP.%3CBR%20%2F%3EI%20am%20using%20i.MX8M%20Plus%20with%20the%20NXP%20Android%20BSP%2C%20and%20I%20am%20developing%20a%20display%20system%20(digital%20cluster)%20that%20communicates%20with%20the%20CAN%20bus.%3C%2FP%3E%3CP%3E%3CSTRONG%3EI%20want%20to%20confirm%20if%20my%20understanding%20of%20the%20process%20is%20correct%3A-%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%26gt%3B%20I%20download%20and%20flash%20the%20Android%20BSP%20image%20from%20NXP%20(which%20includes%20the%20Linux%20kernel%20and%20CAN%20drivers).%3C%2FP%3E%3CP%3E-%26gt%3BThe%20BSP%20already%20supports%20SocketCAN%2C%20so%20I%20don%E2%80%99t%20need%20to%20modify%20the%20CAN%20HAL%20or%20kernel%20code.%3C%2FP%3E%3CP%3E-%26gt%3BFrom%20Android%20Studio%2C%20I%20can%20build%20an%20app%20that%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20-Opens%20the%20SocketCAN%20interface%20(e.g.%2Ccan0%20using%20C%2FC%2B%2B%20via%20NDK%2FJNI%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20-Receives%20CAN%20frames%20from%20the%20bus%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20-Decodes%20them%20and%20updates%20UI%20variables%20(like%20speed%2C%20RPM%2C%20etc.)%20in%20the%20Android%20app%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B(Java%2FKotlin%20layer)%3C%2FP%3E%3CP%3E-%26gt%3BIn%20the%20future%2C%20I%20plan%20to%20add%20camera%20and%20navigation%20features%2C%20which%20I%20also%20plan%20to%20implement%20in%20the%20same%20Android%20Studio%20app.%3C%2FP%3E%3CBR%20%2F%3E%3CP%3E%3CSTRONG%3ECould%20you%20please%20confirm%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E-%26gt%3B%20Is%20this%20overall%20approach%20correct%20for%20using%20CAN%20communication%20in%20an%20Android%20BSP%20environment%3F%3C%2FP%3E%3CP%3E-%26gt%3B%20Is%20it%20the%20right%20way%20to%20open%20and%20read%20SocketCAN%20data%20from%20an%20app%20using%20Android%20Studio%20(through%20JNI)%3F%3C%2FP%3E%3CP%3E-%26gt%3B%20For%20camera%20and%20navigation%20integration%2C%20is%20it%20also%20fine%20to%20develop%20them%20directly%20in%20Android%20Studio%20(application%20layer)%3F%3C%2FP%3E%3CP%3E-%26gt%3BIf%20this%20process%20is%20not%20correct%2C%20could%20you%20please%20explain%20the%20proper%20method%20or%20architecture%20I%20should%20follow%3F%3C%2FP%3E%3CBR%20%2F%3E%3CP%3EI%20am%20very%20new%20to%20this%20platform%2C%20so%20I%20would%20really%20appreciate%20a%20clear%20explanation%20or%20references%20to%20official%20documentation%20that%20describes%20the%20correct%20flow%20for%20Android%20BSP%20development%20with%20CAN.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2182342%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20iMX8MPLUS%20-%20ANDROID%20BSP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2182342%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3CBR%20%2F%3E%3CBR%20%2F%3EMostly%20yes%2C%20you%20are%20correct%20if%20you%20want%20to%20create%20an%20app%20for%20android%20using%20Android%20studio%20is%20your%20way%20to%20go%2C%20for%20this%20you'll%20need%20to%20check%20Android%20documentation%20and%20there%20is%20no%20better%20place%20than%20Android%20developer%20web%20page%3A%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fdeveloper.android.com%2Fstudio%2Fintro%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdeveloper.android.com%2Fstudio%2Fintro%3C%2FA%3E%3CBR%20%2F%3E%3CBR%20%2F%3EAlso%2C%20I%20would%20recommend%20to%20first%20have%20a%20couple%20of%20testings%20on%20Linux%20first%20so%20you%20get%20used%20to%20the%20board%20and%20the%20CAN%20interface%20and%20then%20switch%20to%20the%20Android%20world.%3CBR%20%2F%3E%3CBR%20%2F%3EBest%20regards%2FSaludos%2C%3CBR%20%2F%3EAldo.%3C%2FP%3E%3C%2FLINGO-BODY%3E