so it's not fun to visit the blog admin pages because so much spam. i never activated the akismet plug-in. oh well, i decided to try the reCAPTCHA deal for comments, and turn off moderation. we'll see how that goes ;)
i'm in antarctica for a little bit and installed a SocketModem MT5600SMI i got from eBay into my WRT54G-TM (not the WRTU54G-TM tho).
i was originally unsuccessful on dialing into the provided dial-up here, and setup the router as a dial-in ppp server and tried dialing in with a discarded original iMac (233MHz G3, 96MB ram, 4GB hdd, running Debian). since i wired the modem with only tx/rx, i had no flow control or carrier detect. i was unsuccessful in keeping the line up for more than a minute or two. i was also unsuccessful in getting the imac to dial the provided dial-up service, but found out it was because of my chat script!
your average pppd chat script ends with:
CONNECT ''
well that blank quote will actually have chat send a newline after connect, and the ppp server here will not start a ppp session with that newline! ah ha, trickery.. so i used
CONNECT '\c'
and the imac connected to the provided ppp services here, but the connection still wouldn't stay up for more than a minute or two! so i deduct the problem being with the imac's linux driver for the internal modem. so i ditch the imac and take the wrt54g back to my room and use it to connect to dial-up, as originally intended.
there are some things to lookout for when using a 3-wire modem. no hardware flow control, and no carrier detect. how to sense a hang-up? request lcp echo's every few seconds. here is my ppp option file:
#com port stuff /dev/ttyS1 115200 local nocrtscts xonxoff #connection stuff idle 600 demand persist maxfail 0 #ip stuffs defaultroute usepeerdns #login stuffs user 'USAP\\\\nicholsc' connect 'chat -f /etc/ppp/usap.chat' #ensure remote is still there (we have no DCD!) lcp-echo-interval 5 lcp-echo-failure 5 #debug log debug logfile /tmp/pppd.log
and the chat script:
ECHO ON TIMEOUT 5 REPORT CONNECT ABORT 'NO CARRIER' ABORT 'NO DIALTONE' ABORT 'LINE IN USE' '' AT OK 'AT\\\\V1S38=0&K4-STE=7' OK ATDT3600 TIMEOUT 30 CONNECT '\\c'
the &K4 is the modem init for software flow control. i believe the modem comes up in hardware+software mode, but this ensures it. the rest may be modem specific, but the \V1 is for a long connect string (shows carrier, compression, tx/rx rates), S38=0 hangs up right away instead giving 20 seconds to empty buffers (gay), the -STE=7 enables line-in-use, extension-pickup, and remote-hangup detections.
this connection has stayed up for days now, and only suffer the ^S and ^Q characters being escaped, not tooo bad :) a better chat script would do a subexpect for the first OK and send the +++ and ATH, in case the modem is still online.. but i've not had to mess with it, since it never has dropped yet and should go offline right away anyway with S38 and -STE settings. awesome modem! :)
as always, hope this later helps someone else or myself :)
Comments