External mode issue for Android hardware package

조회 수: 1 (최근 30일)
Matthew Bigelow
Matthew Bigelow 2018년 12월 15일
답변: Matthew Bigelow 2018년 12월 19일
Hi All
I am having some issue with implementing external mode for an android app using the Simulink Android hardware package. My project requires the android app to read data every 4ms from a ESP8266. The wifi connection is directly between the ESP8266 module and the android phone with no intermediate Access point To connect to the ESP8266 the android phone needs to act in wifi hotspot mode. This means that I cannot connect to wifi on my phone at the same time so when I try to use external mode so I can debug the program and see what is happening I get the error:
The following error occurred during deployment to your hardware board: The device is not connected to a WiFi network. Connect the device to a WiFi network. Once connected, restart the simulation.
Is there a way to change the external mode parameters so that it does not require wifi to communicate with the phone. After all the android is directly connected to the computer by usb.
In the configuration parameters under the hardware Implementation tab the external mode option has a communication interface option, however it seems that it only has a TCP/IP option that cant be changed.
Does anyone know how I can get around this??
Thank you in advance

채택된 답변

Sruthi Yenugula
Sruthi Yenugula 2018년 12월 17일
You can connect your PC to wifi hotspot of your phone and try. Aiternatively you can use data display, scope or mat file logging (supported in 18b ) to debug on the phone itself withoput external mode.
For the external mode to work both phone and PC should be in same network
  댓글 수: 1
Sutanu Maiti
Sutanu Maiti 2018년 12월 17일
External mode over serial not yet supported for Simulnik support package for Android devices (since it does not create a COM port on host computer when plugged using USB cable).
However, you can achieve certain capabilities that you do using external mode, on the phone itself. Like, viewing/logging signals on the phone, displaying data on the screen etc.
Please follow below links:
Infact you can tune certain parameters on Arduino over wifi using Button, Slider or Data input blocks on the phone. You can check below example:

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Matthew Bigelow
Matthew Bigelow 2018년 12월 19일
I didnt have any luck with the hotspot option. Unsure of the reason it wouldnt work using that optiion.
i found the only alternative was to run the esp8266 through the home router as well just for debugging purposes. I find bugging on the phone a painful process.
thankyou for your help guys

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by