Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Lukee

Pages: [1]
1
µTasker general / download / upload file via webpages
« on: July 25, 2009, 08:30:00 AM »
Hello Mark,

I would like to download/upload files via webpages, very similar to upload firmware. I have a few settings in one file which I would like to download/upload via webpages to server. How I may do this ?

Best regards
Lukee

2
µTasker general / Re: static web pages or hard coded html
« on: April 07, 2009, 02:19:24 PM »
Hi Mark,

How do you think when hardcoeded pages will be available in uTasker? I have try to do this but I always have problem with bigs files.

Best regards
Lukee

3
µTasker general / Re: static web pages or hard coded html
« on: March 05, 2009, 02:59:01 PM »
Hi Mark,

I try hardcoded webpages and I add a bit code to http.c. When hardcoded file (cFile1_HTML) in flash is smaller than 1400 characters it work, but when is bigger than 1400 dosen't work.

That is code which I add to http.c:

Code: [Select]
static int fnDoWebPage(CHAR *cFileName, HTTP *http_session)
{
    unsigned short usLen = HTTP_BUFFER_LENGTH;
    unsigned char ucPush = TCP_FLAG_PUSH;
    MEMORY_RANGE_POINTER ucFile;

#ifdef SUPPORT_INTERNAL_HTML_FILES
    if (cFileName != 0) {                                                                              // predefined internal file is to be displayed
#endif
        if ((http_session->ucState > HTTP_STATE_ACTIVE) || (*cFileName < '0'))  // if we have just authenticated, always do start page
            *cFileName = '0';                                                                           // default start side
if ((http_session->ucState > HTTP_STATE_ACTIVE) || (*cFileName =='1'))
{
ucFile = (MEMORY_RANGE_POINTER)cFile1_HTML - FILE_HEADER;
            http_session->FileLength = sizeof(cFile1_HTML);
#ifdef SUPPORT_MIME_IDENTIFIER
http_session->ucMimeType = MIME_HTML;
#endif
#ifdef _WINDOWS   
iFetchingInternalMemory = 1;
#endif
}
else
{
    ucFile = uOpenFile(cFileName);                                          // open the file to be displayed
    http_session->ucState = HTTP_STATE_ACTIVE;
    http_session->FileLength = uGetFileLength(ucFile);               // get the length of the file to be displayed
    #ifdef SUPPORT_MIME_IDENTIFIER
    http_session->ucMimeType = UNKNOWN_MIME;
    #endif

if (http_session->FileLength == 0) {                                       // file not found
        #ifdef FILE404_IN_PROG                                                               // processors with linear memory can choose to use a 404 file  in code space
            ucFile = (MEMORY_RANGE_POINTER)cFile404 - FILE_HEADER;
            http_session->FileLength = sizeof(cFile404);
            #ifdef SUPPORT_MIME_IDENTIFIER
            http_session->ucMimeType = MIME_HTML;                                  // force HTML type
            #endif
            #ifdef _WINDOWS                                                                   // {10}
            iFetchingInternalMemory = 1;                                                    // inform the simulator that this access is definitively from internal FLASH
            #endif
        #else
            ucFile = (MEMORY_RANGE_POINTER)FILE404;                               // no file exists so get the error page
            if (!(http_session->FileLength = uGetFileLength(ucFile))) {             // get length of 404 error file from the file system
                fnTCP_close(http_session->OwnerTCPSocket);                        // no error file exists so just close connection
                return APP_REQUEST_CLOSE;
            }
        #endif
}
}

Thank you for reply.

Best regards
Lukee

4
µTasker general / Re: static web pages or hard coded html
« on: February 18, 2009, 06:37:37 PM »
Hi Mark,

I do this that (added following code):

Code: [Select]

...
    if ((http_session->ucState > HTTP_STATE_ACTIVE) || (*cFileName < '0')) { // if we have just authenticated, always do start page
            *cFileName = '0';                                            // default start side
        }
else if ((http_session->ucState > HTTP_STATE_ACTIVE) || (*cFileName =='0')) {
ucFile = (MEMORY_RANGE_POINTER)cFile0_HTML - FILE_HEADER;
http_session->ptrFileStart = (unsigned char*)cFile0_HTML;
            http_session->FileLength = sizeof(cFile0_HTML)-1;
http_session->ucMimeType = MIME_HTML;
#ifdef _WINDOWS   
iFetchingInternalMemory = 1;
#endif
}
else
{
...

I have the internal file called 0.htm. That is correct ?

Best regards
Lukee

5
µTasker general / Re: static web pages or hard coded html
« on: February 17, 2009, 05:23:11 PM »
Hello Mark!

I try add to my project the internal (hard-coded) HTML files. I define:

#define  FILE_0       "<html><head><title>test</title></head><body>test</body></html>";

but I don't know how to use them like HTML pages form FTP. I would like to acces content of this define like acces to 0.htm file.

Best regards
Lukee 

6
µTasker general / Re: memory allocation
« on: January 24, 2009, 01:58:14 PM »
Hi Mark,

I tried the same what robo and I have the same problem.

I think possobility to use malloc/free function is very important and it is additional utility.

Best regards
Lukee

7
µTasker general / Re: DynDNS
« on: September 04, 2008, 09:49:12 AM »
Hello Mark,

I have question about sending TCP packet.

1. I must create socket: HTTP_GET_TCP_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, (unsigned short)10, fnTestListener);
2. next connect to selected IP and selected PORT: fnTCP_Connect(HTTP_GET_TCP_socket, ipHTTP_GET, 80, 0, 0);
3. and than send packet using this function: fnSendTCP(HTTP_GET_TCP_socket, (unsigned char *)buf, usDataLen, 0);
4. when I send everything what I want I must close connection: fnTCP_close(HTTP_GET_TCP_socket);

Everything what I wrote is correct ?


8
µTasker general / Re: DynDNS
« on: September 02, 2008, 03:53:08 PM »
Hi Mark!

I try create a TCP socket. This is my code:

Code: [Select]
static USOCKET        HTTP_GET_TCP_socket = -1;
static unsigned char  ipHTTP_GET[IPV4_LENGTH] = {63,208,196,95};
...
HTTP_GET_TCP_socket = fnGetTCP_Socket(TOS_MINIMISE_DELAY, (unsigned short)10, fnTestListener);
fnTCP_Connect(HTTP_GET_TCP_socket, ipHTTP_GET, 80, 0, 0);
...

HTTP_GET_TCP_socket get value equal 8, but when fnTCP_Connect is run than error occur. I get following information from compiler:

"Unhandled exception at 0x0045bf7f in uTaskerV1-3.exe: 0xC0000005: Access violation writing location 0x004cb7a0."

What I do wrong ?

Best Regards
Lukee

9
µTasker general / Re: DynDNS
« on: September 01, 2008, 03:16:45 PM »
Hi,

Which function should I use to send with GET method this data ?

regards
Lukee

10
µTasker general / DynDNS
« on: August 29, 2008, 03:06:56 PM »
Hello,

I would like use the DynDNS, but I don't know how do it. My device must send following information:

http://username:password@members.dyndns.org/nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG

Server DynDNS listening on the 80 or 8245 port.

Thanks for fast reply!

Best Regards

Pages: [1]