Raw modem communications

Discussion in 'Programming' started by Red Squirrel, Feb 11, 2013.

  1. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,522
    Likes Received:
    520
    What are typical commands to establish a modem call to terminal device (DMS 10 in this case but I imagine this should be standard) and get to a state where I can send text to the terminal? I can use a program like Procom and connect that way, but I'm looking to know how to do this at the raw level, as I want to do it programatically.

    I know I can do atdt [number] to dial to the terminal server, but I just get no carrier. I imagine I need to setup certain parameters such as the baud rate, hardware flow control etc... what are the commands in order to do this?
     
  2. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Joined:
    Oct 30, 2000
    Messages:
    42,600
    Likes Received:
    0
    Commands are usually hardware specific.

    The manufacturer will provide a list of commands needed to use the hardware and possibly a command to interrogate the equipment for details.
     
  3. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,682
    Likes Received:
    3
    Don't they still use the 'AT' command set?
     
  4. Ken g6

    Ken g6 Programming Moderator, Elite Member
    Moderator

    Joined:
    Dec 11, 1999
    Messages:
    11,762
    Likes Received:
    52
    It's been a very long time since I used a modem. (That wasn't DSL, anyway.) I recall that keeping the speaker on might help diagnose "No Carrier" problems. And [thread=586562]this thread[/thread] might help keep the speaker on.
     
  5. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Joined:
    Oct 30, 2000
    Messages:
    42,600
    Likes Received:
    0
    Most do.

    However, when you have to select the type of modem from a list; that indicates that something may not be completely compatible.
     
  6. Nothinman

    Nothinman Elite Member

    Joined:
    Sep 14, 2001
    Messages:
    30,672
    Likes Received:
    0
    The basic dial, hang up, etc commands are standard but some require manufacturer or device-specific in order to change settings and features on them. I would think that just dialing up to a device and establishing a connection with the default settings would work with the standard AT commands, but you never know.
     
  7. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,682
    Likes Received:
    3
    Yeah, that should work, and for device-specific commands they are usually just an extension of the basic command strings. Been a long time since I poked a modem over a serial port, though. Like 20 years.
     
  8. EagleKeeper

    EagleKeeper Discussion Club Moderator<br>Elite Member
    Staff Member

    Joined:
    Oct 30, 2000
    Messages:
    42,600
    Likes Received:
    0
    I never tried communication over a parallel port :p
    And did the internet exist 20 years ago when you did not use dialup :confused:
     
  9. DaveSimmons

    DaveSimmons Elite Member

    Joined:
    Aug 12, 2001
    Messages:
    38,674
    Likes Received:
    12
  10. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,682
    Likes Received:
    3
    Let's see... 20 years would be 1993... so no. At that time the leader would have been AOL, with Prodigy still in the game if I recall correctly. Actually, I haven't programmed a modem since the late 80's, so it's even longer. If memory serves it was to send custom commands to Compuserve. And as Dave notes it was called the "Hayes" command set, because Hayes was the early standard in modems.
     
  11. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,522
    Likes Received:
    520
    Yeah I think it definitely would be AT commands, just not too sure what to do to set the baud rate and such or if anything else has to be done. There's a baud rate to setup when talking to the modem, but that's not the same as the baud rate from the modem to the device. We have those setup in Procomm but it does all the background work for you so I can't see what is actually happening before I get to the login screen.

    I managed to connect once, I forget what I did, but I got CONNECT / 1200 or whatever but when I typed it was giberish. So I imagine there may be some encoding parameters too that need to be setup. The normal way to connect would be to use a terminal emulator and pick the modem (and not the com port) so finding this info may be tricky.

    Wonder if I could maybe sniff the com port somehow to see how the program is connecting.

    Other interesting tidbit I was reading is you can set a modem as the receiver too. So I think with this you could technically dial in to a Linux box. I totally have to try that one day for kicks. Would tie up my phone line though so not ideal. :p
     
    #11 Red Squirrel, Feb 11, 2013
    Last edited: Feb 11, 2013
  12. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,682
    Likes Received:
    3
    Maybe try a serial port/rs-232 sniffer and see what Procomm is sending? There are a bunch out there, but I don't know whether the free ones are any good. If I remember correctly the baud rate is set in the connect command string, either as 'auto' or a specific rate, but I'm really dragging cobwebs out of the attic to get even that much :).
     
  13. Apathetic

    Apathetic Platinum Member

    Joined:
    Dec 23, 2002
    Messages:
    2,572
    Likes Received:
    0
    Dang it's been a while since I've played with this stuff. It sounds like either the parity or the number of data bits is off. From what I remember, the two most common configurations were "7E1" (7 data bits, even parity, and 1 stop bit) and "8N1" (8 data bits, no parity, and 1 stop bit).

    I seem to remember the rule being "never trust the default" and always manually specify these settings so you know what you have but it's been so darn long.

    Dave
     
  14. Markbnj

    Markbnj Elite Member <br>Moderator Emeritus
    Moderator

    Joined:
    Sep 16, 2005
    Messages:
    15,682
    Likes Received:
    3
    Up next in this thread: how to rewire the front panel switches of your Altair!
     
  15. Red Squirrel

    Red Squirrel Lifer

    Joined:
    May 24, 2003
    Messages:
    36,522
    Likes Received:
    520
    Maybe I can interface the DMS10 with an Altair. Hmmmm...

    Actually gotta give it to Northern Telecom (Nortel), their equipment is rock solid. We have a DMS100 upstairs that has been running for over 30 years. Never been power cycled. Most landlines today are actually powered by DMS equipment.

    But yeah, think at this point I will look at sniffing the serial port, probably the best bet to see what the command strings are.
     
  16. Rasterman

    Rasterman Member

    Joined:
    Jan 7, 2008
    Messages:
    25
    Likes Received:
    0
    Don't you have somewhere else to be?

    Markbnj
    Programming mod
     
    #16 Rasterman, Feb 19, 2013
    Last edited by a moderator: Feb 20, 2013