Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Microchip PPP protocol problem

Status
Not open for further replies.

alinox2002

Junior Member level 1
Joined
Aug 2, 2002
Messages
18
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
74
pic ppp

I have a problem with the Microchip PPP Protocol (AN724)... The modem correctly connect, but the PIC (18F252) doesn't connect correctly with the internet server (AT&T). The connection stop at state 2 of 7. Is this somebody already had this problem or can help me?

Thank you!

Regard

Alain :?
 

microchip ppp

Hi Alain,

How did you knew you're stuck at state 2 of 7 ? With the ICD help or you put some printf to LCD for debuging purpose ?
All I know is you never received a LCP ACK in order to step forward to state 3 of the diagram.

Download the file from **broken link removed** read careful and then listen to Jeremy Bentham's thoughts:
When learning to program, I always avoided state machines and skipped the examples (which
always seemed to be based on traffic lights) because I couldn’t see the point. Why go to all the
effort of drawing those awkward diagrams when a simple bit of procedural code would do
the job very effectively?
Tackling network protocols finally convinced me of the error of my ways. You may think a
network transaction is a tightly specified sequence of events that can be handled by simple
procedural code, but that is to deny the unpredictability (or unreliability, as I discussed earlier) of any network. In the middle of an orderly transaction, your software might see some
strangely inconsistent data, perhaps caused by a bug in the someone else’s software or your
own. Either way, your software must make a sensible response to this situation, and it can’t do
that if you didn’t plan for this possibility. True, you can’t foresee every problem that may
occur, but with proper analysis you can foresee every type of problem and write in a strategy
to handle it.
Only the simplest of network transactions are stateless; that is, neither side needs to keep
any state information about the other. Usually, each side keeps track of the other and uses the
network to
• signal a change of state,
• signal the other machine to change its state, or
• check whether the other machine has signaled a change of state.
The key word is signal. Signals are sent and received over the network to ensure that two
machines remain in sync; that is, they track each other’s state changes. The signals may be
explicit (an indicator variable set to a specific value) or implicit (a quantity exceeding a given
threshold). Either way, the signals must be detected and tracked by the recipient.
Any error in this tracking will usually lead to a rapid breakdown in communications.
When such problems occur, inexperienced network programmers tend to concentrate on the
data, rather than the states. If a file transfer fails, they might seek deep meaning in the actual
number of bytes transferred, whereas an older hand would try to establish whether a state
change had occurred and what caused it at the moment of failure. This process is made much
easier if the protocol software has specifically defined states and has the ability to display or
log the state information while it is running.

then go back to AN724 and tell me what you think.

I must admit I hate Jeremy's attitude, but above are great thoughts.

Regards,
Silvio
 

ppp pic

Hi Silvio,
Thanks for your help! I use LCD to view the exect problem and now it works. I fond that the server request always FF FF FF FF in ACCM (Async. Control Character Map) in LCP option and the pic request 00 0A 00 00. I change this setting to FF FF FF FF in code and it work perfectly. :D I dont know what is it exactly...

Now, I need TCP\IP connection compable with PPP code... I dont want HTTP, Stack Manager, Mac...

Can you help me to find it?

Thanks a lot!!

Alain
 

pic + ppp

Hi Alain

Take a look at this:
**broken link removed**

It's true it was implemented only LCP, no modem driver, no authentification layer and so on. But it's a good start and exercise in assembler not C !!!!!!
The SX devices are totally compatible, drop in replacements for PIC 16C5x processors with emulation circuitry built in to the production device so what the ICE sees... is what the Processor saw!!! And they run at 50-75 MIPS (not just MHz, MIPS!). They are so fast, jitter-free, and deterministic, that many hardware functions can be "virtualized" into the software, reducing chip count and increaseing versatility.

Enjoy.
Silvio
 

ppp microchip

The PPP protocol works very well!!! Thanks for your help!!!
 

http protocol stack 5.1.2600

Hi alinox2002, see also AN833
hxxp://www.microchip.com/1010/suppdoc/appnote/all/an833/index.htm
 

+ppp +pic

Hi silvio,

I've ported AN724 to x51, I found the same problem too.
It struck at LCP nigotiation. in my case, there're somethings different.

1. I've connect x51 to WinXP host by direct cable, 2400,8,N,1

2. I've try to change LCP ACCM from 00 0A 00 00 to FF FF FF FF
and 00 00 00 00, don't work.

Please advise, Thankyou in advance.
Regards,
ZeRoN

-------------------------------------------------------------------------------------
LOGed by HDD Serial Monitor
-------------------------------------------------------------------------------------
Port opened by process "svchost.exe" (PID: 732)

Answer: 01/25/2003 10:11:00.244035264

43 4C 49 45 4E 54 43 4C 49 45 4E 54 CLIENTCLIENT

Request: 01/25/2003 10:11:05.401451264 (+0.1101584000 seconds)

43 4C 49 45 4E 54 53 45 52 56 45 52 CLIENTSERVER

Port opened by process "svchost.exe" (PID: 732)

Answer: 01/25/2003 10:11:05.521624064 (+0.1201728000 seconds)

7E FF 7D 23 C0 21 7D 21 7D 23 7D 20 7D 2E 7D 22 ~ÿ}#À!}!}#} }.}"
7D 26 FF FF FF FF 7D 27 7D 22 7D 28 7D 22 D6 4B }&ÿÿÿÿ}'}"}(}"ÖK
7E ~

Request: 01/25/2003 10:11:06.062401664 (+0.4206048000 seconds)

7E FF 7D 23 C0 21 7D 21 7D 20 7D 20 3B 7D 22 7D ~ÿ}#À!}!} } ;}"}
26 7D 20 7D 20 7D 20 7D 20 7D 23 7D 25 C2 23 81 &} } } } }#}%Â#
7D 25 7D 26 27 D8 69 88 7D 27 7D 22 7D 28 7D 22 }%}&'Øiˆ}'}"}(}"
7D 2D 7D 23 7D 26 7D 31 7D 24 7D 26 4E 7D 33 7D }-}#}&}1}$}&N}3}
37 7D 21 7D 2D 42 7D 20 7D 5E 88 48 45 DC BE B3 7}!}-B} }^ˆHEܾ³
31 95 F6 A5 AB 65 7D 20 7D 20 7D 20 7D 20 7D 37 1•ö¥«e} } } } }7
7D 24 7D 20 7D 21 5A 25 7E 7E FF 7D 23 C0 21 7D }$} }!Z%~~ÿ}#À!}
22 7D 23 7D 20 7D 2E 7D 22 7D 26 FF FF FF FF 7D "}#} }.}"}&ÿÿÿÿ}
27 7D 22 7D 28 7D 22 E8 C8 7E '}"}(}"èÈ~

Answer: 01/25/2003 10:11:06.533078464 (+0.3204608000 seconds)

7E FF 7D 23 C0 21 7D 21 7D 24 7D 20 7D 2E 7D 22 ~ÿ}#À!}!}$} }.}"
7D 26 FF FF FF FF 7D 27 7D 22 7D 28 7D 22 95 53 }&ÿÿÿÿ}'}"}(}"•S
7E ~

Request: 01/25/2003 10:11:06.773424064 (+0.1201728000 seconds)

7E FF 7D 23 C0 21 7D 22 7D 24 7D 20 7D 2E 7D 22 ~ÿ}#À!}"}$} }.}"
7D 26 FF FF FF FF 7D 27 7D 22 7D 28 7D 22 AB D0 }&ÿÿÿÿ}'}"}(}"«Ð
7E ~

Answer: 01/25/2003 10:11:07.554547264 (+0.7811232000 seconds)

7E FF 7D 23 C0 21 7D 21 7D 25 7D 20 7D 2E 7D 22 ~ÿ}#À!}!}%} }.}"
7D 26 FF FF FF FF 7D 27 7D 22 7D 28 7D 22 38 56 }&ÿÿÿÿ}'}"}(}"8V
7E ~

Request: 01/25/2003 10:11:07.784878464 (+0.1101584000 seconds)

7E FF 7D 23 C0 21 7D 22 7D 25 7D 20 7D 2E 7D 22 ~ÿ}#À!}"}%} }.}"
7D 26 FF FF FF FF 7D 27 7D 22 7D 28 7D 22 7D 26 }&ÿÿÿÿ}'}"}(}"}&
D5 7E Õ~

...
...

Port closed
-------------------------------------------------------------------------------------

-------------------------------------------------------------------------------------
Modem LOG
-------------------------------------------------------------------------------------
01-25-2003 10:10:45.042 - File: I:\WINDOWS\System32\tapisrv.dll, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\unimdm.tsp, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\unimdmat.dll, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\uniplat.dll, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\drivers\modem.sys, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\modemui.dll, Version 5.1.2600
01-25-2003 10:10:45.052 - File: I:\WINDOWS\System32\mdminst.dll, Version 5.1.2600
01-25-2003 10:10:45.052 - Modem type: Communications cable between two computers
01-25-2003 10:10:45.052 - Modem inf path: mdmhayes.inf
01-25-2003 10:10:45.052 - Modem inf section: M2700
01-25-2003 10:10:45.052 - Matching hardware ID: pnpc031
01-25-2003 10:10:45.062 - 2400,8,N,1, ctsfl=0, rtsctl=1
01-25-2003 10:10:45.062 - Initializing modem.
01-25-2003 10:10:45.062 - Waiting for a call.
01-25-2003 10:11:00.344 - Recv: CLIENT
01-25-2003 10:11:00.344 - Interpreted response: Ring
01-25-2003 10:11:05.391 - Recv: CLIENT
01-25-2003 10:11:05.391 - Interpreted response: Ring
01-25-2003 10:11:05.391 - Answering the call.
01-25-2003 10:11:05.401 - Send: CLIENTSERVER
01-25-2003 10:11:05.401 - Connection established at 2400bps.
01-25-2003 10:11:05.401 - Error-control off or unknown.
01-25-2003 10:11:05.401 - Data compression off or unknown.
01-25-2003 10:11:35.404 - Read: Total: 1014, Per/Sec: 33, Written: Total: 1633, Per/Sec: 54
01-25-2003 10:12:50.592 - Hanging up the modem.
01-25-2003 10:12:50.592 - Hardware hangup by lowering DTR.
01-25-2003 10:12:52.595 - A timeout has expired waiting to comm event to occour.
01-25-2003 10:12:52.595 - 2400,8,N,1, ctsfl=0, rtsctl=1
01-25-2003 10:12:52.595 - Initializing modem.
01-25-2003 10:12:52.595 - Waiting for a call.
01-25-2003 10:12:52.745 - Session Statistics:
01-25-2003 10:12:52.745 - Reads : 0 bytes
01-25-2003 10:12:52.745 - Writes: 0 bytes
-------------------------------------------------------------------------------------
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top