4

I'm sending AT-Command to gsm modem through serial port.

At the end of the AT-Command I have to terminate the command with Ctrl+z

How would I do that in serial port?

Nightfirecat
  • 11,432
  • 6
  • 35
  • 51
Stacker
  • 8,157
  • 18
  • 73
  • 135

3 Answers3

8

try this

(char)26

detail on ascii of char-z

Nightfirecat
  • 11,432
  • 6
  • 35
  • 51
Arjun Shetty
  • 1,575
  • 1
  • 15
  • 36
1

Send the ASCII character 0x1A.

Have a look at the ASCII code table

John Oxley
  • 14,698
  • 18
  • 53
  • 78
0

Use this Command

port.Write(txt_msgbox.Text + char.ConvertFromUtf32(26));

Shiridish
  • 4,942
  • 5
  • 33
  • 64