Project

General

Profile

problem with wifi monitoring ESP32C3

Added by Suphichaya Youngsubtargul (โอปอ) over 1 year ago

Hi - I am using esp32c3 and I have couple of problems with monitoring. Mostly Wifi server does not grant IP by DHCP during connections. Rare the server on esp32 can be pinged . And when I manage to join its break the connection.

Log:
Parameter precision loss occurred for 'Gain' of 'esp324/Gain2'. The parameter's value cannot be represented exactly using the run-time data type. A small quantization error has occurred. To disable this warning or error, in the Configuration Parameters > Diagnostics > Data Validity pane, set the 'Detect precision loss' option in the Parameters group to 'none'.
Component:Simulink | Category:Block warning Suppress
host endian mode: Little
byte swapping required: false
External mode structural checksum received from target: [0xbf1add34, 0x1e26d68a, 0xfd2a8cad, 0xde767933].
target integer only code: false
target multiword chunk size: 4 bytes
action: EXT_CONNECT
External mode TARGET_CONNECT checksum test:
Host model structural checksum: [0xbf1add34, 0x1e26d68a, 0xfd2a8cad, 0xde767933].
Target model structural checksum: [0xbf1add34, 0x1e26d68a, 0xfd2a8cad, 0xde767933].

Downloading parameters for:
block : esp324/Gain2
Parameter name : Gain
Function of :
param : Gain
Data Type Trans: 0
Start index : 0
nEls: : 1
Data Type : [int16, 4]
Values:
20485
action: EXT_SETPARAM
Component:Simulink | Category:Model
Saving external mode simulation output as a single object is not supported because the workspace variable 'out' is not created during model code execution. To suppress the warning, set 'ReturnWorkspaceOutputs' to 'off'.
Component:Simulink | Category:Model warning
action: EXT_SELECT_SIGNALS
action: EXT_CANCEL_LOGGING
Got EXT_SETPARAM_RESPONSE from target with status OK.
Got EXT_SELECT_SIGNALS_RESPONSE from target for upInfoIdx 0 with status OK.
action: EXT_SELECT_TRIGGER
Got EXT_CANCEL_LOGGING_RESPONSE from target for upInfoIdx 1 with status OK.
action: EXT_DISCONNECT_REQUEST_NO_FINAL_UPLOAD
action: EXT_DISCONNECT_CONFIRMED
Component:Simulink | Category:Model
Error occurred while executing External Mode MEX-file 'ext_wifi_comm':
ExtTargetPktPending() call failed while checking for target pkt
Component:Simulink | Category:Block diagram error
Error occurred while executing External Mode MEX-file 'ext_wifi_comm':
ExtSetTargetPkt() call failed on CLOSE.
Ensure target is still running

Now I am using discrete no continuous states with auto step and treat each discrete rate as separate task
Is it possible to use ode3 with continuous blocks?


Replies (2)

RE: problem with wifi monitoring ESP32C3 - Added by Suphichaya Youngsubtargul (โอปอ) over 1 year ago

Hi Arkadiusz,

Thank you for reaching out, may I please know which MATLAB and Waijung 2 version are you using?

RE: problem with wifi monitoring ESP32C3 - Added by Suphichaya Youngsubtargul (โอปอ) over 1 year ago

Arkadiusz,

I was able to reproduce this error on my end as well.

How important is a sample time of 0.01 for your project? If you just change it to 0.1 or keep the default value of -1 then it works perfectly fine.

Also, I'm not sure which kind of sensor you are using for the ADC block, but for the sensor I used I had to change the ADC attenuation from 6dB to 11dB to make it work.

In addition, since you are operating in external mode, please do use an external wifi dongle (in case you aren't already).

Let me know how it goes, looking forward to your reply.

    (1-2/2)