Re: Testing COM ports

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi john, et al.
I've tried three ways of getting a response from the modem.

fn=open("COM2","ub")
  puts(fn,"atz\r")
  -- note the ^^ carriage return instead of linefeed \n
  close(fn)
fn=open("COM2","rb")
  while 1 do
    o=getc(fn)
    puts(1,o)
    -- ctrl-break, some work needs to be done here...
  end while


include ports.e --available at the Euphoria homepage.
Output(97,#2F8)  --a
Output(116,#2F8) --t
Output(122,#2F8) --z
Output(13,#2F8)  --\r

and finally this cheap alternative:
system ("echo atz > com2",2)

 Regards, Einar.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu