This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to inmplement Client model on a phone?

Hi!

I met some issue ). 

I use nrf mesh app on my phone and change it for my goals. I would like to get messages from nodes to phone via mesh. I read some posts that it is possible to implement client model on a phone and subscribe to server of nodes to get messages. I tried to figure out how .... And may i should configure node on my phone and then add models?  May be there is examples ? Or you can explain in a nutshell.

Thank you for your time.

Parents
  • Hi,

    I use nrf mesh app on my phone and change it for my goals

    What kind of changes have you made to the app? 

    When you say "subscribe to server of nodes to get messages", do you mean status messages from the server?

    In our current nRF Mesh app, there is a local client model on the phone. Have a look at this thread on how you can receive status messages from server. 

  • I have download from GitHub latest version, but when i start it it shows error: 

    E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
        Process: no.nordicsemi.android.nrfmeshprovisioner, PID: 7448
        java.lang.RuntimeException: An error occurred while executing doInBackground()
            at android.os.AsyncTask$3.done(AsyncTask.java:353)
            at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
            at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
            at java.util.concurrent.FutureTask.run(FutureTask.java:271)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
            at java.lang.Thread.run(Thread.java:764)
         Caused by: java.lang.IllegalStateException: A migration from 10 to 9 was required but not found. Please provide the necessary Migration path via RoomDatabase.Builder.addMigration(Migration ...) or allow for destructive migrations via one of the RoomDatabase.Builder.fallbackToDestructiveMigration* methods.
            at androidx.room.RoomOpenHelper.onUpgrade(RoomOpenHelper.java:117)
            at androidx.room.RoomOpenHelper.onDowngrade(RoomOpenHelper.java:129)
            at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.onDowngrade(FrameworkSQLiteOpenHelper.java:135)
            at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:297)
            at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:194)
            at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(FrameworkSQLiteOpenHelper.java:92)
            at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(FrameworkSQLiteOpenHelper.java:53)
            at androidx.room.RoomDatabase.inTransaction(RoomDatabase.java:476)
            at androidx.room.RoomDatabase.assertNotSuspendingTransaction(RoomDatabase.java:281)
            at no.nordicsemi.android.mesh.data.MeshNetworkDao_Impl.getMeshNetwork(MeshNetworkDao_Impl.java:248)
            at no.nordicsemi.android.mesh.MeshNetworkDb$LoadNetworkAsyncTask.doInBackground(MeshNetworkDb.java:356)
            at no.nordicsemi.android.mesh.MeshNetworkDb$LoadNetworkAsyncTask.doInBackground(MeshNetworkDb.java:325)
            at android.os.AsyncTask$2.call(AsyncTask.java:333)
            at java.util.concurrent.FutureTask.run(FutureTask.java:266)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245) 
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) 
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) 
            at java.lang.Thread.run(Thread.java:764) 

  • At the end I run app at the virtual devices, and I couldn't see Phone tab

Reply Children
No Data
Related