Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blisp for Android phone #17

Open
River-Mochi opened this issue Jan 26, 2023 · 4 comments
Open

Blisp for Android phone #17

River-Mochi opened this issue Jan 26, 2023 · 4 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@River-Mochi
Copy link
Collaborator

River-Mochi commented Jan 26, 2023

Would it be possible in the future to have Blisp for Android phones to update the V2 newer Pinecils? This might be good alternative for the many people who may have issues updating from windows/Mac/Linux and most all people have a cell phone.

I have a couple old Android phones with USB-C ports on them that would work for this purpose and I wonder if the PinePhone could be used too although I do not have this to test with.

I remember that with V1 original someone reported they were able to use DFU on it to update it but I don't know what phone they used or how they did it, they didn't give details.

@gamelaster gamelaster added the enhancement New feature or request label Jan 26, 2023
@gamelaster
Copy link
Member

Yes, it is possible 😊

@River-Mochi River-Mochi added the help wanted Extra attention is needed label Mar 4, 2023
@robertlipe
Copy link
Collaborator

In case anyone wants to tackle this, there are two milestones.

  1. Use https://developer.android.com/ndk, porting all the fiddly serial and USB code to native Android constructs. All of the libraries (libserialport, argtable) will need to be found (and they're not common) or, more realistically, ported as well. You'll have to contend with the Android permissions model which really doesn't like arbitrary programs being able to read and write files that are outside the package that owns them. (It can be be done...) Upon completion, you have a command line Android program which is probably useful to a number of people that rounds to zero. I'm not even totally sure if serial drivers are present, so you may have to go down to libusb-style level of programming https://developer.android.com/guide/topics/connectivity/usb/host and be prepared to implement the serial interfaces yourself.

  2. Take the library part of blisp (and as a practical matter, this almost requires 100% of job (1)) and wrap it in Jave JNI wrappers (https://developer.android.com/training/articles/perf-jni), providing a unique Java<->Native signature bridge interface for each method that specifies how arguments are to be marshaled and passed (battling the differing native and Java requirements for memory alignment and protection from harvesting) between the two sides. Then use Flutter/Kotlin/Android Java to build up a user interface that handled a file picker (https://developer.android.com/training/data-storage/shared/documents-files and/or Google-Drive-style storage) and drove the native code to do the upload.

It would not be trivial.

I wonder if a better (more generally useful) solution would be to ensure that firmware updates over bluetooth worked. Then updates could happen from any host OS via sharing a file, perhaps after putting the iron in a special mode to quiesce and receive a new image.

@River-Mochi
Copy link
Collaborator Author

I wonder if a better (more generally useful) solution would be to ensure that firmware updates over bluetooth worked.

I thought we asked about firmware updates over BLE before and either Ralim or Gamiee said there would be issues with it failing but I dont remember the details, this was discussed back in Aug 2022 iir in chat.

@River-Mochi
Copy link
Collaborator Author

@mutx /goe (mr./worldwide) say he would look into this perhaps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants