Info
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
SAMSUNG GALAXY S4 CANNOT run simulink model on it
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
I want to run an example Simulink model on Samsung galaxy s4 The example is called "Getting Started with Samsung GALAXY Android Devices" and is found in Simulink after I installed bot packages for Samsung Galaxy and Android sensors I open the model and select "Deploy to hardware" after I have connected the Phone to USB After it is deployed my phone screen goes black at the top appears Hello World, android getting started. That's all. There is no sensor data displayed on the screen on my phone or matlab.... Am I doing something wrong ?
3 comentarios
Juan Harrell
el 17 de Abr. de 2015
When you look at the Java code file generated, it doesn't appear that the Simulink Blocks for Display (under sinks) generate any type of android.widget for a display. Looks like they need to provide a Display or text box block for Android. ?Wonder how they tested their examples ? ?
If you add an android Button block to your model, it does generate a button on the screen and an associated android.widget.ToggleButton in the java code file. as below:
import android.view.View;
import android.widget.ToggleButton;
import java.util.Hashtable;
Juan Harrell
el 17 de Abr. de 2015
The text, "Hello World, appname" is found in the file 'main.xml' located in your folder:
MATLAB\simsucks1_rtt\simsucks1\res\layout
where simsucks1 is the name of your application.
You can modify the text and Deploy to Hardware and it will modify the second line of text you see. But I assume it will revert to the Hello World each time it rebuilds and regenerates the file 'main.xml' . Don't know yet what generates that file.
Respuestas (1)
Vivek Selvam
el 20 de Abr. de 2015
This is because the Simulink Display blocks are not getting the information from the Samsung GALAXY Android Devices after it has been deployed (Normal Mode simulation).
When you run the simulation in External Mode , you would get back the data from the device to the Simulink Display block in the model.
Until R2015a, there are no blocks to display the numbers in the device. Therefore you would need to implement it. One way to implement it is to send the data to the ToApp block. Then override the expected function in the Android app to use the data.
Note: Samsung GALAXY Android Device Display block is different from the Simulink Display block. Samsung GALAXY Android Device Display block is used to show video on the device display.
3 comentarios
Juan Harrell
el 22 de Abr. de 2015
In External mode. It builds and downloads the application to the android device, but when it runs, it says it can't connect to my S4 for the program. My device is not a company device so It's on a different WiFi than the computer running Matlab. Is it trying to connect through the WiFi / network rather than on the USB? Does it have to be connected to the same network as the computer ? (No Matlab Mobile involved here. )
Vivek Selvam
el 8 de Mayo de 2015
Unfortunately, currently there is no out-of-the-box functionality in the Support Package for numeric display on the Android device. I apologize for any inconvenience this has caused. I have communicated this enhancement request to our development team who will study this functionality further and will consider implementing in a future release.
Regarding the ToApp block workflow, once you have imported the project, say in Eclipse, to include your java code, Simulink does not replace your java code on rebuild of the model. So you do not need to rewrite the java code.
The external mode communication happens using the WiFi and therefore your computer and S4 needs to be on the same computer.
La pregunta está cerrada.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!