Receving Fail to handle interrupt -6 try Again.. in custom HTTP Web Server

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

I am developing custom HTTP web server on Atmel SAM4S platform with WINC1500 WiFi chip. I am using xdk-asf-3.34.1. The web server works on port 80 in SoftAP mode. I have to send around 5K of data in the response to HTTP request which is sent in a chunk of few bytes. Sometimes I am able to send complete data to the HTTP client, but sometimes after sending few chunks of data, I receive following error and these prints continue and never stops

(APP)(ERR)[hif_handle_isr][579](HIF) Fail to handle interrupt -6 try Again
(APP)(ERR)[spi_data_read][355][nmi spi] Failed data response read...(00)
(APP)(ERR)[spi_read_reg][595][nmi spi] Failed data read...
(APP)(ERR)[hif_isr][542](hif) Fail to Read interrupt reg

Can someone please guide me to solve this? Thanks.

Last Edited: Mon. Mar 27, 2017 - 01:22 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

nmtrived,

 

I'm trying to accomplish something similar (http server on SAM4S + WINC1500), but currently with a slightly older version of ASF (V3.31.0).

 

Microchip was kind enough to provide an example (in response to a support ticket for the SAMD21+WINC1500; see attached), which does work on the SAMD21Xplained Pro + WINC1500 ...with certain platform + browser combos, but when I attempt to run it on my PCB with a SAM4S...it does not work (attached Wireshark capture shows the http server sends all zeros for the webpage and the client immediately closes the connection).

 

Using SAMD21Xplained Pro + WINC1500 Xplained Pro:

  - works with
    - Windows laptop w/Windows 10 & Microsoft Edge V38.14393.0.0
    - Windows laptop w/Windows 10 & Microsoft Internet Explorer V11.953.14393.0
  - does not work with
    - Windows laptop w/Windows 10 & Google Chrome V57.0.2987.98
    - Samsung Galaxy Note 4 w/Android 6.0.1 & Google Chrome V56.0.2924.87 (worked once but then not again)

 

Did you roll your own http server code using the Atmel "WINC1500_SIMPLE_TCP_SERVER_EXAMPLE" as a starting point, or something else?

 

Jeff

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Disregard my previous post:

 

I finally got the example Atmel provided to work on my PCB with SAM4S + WINC1500. FYI, here is what I changed:

In http_content.c, I changed

static char *get_main_page(char *req)
{
return (char *)prov_page;
}

to

static uint8_t tx_buf[1024];

// get pointer to the provisioning web page
static char *get_main_page(char *req){
memset(tx_buf, 0, sizeof(tx_buf));
memcpy(tx_buf, prov_page, sizeof(prov_page));
return((char *)tx_buf);
}

Apparently the underlying socket API didn't like using a pointer to FLASH; in a somewhat random 'swing in the dark', I copied to RAM and it works!

Still doesn't work on all platform + browser combos, but it now has hope.

 

Jeff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I have a problem with sending http web which size is over about 1500 bytes. I am trying to display web on my smartphone, but if I change the size of web there is blank page. Is it any limitations in ATWINC with size of web on http server? I tried to change SOCKET_BUFFER_MAX_LENGTH to 2000 and it works, but is it proper to change it?

 

Ok, it works. SOCKET_BUFFER_MAX_LENGTH is constant and equal 1400 bytes. I have to send web in chunks. 

Last Edited: Fri. Jun 2, 2017 - 08:57 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

HI,

How did you send web in chunk ? I have the same problem. Can you please help me with code or any examples.

I am new to  WINC1500. Any help would be appreciated. Thank you

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The simple answer is that you need a FIFO buffer and only send SOCKET_BUFFER_MAX_LENGTH (=1400) number of byte to a socket, then wait for the SOCKET_MSG_SEND callback before sending the next chunk. What adds to the complexity is that a browser is likely to request multiple sockets simultaneously and WINC1500 will grant them if they are available.