NTP-based WIFI time for v1 clocks

More
3 months 1 week ago #10513 by Froula
Guys, I resolved my compilation problem on the WiFi module code. I had a conflicting library installed.

I compiled the v1 WiFi module code that is in the version 56 repository. It compiles fine and I can configure it from an Iphone and then web browser, once connected to my WiFi access point. It will not, however, connect to the version 56 code in my clock, with or without the RTC in parallel.

I'm using an ESP-12E development board and level shifter to connect to the clock.

Best,

Don

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #10514 by Froula
Here's a portion of the ESP-12E debug output for th WiFi code in the v1 version 56 repository:

connected with snickerdoodle, channel 1
dhcp client start...
ip:192.168.1.98,mask:255.255.255.0,gw:192.168.1.1
*WM: Connection result:
*WM: 3
station: 34:12:98:e3:af:1d leave, AID = 1
rm 1
bcn 0
del if1
pm open,type:2 0
mode : sta(5c:cf:7f:b1:47:f7)
Connected!
mounted file system
Setting default tzs
mounted file system
saving config
{"time_zone":" its.internet-box.ch/getTime/Europe/Zurich "}

Saved config
AP IP address: 0.0.0.0
IP address: 192.168.1.98
I2C master started
Scanning I2C bus
Scanning I2C bus done
Sending IP Address to I2C: 192.168.1.98
Sending time to I2C: 2018,01,01,0,0,0
HTTP server started
Sending time to I2C: 2019,9,2,17,20,12
Normal time serve mode
Sending IP Address to I2C: 192.168.1.98
Sending time to I2C: 2019,9,2,17,21,12
Normal time serve mode
Sending IP Address to I2C: 192.168.1.98
I2C <-- Received bytes (expecting 22): 0
I2C <-- Got wrong number of bytes, expected 22 bytes, got: 0
I2C <-- Received bytes (expecting 22): 0
I2C <-- Got wrong number of bytes, expected 22 bytes, got: 0
I2C <-- Received bytes (expecting 22): 0
I2C <-- Got wrong number of bytes, expected 22 bytes, got: 0
I2C <-- Received bytes (expecting 22): 0
I2C <-- Got wrong number of bytes, expected 22 bytes, got: 0
Sending time to I2C: 2019,9,2,17,22,13
Normal time serve mode
Sending IP Address to I2C: 192.168.1.98
I2C <-- Received bytes (expecting 22): 0
I2C <-- Got wrong number of bytes, expected 22 bytes, got: 0

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #10515 by jjansen

Froula wrote: Guys, I resolved my compilation problem on the WiFi module code. I had a conflicting library installed.

Which library? I run into compilation errors with the latest versions from bitbucket..

(when I use platformio I does compile without errors). But I like to use Arduino IDE ;-)

@Ian, would you be able to to provide me with the .bin file of the software running on the ESP-01? (FW2)

I uploaded the latest FW from bitbucket to the ESP, after a while it started to give problems. It works on first boot, but after saving some settings to the ESP and reboot it will fail.
last failed alloc call: 402289AE(-147457)

 ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
v8b899c12
~ld
Starting debug session

ezTime debug level set to DEBUG
  --> Set OTA Updates OFF
*WM: 
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result: 
*WM: 3
*WM: IP Address:
*WM: 192.168.2.108
Connected!
mounted file system for read
reading config file
opened config file

Abort called

>>>stack>>>

ctx: cont
sp: 3fff3e60 end: 3fff4120 offset: 01b0
3fff4010:  3ffeb2ee 3ffeab7a 00000000 40228980  
3fff4020:  3ffec528 3ffeab7a 00000000 40207479  
3fff4030:  40220b28 00000000 000003e8 3fff2b24  
3fff4040:  3fff4bf4 3fff4c34 00000000 00000000  
3fff4050:  3fff2cdc 00000000 00000000 ff000000  
3fff4060:  3fff1fc0 3fff2bfc 3ffe85a0 3fff2bfc  
3fff4070:  3ffec528 3fff2b24 40217124 3fff3100  
3fff4080:  40217fc6 0000000a 0000000a 40217fbb  
3fff4090:  3ffec546 00000000 3fff2650 3fff2b24  
3fff40a0:  3ffec528 00000000 3fff2650 4020b587  
3fff40b0:  00000000 00000000 ff002164 feefeffe  
3fff40c0:  feefeffe feefeffe feefeffe feefeffe  
3fff40d0:  feefeffe feefeffe feefeffe feefeffe  
3fff40e0:  feefeffe feefeffe feefeffe feefeffe  
3fff40f0:  feefeffe feefeffe feefeffe 3fff2b24  
3fff4100:  3fffdad0 00000000 3fff2af4 402171cc  
3fff4110:  feefeffe feefeffe 3ffe85a0 401010ed  
<<<stack<<<

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #10516 by Froula
It was a WiFi shield library I had installed in:

C:\Program Files (x86)\Arduino\libraries\WiFi\

It conflicted with the WiFi header file in the ESP8266 official board package.

I deleted the folder and restarted the IDE. All worked fine after that.

Below is the README file from the extraneous library.

Best,

Don

=======================================================

= WiFi Library for Arduino =

With the Arduino WiFi Shield, this library allows an Arduino board to connect to the internet.

For more information about this library please visit us at
www.arduino.cc/en/Reference/WiFi

== License ==

Copyright (c) 2011-2014 Arduino LLC. All right reserved.
Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
Copyright (c) 2001-2004 Swedish Institute of Computer Science.
Copyright (c) 2009-2010, H&D Wireless AB All rights reserved.

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #10517 by Ian
There are two things you need to make sure of when compiling this for your own use, with reference to the header section of this file bitbucket.org/isparkes/nixiefirmwarev1/s...eProviderESP8266.ino

1) You need to have SPIFFS available - this is where the config information is stored (line 14 of the file)
2) There's a problem with the flash memory interface for some flash chips, notably those from Puya: you need to make a change to the source of the ESP code, as detailed in lines 19-32

I'll add the link to the current binary in the manuals page.

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #10518 by jjansen
Thanks, I will give that a try.
This remark about PUYA is not present in the header of bitbucket.org/isparkes/nixiefirmwarev2/s...eProviderESP8266.ino

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.234 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com