Search found 16 matches

by larsks
Wed Nov 15, 2017 10:29 pm
Forum: Programs, Libraries and Tools
Topic: Noggin: A simple web framework that will run on your esp8266 boards.
Replies: 9
Views: 2052

Noggin: A simple web framework that will run on your esp8266 boards.

I was asking the other day ( https://forum.micropython.org/viewtopic.php?f=2&t=4036 ) about minimal http servers for MicroPython, but I didn't get any responses and I wasn't able to find anything suitable...so I've written my own, and I've made it available in case someone else finds it useful: http...
by larsks
Fri Nov 10, 2017 1:46 pm
Forum: General Discussion and Questions
Topic: micropython webserver with support for PUT and Expect: 100-continue?
Replies: 0
Views: 413

micropython webserver with support for PUT and Expect: 100-continue?

Dear lazyweb, I am currently writing my own http implementation so that I can handle PUT requests and the HTTP "Expect: 100-continue" header. I thought I'd check here first to see if anybody has already implemented the same thing? This needs to run on an esp8266, which limits the available options. ...
by larsks
Wed Nov 08, 2017 9:16 pm
Forum: General Discussion and Questions
Topic: ENOMEM and tcp sockets?
Replies: 2
Views: 889

Re: ENOMEM and tcp sockets?

You get that error if you have a socket open and the perform a warm boot (Ctrl_D) or try otherwise to re-uses these.
That was it! I didn't realize that open sockets would persist over a soft reset like that.
by larsks
Wed Nov 08, 2017 6:59 pm
Forum: General Discussion and Questions
Topic: ENOMEM and tcp sockets?
Replies: 2
Views: 889

ENOMEM and tcp sockets?

I am running Micropython 1.9.3 (v1.9.3-8-g63826ac5c) on an esp8266 device. Does micropython raise ENOMEM for reasons other than actually running out of memory? I'm trying to write a simple http server; you can see the code at https://gist.github.com/larsks/1cf5f8cd613522cc15feebb93433cc32 . It doesn...
by larsks
Wed Nov 08, 2017 12:39 pm
Forum: ESP8266 boards
Topic: UDP callbacks now working
Replies: 2
Views: 963

Re: UDP callbacks now working

This looks like a really useful feature. It doesn't look like there was ever a reply here in the forum. Did you end up contributing this to the project?
by larsks
Mon Feb 13, 2017 5:34 pm
Forum: ESP8266 boards
Topic: object has no attribute 'IPPROTO_UDP'
Replies: 2
Views: 1045

Re: object has no attribute 'IPPROTO_UDP'

The socket library doesn't have any of the IPPROTO_* constants. However, simply specifying a socket type of socket.SOCK_DGRAM should do the right thing...and in fact, a simple test seems to work: On my esp8266: >>> import socket >>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> s.bind(('0...