This code is based on code found in HACKSPACE #44 p98,p100 http://hsmag.cc/Simpleterm purchased from Tesco's

Simplified version

🖥️ SimpleModem - Using Modem and Chrome or Edge

Use Edge or chrome, Plug in a USB modem like these Modems

For security reasons, you need to grant permission to access the serial ports used by your modem. Press Connect.

Modem: |

AT commands:

NOTE: If you type while waiting for the CONNECT, the call is dropped.

mixed

This should be selected before text arrives. none:- mixed + codes: GEEMARC feature: StripParity:

rcvd

sent

input

NOTE: buttons hidden until Modem/serial port is connected


waiting Auto Typing: To From These are turned off at the end of the call.

Special words #fast #slow #pause GA

Try to not hang up if Carrier lost: detectNO CARRIER

Additional Modem Commands

ATS0=0 - modem auto answer

ATS0=1 - modem auto answer, one ring, ADT reports busy if two rings

ATS0=0 - modem auto answer

ATE1 - turn on local echo.

ATE0 - turn off local echo.

AT+MS=0,,, - puts some modems into V.21 mode 300 baud.

AT+MS=V21 - puts some modems into V.21 mode 300 baud.

AT+MS=V23C - puts some modems into V.23 mode

AT+MS=B103 - puts some modems into Bell 103 mode 300 baud.

AT+MS=0,,, - puts some modems into V.21 mode 300 baud.

ATS10=255 - Carrier Losss

AT&V - Sregs values

AT&V1 - Dump Last call

charset="ISO-8859-1" - not UTF8

S7 Wait Time for Carrier, Silence, or Dial Tone 1-255 s * 50 
S8 Pause Time for Dial Delay Modifier 2-255 s * 1 
S9 Carrier Detect Response Time 1-255 0.1 s * 6 
S10 Lost Carrier To Hang Up Delay 1-255 0.1 s * 14

ati3

CX93001-EIS_V0.2002-V92

OK

// Turn OFF Hang up on loss of carrier 
ATS10
OK
ATS=0
OK

// Set up V21
AT+MS=V21

OK

ATDT 01912226646, 

CONNECT 115200
wn FOX JUMPS OVER THE LAZY DOG , GA # ===== 1234
01234567890 

NO CARRIER
+++ATH0 

OK

Flush Text often

flush to modem in short blocks, to limit length of string sent to modem.

MIXED: when both ends are sending, what do your if they overlap?

Memory Leak

This demo does not delete old text so it is effectivly a memory leak! If left to run for a long time the page gets slower and slower. Re-open it.

This code is based on code found in The Raspbarry Pi HACKSPACE magazine #44 p98,p100
http://hsmag.cc/Simpleterm 
https://www.connectedlittleboxes.com/simpleterm.html
http://hsmag.cc/CLBproject

Local MODEM support.

This code is based on code found in Raspberry Pi magazine HACKSPACE #44 p98,p100 http://hsmag.cc/Simpleterm purchased from Tesco's.

Chrome and Edge can drive serial ports to support cloud based tools. Plug a modem in, and if seen, you can connect to it, using the connect button.

Modems are controlled by AT commands and send inband keywords like OK, ERROR, CONNECT, RING.

A call back function is used to receive text from the modem and look for the key words. The webpage allows a user to type and keystrokes are monitored to send the text on space or enter.

This page can be used from an HTTPS website or a local file on the desktop.

Web APIs
When writing code for the Web, there are a large number of Web APIs available. 
Below is a list of all the APIs and interfaces (object types) that you may be able to use while developing your Web app or site.
Web APIs are typically used with JavaScript, although this doesn't always have to be the case.
https://developer.mozilla.org/en-US/docs/Web/API
https://developer.mozilla.org/en-US/docs/Web/API/Serial

This works

This was not working but seems to be working now. It seemed to work after I dabbled with modems in Windows Device manager:

This one also works, but does not like AT+MS=V21 :

Cable confusion warning - The wiring of the cable from the modem sometimes uses the Phone - 4 wire convention and sometimes the Modem 2 wire convention.


Wed Mar 08 2023 08:06:46 GMT+0000 (Greenwich Mean Time)
=================================================

|>>> ATE0

|<<< ATE0

OK

|>>> ATZ

|<<< 
OK


|>>> AT+MS=V21

|<<< AT+MS=V21

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721000, 

|<<< +++ATH0 

OK


|<<< ATDT 01473649995,,18003,01607721000, 

|<<< 
CONNECT 115200

|<<< DÉSÃÏNNÅÃÔ_APP¿
NO CARRIER

|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721001, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18003,01607721001, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|<<< ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721001, 

|<<< +++ATH0 

OK


|<<< ATDT 01473649995,,18003,01607721001, 

|<<< 
OK
++
|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721002, 

|<<< ATH0 

OK

ATDT 01473649995,,18003,01607721002, 

|<<< 
NO DIALTONE

|>>> ATH0 

|<<< +++ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721002, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18003,01607721002, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|<<< ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721003, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18003,01607721003, 

|<<< 
CONNECT 115200

|<<< DÉSÃÏNNÅÃÔ_APP
NO CARRIER

|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721004, 

|<<< +++ATH0 

OK


|<<< ATDT 01473649995,,18003,01607721004, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721005, 

|<<< ATH0 

OK

ATDT 01473649995,,18003,01607721005, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721006, 

|<<< ATH0 

OK


|<<< ATDT 01473649995,,18003,01607721006, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|<<< ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721007, 

|<<< +++ATH0 

OK


|<<< ATDT 01473649995,,18003,01607721007, 

|<<< 
OK
++
|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721008, 

|<<< ATH0 

OK

ATDT 01473649995,,18003,01607721008, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|<<< ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18003,01607721009, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18003,01607721009, 

|<<< 
NO CARRIER
++
|>>> ATH0 

|<<< ATH0 

OK


|>>> ATH0 

|>>> ATDT 01473649995,,18001,01607721001, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18001,01607721001, 

|<<< 
CONNECT 115200

|<<<  Relay UK. The number you have dialled has not been recognised. Please check and try again. –
NO CARRIER

|>>> ATH0 

|>>> ATDT 01473649995,,18001,01607721002, 

|<<< +++ATH0 

OK

ATDT 01473649995,,18001,01607721002, 

|<<< 
CONNECT 115200

|<<< ÿ Relay UK. The number you have dialled has not been recognised. Please check and try again. 
NO CARRIER

===================================
ATE0

OK

OK

AT+MS=V21

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721000, 



CONNECT 115200
DISCONNECT_APP?

NO CARRIER
+++ATH0 

OK

ATDT 01473649995,,18003,01607721001, 


NO CARRIER
++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721001, 



OK
++ATH0 

OK

ATDT 01473649995,,18003,01607721002, 


NO DIALTONE
+++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721002, 


NO CARRIER
++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721003, 


CONNECT 115200
DISCONNECT_APP

NO CARRIER
+++ATH0 

OK

ATDT 01473649995,,18003,01607721004, 


NO CARRIER
++ATH0 

OK

ATDT 01473649995,,18003,01607721005, 


NO CARRIER
++ATH0 

OK

ATDT 01473649995,,18003,01607721006, 

NO CARRIER
++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721007, 


OK
++ATH0 

OK

ATDT 01473649995,,18003,01607721008, 


NO CARRIER
++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18003,01607721009, 

NO CARRIER
++ATH0 

OK

+++ATH0 

OK

ATDT 01473649995,,18001,01607721001, 


CONNECT 115200
 Relay UK. The number you have dialled has not been recognised. Please check and try again. 

NO CARRIER
+++ATH0 

OK

ATDT 01473649995,,18001,01607721002, 

CONNECT 115200
 Relay UK. The number you have dialled has not been recognised. Please check and try again. 
NO CARRIER

===================================
ATE0
AT+MS=v21
ATZ
AT+MS=V21
ATH0 
ATDT 01473649995,,18003,01607721000, 
ATH0 
ATDT 01473649995,,18003,01607721001, 
ATH0 
ATH0 
ATDT 01473649995,,18003,01607721001, 
ATH0 
ATDT 01473649995,,18003,01607721002, 
ATH0 
ATH0 
ATDT 01473649995,,18003,01607721002, 
ATH0 
ATH0 
ATDT 01473649995,,18003,01607721003, 
ATH0 
ATDT 01473649995,,18003,01607721004, 
ATH0 
ATDT 01473649995,,18003,01607721005, 
ATH0 
ATDT 01473649995,,18003,01607721006, 
ATH0 
ATH0 
ATDT 01473649995,,18003,01607721007, 
ATH0 
ATDT 01473649995,,18003,01607721008, 
ATH0 
ATH0 
ATDT 01473649995,,18003,01607721009, 
ATH0 
ATH0 
ATDT 01473649995,,18001,01607721001, 
ATH0 
ATDT 01473649995,,18001,01607721002, 

===================================
Wed Mar 08 2023 08:14:01 GMT+0000 (Greenwich Mean Time)