View previous topic :: View next topic |
Author |
Message |
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
CREATE User Authentication page and password ENC28J60+PIC18f |
Posted: Thu Mar 05, 2015 8:45 am |
|
|
Hello, I'm new here and I'm automation project "using the ENC28J60" and pic18fxx. My question is this, I want to create the login page in the browser for secure access to data.
I'm using pic18f46k20 |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Thu Mar 05, 2015 8:52 am |
|
|
yes, but no one here will just 'give you their code'.
You need to show us your effort so far.
Is this a school project, home use or work related. This actually matters a great deal.
Jay |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Thu Mar 05, 2015 12:33 pm |
|
|
All of what you want is included in the TCP/IP library that is available from CCS. You can request it from CCS by email. Considerable study and self-education is required for building embedded TCP/IP and web servers. All the necessary information is easily available and your success is only limited by the amount of time your are willing to put into it. Expect to spend a lot of time!
A good starting point is the CCS Embedded Ethernet development kit. They walk you through all the steps needed to build a web server, with login screen. It uses a PIC18F4620 and ENC28J60. You can find it here:
http://www.ccsinfo.com/product_info.php?products_id=embethkit
This is the best teaching tool for embedded Ethernet on a PIC I have found so far. If you received the CCS compiler on a disk, the manual for this kit is on the disk.
Happy coding, _________________ Jürgen
www.jgscraft.com |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Thu Mar 05, 2015 6:24 pm |
|
|
If you are planning on using Arduino in your project then you are in the wrong place and need to go to the Arduino forums.
Do you have the CCS compiler? This forum only provides support for developers who are writing code for the Microchip PIC processors using the CCS compiler.
If you are just beginning to work with microprocessors you should complete some basic projects such as blinking LEDs, serial communications, capturing buttons presses, and so on. Succeed with that before you try to work with Internet projects.
The Arduino project you show has 145 lines of code. There are additional thousands of lines of code that are in the libraries that are included. What you are asking is not easy. _________________ Jürgen
www.jgscraft.com |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Thu Mar 05, 2015 7:24 pm |
|
|
Friend, meant that the idea is this, but I'm not using Arduino! In Topic I said I'm using pic18f46k20 ... |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Thu Mar 05, 2015 7:26 pm |
|
|
Working with the pic over 8 years.
www.neovet.com.br
OUR PRODUCTS. |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Thu Mar 05, 2015 7:31 pm |
|
|
I am developing a project for residential automation, to open the garage gate, but wanted to do safely, not to directly open the main.html. I would ask User and password. |
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Thu Mar 05, 2015 9:04 pm |
|
|
Then I say again, the most efficient way to begin is with the kit I mentioned above. It uses almost the same hardware you are interested in. I know it is expensive to order from Brazil, but in the long run it will save you much time. _________________ Jürgen
www.jgscraft.com |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Thu Mar 05, 2015 10:47 pm |
|
|
My project is already running need only enable the function (HTTP_USE_AUTHENTICATION) |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Fri Mar 06, 2015 9:38 am |
|
|
I implemented this script down ..... and HTTP_USE_AUTHENTICATION #define TRUE "... I put the files in the folder protect! WITHOUT EFFECT. :(
Code: |
#if defined(HTTP_USE_AUTHENTICATION)
BYTE HTTPNeedsAuth(BYTE* cFile)
{
// If the filename begins with the folder "protect", then require auth
if(memcmppgm2ram(cFile, (ROM void*)"protect", 7) == 0)
return 0x00; // Authentication will be needed later
return 0x80;
}
#endif
#if defined(HTTP_USE_AUTHENTICATION)
BYTE HTTPCheckAuth(BYTE* cUser, BYTE* cPass)
{
if(strcmppgm2ram((char *)cUser,(ROM char *)"admin") == 0
&& strcmppgm2ram((char *)cPass, (ROM char *)"test") == 0)
return 0x80;
return 0x00;
}
#endif
|
|
|
|
jgschmidt
Joined: 03 Dec 2008 Posts: 184 Location: Gresham, OR USA
|
|
Posted: Fri Mar 06, 2015 11:40 am |
|
|
Ahh... Would be nice to have this information at the beginning, but is still not enough. What works? Can you access the web page without authentication? What is your compiler version? What is the TCP/IP stack version? _________________ Jürgen
www.jgscraft.com |
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Fri Mar 06, 2015 8:58 pm |
|
|
|
|
|
eduardocapaneli
Joined: 05 Mar 2015 Posts: 13
|
|
Posted: Mon Mar 09, 2015 2:24 pm |
|
|
someone? |
|
|
|