Search found 41 matches

by chrisgp
Tue Nov 08, 2016 9:39 pm
Forum: ESP8266 boards
Topic: Setting station hostname
Replies: 6
Views: 3438

Re: RE: Setting station hostname

joehunt588 wrote:thanks ,really need that function :D
This has been merged in for the next release. The parameter has been changed from hostname to dhcp_hostname but otherwise everything else is the same.
by chrisgp
Sun Nov 06, 2016 6:18 pm
Forum: ESP8266 boards
Topic: Setting station hostname
Replies: 6
Views: 3438

Re: RE: Setting station hostname

Hai chrisgp ,how you change the hostname,? I even follow u method call sta.config('hostname') i got error unknown config param The changes aren't in the main firmware build yet. I opened a request to bring in the changes but that is currently pending so it's not in the master branch yet. Unless the...
by chrisgp
Tue Nov 01, 2016 4:11 am
Forum: ESP8266 boards
Topic: Setting RTC From Internet?
Replies: 26
Views: 18273

Re: Setting RTC From Internet?

Here's a simple example. It prints the day of the week and the month in textual format. After that it goes into a loop where it prints a message once each Tuesday by watching a triggered flag. (year, month, mday, hour, minute, second, weekday, yearday) = utime.localtime() days= {0:"Monday", 1:"Tuesd...
by chrisgp
Tue Nov 01, 2016 2:23 am
Forum: ESP8266 boards
Topic: Setting RTC From Internet?
Replies: 26
Views: 18273

Re: Setting RTC From Internet?

Check out utime and machine.RTC. Their functions will give the appropriate time once you've made the NTP call to sync up.

For example utime.localtime() will return back a tuple with the various fields available.
by chrisgp
Mon Oct 31, 2016 5:42 pm
Forum: ESP8266 boards
Topic: Setting station hostname
Replies: 6
Views: 3438

Re: Setting station hostname

I opened a pull request and there is currently a request for any feedback on the desired name of the parameter (if it should stay as hostname or switch to something indicating that it is specifically referring to the DHCP hostname). If you have any feedback feel free to add a comment to the pull req...
by chrisgp
Sun Oct 30, 2016 11:20 pm
Forum: ESP8266 boards
Topic: HTTP GET request micropython
Replies: 4
Views: 5553

Re: HTTP GET request micropython

The first line of an HTTP request is the method (GET, POST, etc.) following by the path (including the query string) and finally the HTTP version. Altogether for your case that would be something like: s.send(b'GET /get.php?name=1234&age=5678 HTTP/1.0\r\n\r\n') Your most recent example placed the pa...
by chrisgp
Sun Oct 30, 2016 6:34 pm
Forum: ESP8266 boards
Topic: HTTP GET request micropython
Replies: 4
Views: 5553

Re: HTTP GET request micropython

You might also want to consider trying out urequests (https://github.com/micropython/micropython-lib/blob/master/urequests/urequests.py) instead of writing it yourself. Once you get urequests.py on your filesystem so it can be imported it would simplify your code to the following (minus any typos I ...
by chrisgp
Sun Oct 30, 2016 5:18 pm
Forum: ESP8266 boards
Topic: Setting station hostname
Replies: 6
Views: 3438

Setting station hostname

I was looking a bit at DNS with the ESP8266 and came across this post requesting the ability to change the device's hostname. The work involved didn't look too bad so I went ahead and implemented something ( see this commit in my fork ). I wanted to get feedback to see if others thought this might b...
by chrisgp
Sat Oct 29, 2016 1:51 am
Forum: ESP8266 boards
Topic: Issue with ESPs talking to each other over UDP socket (solved)
Replies: 6
Views: 2711

Re: Issue with ESPs talking to each other over UDP socket

Which address are you binding the client to when you do the s.recvfrom? It sounds like your client might have two network interfaces active so it will have two IP addresses. You say the client's address on the parent's network is 192.168.4.2. What is the client's IP on the network it is broadcasting...
by chrisgp
Wed Oct 26, 2016 4:53 pm
Forum: ESP8266 boards
Topic: WifiManager Script Template
Replies: 5
Views: 3230

Re: WifiManager Script Template

When you connect to the ESP8266's access point your machine will get some IP like w.x.y.z. The IP of the ESP8266 will likely be w.x.y.1 (just replacing the last section with 1). You can set the IP address of the ESP8266 for its access point interface to ensure it is always something like 192.168.1.1...