Dialing is successfully implemented in uclinux, summing up experience
Source: Internet
Author: User
The dial-up is successfully implemented in uclinux, and the experience-general Linux technology-Linux programming and kernel information is summarized. The following is a detailed description. Summary
Abstract:
Implement the pppoe dialing function of the Video Server
Platform:
Version 03 uclinux
Chips
The compiler was originally of version 03. Later I changed it to arm-elf of version 04... 2004.sh.
1. Configure the kernel
Configuring the kernel to support the ppp protocol is the most basic task.
Make menuconfig
Select network device support
Then select all the following ppp protocols
Exit
2. Install pppd and pppoe
Here is my detour.
At first, I did not know that the users in uclinux had their own pppd and rp-pppoe installation programs, So I went online and went down the installation program.
After the migration, although it was completed after the upgrade and compilation, it is best to use the program that comes with uclinux to avoid many compatibility issues.
Problem (uclinux comes with many very useful components and most common functions can be found under the user directory ). Installation Process
Make menuconfig
Customize vendor/user settings
Select
Network applications
Pppd
Rp-pppoe (do not forget to select this option under pppd)
Miscellanenous Applicaions
Chat (this process is useful after being connected)
Well, after the kernel is configured, do not rush to make. There is another point to change.
Cd user/pppd/ppd/
Modify lcp. c
Change row 1459 to orc = CONFNAK.
Now, go back to the system directory make dep-> make
If an error occurs during the compilation process, you should modify it according to the error prompt. Here, we will not discharge the problem that pppd cannot be compiled because the compiler version is too low,
It is best to use arm-elf-gcc of version 04.
After compilation is successful, you can find the pppd, pppoe, and chat items under romfs/bin.
I have some information on the Internet that I want to generate the pppstatus and pppdump files, but I don't think these two files are necessary. If they are really needed, they will be in/user/ppd.
Manually generate the two files and copy them to the romfs/bin directory.
Now, through the above steps, we have generated
Generated the pppd, pppoe, chat, pppstatus, and pppdump files. In addition, we also need some configuration files to save the dialing user name.
And password. Create a ppp directory under the romfs directory to store the configuration file, and then set chap-secrets, pap-secrets, and options under user/pppd/etc. ppp.
Copy the file to the directory we just created. In the chap-secrets and pap-secrets files, write down the user name and password we want to use for dialing. The format is as follows:
"Test" * "password"
Now, let's check if pppd can be started normally.
Download the generated image file to the target board.
Run/bin/pppd. If garbled characters can be printed, pppd has been successfully transplanted.
Unfortunately, after running/bin/pppd, pppd cannot be started.
Why did pppd quit? The system didn't prompt, and it was depressing! I 've been working on this for a long time to figure out why the system is executing pppd.
Exit. I decided to install a syslogd in busybox to display the log Content.
The installation method is very simple. Select busybox in vender/user settings, select syslogd, and recompile.
Okay, now I have logs available for querying in The. After I run/bin/pppd again, I am prompted that/dev/ppp cannot be found.
Now I know that uclinux does not set up a device node for ppp by default. You need to manually create a ppp node.
Create a ppp node manually:
Go to/dev on the linux host
File ppp
If we know that ppp is a character device, the master device number is 108, and the sub-device number is 0
Use the following command to generate
Touch/dev/ppp @ ppp, c, 108-0
Bake @ ppp, c, to romfs/dev and re-compile and generate an image.
After the node is created, run/bin/pppd on the target board. The exciting garbled code is finally displayed, just like on the host. Here we will
Assume that pppd has been successfully transplanted.
3. Establish a test environment
Before using modern to dial through the ISP, we can use windowXP to create a PPPOE server and then use direct connections.
Connect our target board to the XP Server and perform a dial-up test on the target board. After successful dialing, we are using modern to dial the ISP. Certainly dial
The XP server and the method for allocating ISP are basically the same.
Create an XP Server
1. Download The RASPPPOE_098B component.
2. Right-click the network neighbor, select Properties, click Install, select protocol, add, install from disk, and select the RASPPPOE_098B directory.
After the components are installed, you can see the ppp oever ethernet prototal in the local connection.
3. Establish a ppp-based incoming connection (our target board is dialing to connect to the pppoe server of XP, which relies on this connection)
1) create a network connection> set advanced connection> accept incoming connections> select REALTEK... (this is my Nic)> allow virtual connection
2) Here you can select or create a user to be used by the client for dialing.
3) next
Start 4: Dialing
1) use the platform we set up in step 3 for dial-up testing
Determine whether the target board can communicate with the XP Server (directly connected or connected to the same LAN)
Run the test command on the target board
/Bin/pppd pty '/bin/pppoe 'user frankie & (use your chap-secrets user here. Of course, this user must be on the XP Server.
Registered)
Unfortunately, after I run/bin/pppd pty '/bin/pppoe 'user frankie &, LCP: timeout config-request sending appears.
And other errors.
After getting stuck here, I checked a lot of information, and it seemed quite troublesome. In desperation, I decided to use rp-pppoe of uclinux 05.
Haha, I can't think of version 05 as easy to use. After re-compiling, I will allow the test command.
The dial is successful.
After ifconfig, ppp0.
2) direct dial-up testing is not performed on moden due to hardware environment restrictions.
5. References
References are all from the INTERNET
Postscript
For the sake of user friendliness, I would like to make it more interesting to dial the customer in the form of a webpage.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service