scoppulal
Full Member level 2
matlab serial communication
Hello!
I have to send command a modem via serial port and want to use Matlab Serial Communication tool.
I used instrfind and matlab recognized the modem, anyway when I try to send AT commands I have no reply from the modem itself!
Also the follwoing message appears:
"Warning: A timeout occurred before the Terminator was reached."
Here follows the code I used:
porta_ser = serial('COM8');
porta_ser.BaudRate = 4800;
porta_ser.DataBits = 8;
porta_ser.Parity = 'none';
porta_ser.StopBits = 1;
porta_ser.FlowControl = 'none';
porta_ser.Terminator ='CR';
fopen(porta_ser);
fprintf(porta_ser,'ATI3')
pause(.1);
fscanf(porta_ser)
fclose(porta_ser);
delete(porta_ser);
Could anybody help please?
Thanks in advance
Hello!
I have to send command a modem via serial port and want to use Matlab Serial Communication tool.
I used instrfind and matlab recognized the modem, anyway when I try to send AT commands I have no reply from the modem itself!
Also the follwoing message appears:
"Warning: A timeout occurred before the Terminator was reached."
Here follows the code I used:
porta_ser = serial('COM8');
porta_ser.BaudRate = 4800;
porta_ser.DataBits = 8;
porta_ser.Parity = 'none';
porta_ser.StopBits = 1;
porta_ser.FlowControl = 'none';
porta_ser.Terminator ='CR';
fopen(porta_ser);
fprintf(porta_ser,'ATI3')
pause(.1);
fscanf(porta_ser)
fclose(porta_ser);
delete(porta_ser);
Could anybody help please?
Thanks in advance