Uzenet

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
User avatar
L4rry
Posts: 228
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Uzenet

Post by L4rry » Fri Feb 22, 2019 8:48 am

nicksen782 wrote:
Fri Feb 22, 2019 3:51 am
Also, is there already some demo code for Uzenet that can do HTTP requests? Telnet is really easy of course but I would like to do HTTP GET.
The Telnet code was actually only recently introduced in the Uzenet demo by uze. Before that commit, the demo was using HTTP GET commands to ping a web server for the time. Just checkout a version before that change and you should be good to go.

This is the 'Work on UzenetDemo' commit that uze applied that added telnet and removed HTTP calls:

https://github.com/Uzebox/uzebox/commit ... 88c6ac79e3

User avatar
nicksen782
Posts: 607
Joined: Wed Feb 01, 2012 8:23 pm
Location: Detroit, United States
Contact:

Re: Uzenet

Post by nicksen782 » Fri Feb 22, 2019 3:39 pm

I should have said that telnet is a simple protocol. Not to imply that it is simple to implement.

Code: Select all

typedef struct {
	unsigned char verb;
	char* host;
	unsigned int port;
	char* url;
	char* content;
} HttpRequest;

typedef struct {
	unsigned int responseCode;
	char* content;
} HttpResponse;
So, the property "content" has the response from the HttpGet function? How do you know how big the response will be and if it will fit in RAM? I would think that in addition to knowing this, you could also store the response text in SPIRAM.

Looks like int len=WaitforIPD(); will provide a length. ReceiveHtmlBody is given a reference to "content" and also that length. ReceiveHtmlBody gets the response and puts it in response->content. Looks like that function would need to be modified to work with SPIRAM.

I just need to figure out how to parse the returned content. What about disconnections? HttpGet("uzebox.org",80,"/uzenet/time.php",&resp); Seems that happens the one time and then just timestamps are compared. Do you remain connected or was that line just a connect/get/disconnect sort of thing?

User avatar
L4rry
Posts: 228
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Uzenet

Post by L4rry » Tue Mar 12, 2019 9:13 am

This might come in handy for anyone wishing to develop custom firmware for the ESP8266. It's an open source game engine running on the ESP8266.

https://hackaday.com/2019/03/11/esp8266 ... ce-engine/

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests