Help me in Matlab, Port, AT commands

Discussion in 'Programmer's Corner' started by Eng_Bandar, Aug 5, 2010.

  1. Eng_Bandar

    Thread Starter Active Member

    Feb 27, 2010
    50
    1
    Hi all,

    I want make code by matlab to send SMS through Nokia mobile and this mobile support AT commands. I use usb cable to connect mobile with computer. ( I think problem from usb but I am not sure )

    Code ( (Unknown Language)):
    1.  
    2. [SIZE=2][FONT=Courier New][SIZE=2][FONT=Courier New]s = serial([/FONT][/SIZE][/FONT][/SIZE][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'COM3'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]);[/SIZE][/FONT]
    3. [SIZE=2][FONT=Courier New]set(s,[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'BaudRate'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],9600);[/SIZE][/FONT]
    4. [SIZE=2][FONT=Courier New]fopen(s);[/FONT][/SIZE]
    5. [SIZE=2][FONT=Courier New]tx=[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'AT+CMGS="xxxxxxxxx"'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]; [/SIZE][/FONT][/SIZE][/FONT]
    6. [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]// where xxxxxxxx mobile number and AT+CMGS protocol to send [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]sms by mobile [/SIZE][/FONT]
    7. [SIZE=2][FONT=Courier New]fprintf(s,[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'%s'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],tx);[/SIZE][/FONT]
    8. [SIZE=2][FONT=Courier New]a = [/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'ss'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2];[/SIZE][/FONT]
    9. [SIZE=2][FONT=Courier New]fprintf(s,[/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]'%s'[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2],a);[/SIZE][/FONT]
    10. [SIZE=2][FONT=Courier New]fclose(s) [/FONT][/SIZE][/SIZE][/FONT]
    11. [FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]delete(s) [/SIZE][/FONT]
    12. [SIZE=2][FONT=Courier New]clear [/FONT][/SIZE][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0][FONT=Courier New][SIZE=2][COLOR=#a020f0]s[/COLOR][/SIZE][/FONT]
    13. [/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    but when I run the code nothing happen.
     
  2. minsky

    New Member

    Sep 13, 2011
    1
    0
    excuse me..did you found a solution to that matter..I really need it and i couldn`t find something usefull..regards..
     
Loading...