Message-ID: <35C2D154.38C1393E@geocities.com> From: Merlin MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Hey Dim!!! References: <19980712095140 DOT 17102 DOT qmail AT hotmail DOT com> <35C1D850 DOT BC0ED078 AT post DOT comstar DOT ru> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 160 Date: Sat, 01 Aug 1998 08:29:04 GMT NNTP-Posting-Host: 189-cy-wpg.ilos.net NNTP-Posting-Date: Sat, 01 Aug 1998 03:29:04 CDT Organization: MBnet Networking Inc. To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Dim Zegebart wrote: > Khoi N wrote: > > > Hey Dim, > > > > Maybe ya didn't get my last email, or maybe your just really busy, > > > but here I am again. Well I didn't get a reply on the last email, and I > > > just wanted to give it another try. > > Oops, I have replayed your post and just forward that msg to you again.Sorry > for delay with this msg, I was in month's holiday and recently come back. > > > Well what I asked before was: is it > > possible for two computers to connect using the modem, with no active > > phone line ( no dialtone, NULL i guess you can call it that )? That is, > > can you connect the computers using a direct phone line to each of them? > > My friend and I live kind of far from each other, and testing the modem > > is a real hassle. And most of the time my friend is busy and is unable > > to help me in my quest to achieve modem-programing victory. If you can > > answer this question for me, I would greatly appreciate it. And if > > such a thing is possible, how do you do it? I am no modem expert > > what-so-ever, and I must seem like a little programmer compared to such > > an experienced programer as you! > > Thank you for many good words I just a man as you :)Only few models of modem > allows you connect directly without number dialing. > It connects via so called privet circuit. This privet circuit should be > provided by your > local phone operator for additional fee. This is exactly I connect my PC at > work > (I'm working at telephone company, so privet circuit is not a problem) > But I suppose what you are interesting in connecting two modems on your > table > just via two wires, unfortunately, only few from few modems capable to do it > and it > costs much money. Actually, I know only one such modem it's old UK made > device > with highest baud rate 1200. Sorry for butting in on your conversation here but i have something you may like to know...I have a zoltrix 56k flex modem (model FM-VSP56i2).. it is capable of connecting to another modem without a dialtone or phone number... I just have to take the plug from the wall and plug it into another modem's in jack and type ATX3DT on the 56k one and ATA (will not detect a ring so you cant use auto answer) on the answering modem whatever it may be. and They would connect.... Quite a nice feature i must say.. since i'v got 2 computers... and it was less than $100 :) > > > > Sorry to bother you again, but I got > > another question that I'd like to ask. I have used the library to > > program the modem, and I can't seem to find a way to detect rings when > > my friend calls. Instead I have to enter ATA manually. Is there a way > > to detect rings and connect modems automatically? Please answer this > > question, I'm dying to know the answer. A problem I've experienced > > with the library was using the comm_port_command _send() function. When > > I call it, using one of the AT commands, it works fine. But the problem > > is when I send two or more commands after it in a sequense, the commands > > don't make it through. For example: > > > > > > From dzcomm.txt > > int (*msr_handler)() - you may provide handler for > 'modem status register change' interrupt. Declare this handler as : > int my_msr_handler(int c). This handler will be called by a system > with c=inportb(port->MSR). > Note : since this handler called inside interrupt handler keep it > fast and small as possible. Take care about stuff you do inside, and > don't forget to lock this code in memory. > See also : comm_port_init. > > int RingStatus; > > int my_msr_handler(int msr_value) > { > if (msr_value&0x08) RingStatus=1; > return(0); > }ring() > { > .... > RingStatus=0; > } > > int main(int argc,char argv[]) > { comm_port *myport; > char c; > .. > myport->msr_handler=my_msr_handler; > ... > while(1) > { ... > if (RingStatus==1) ring(); > ... > } > > return(0); > } > > > comm_port *myport; > > char c; > > ... > > ... > > comm_port_command_send(myport,"ATZ\r"); //Inits modem > > comm_port_command_send(myport,"ATH\r"); // Hangs up modem > > comm_port_command_send(myport,"ATE1\r"); // Turns on echoing, sends > > // commands back to buffer > > while(c=comm_port_test(myport)) { > > putc(c); > > } > > > > > > comm_port_command_send() sends '\r' for you, so just send AT command with > out '\r' at the end > > > This gives and output of: > > > > ATZ > > OK > > > > That's it! This must be a delay problem of some sort. Is there a way > > to delay execution until each command has been succesfully sent? If > > there is a way, just tell me what to do and I'll try to pitch in and > > write the code to put in that delay. > > > > Search Allegro' doc for timer section ( I can't remember the exact delay > function name) > > > Thanks so much for listening to me again Dim. Please answer my > > questions, I'm just so anxious for answers. You've been a great > > listener, and I just appreciate all the work and help that you've > > given. Please write back! > > You are welcome. > > PS. I double this msg in djgpp mail list. > > -- > ____ ____ > | \ / Dim Zegebart > ____/____ > > Moscow Russia > WWW - http://www.geocities.com/siliconvalley/pines/7817 > DZcomm - comm library for Allegro > Palantir - multitasking kernel for Allegro (based on PDMLWP)