Uzenet default parameters

Topics regarding the Uzebox hardware/AVCore/BaseBoard (i.e: PCB, resistors, connectors, part list, schematics, hardware issues, etc.) should go here.
Post Reply
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Uzenet default parameters

Post by uze6666 »

Following the main Uzenet thread, I wanted to discuss what you guys think of default settings for the 8266 when it is enabled or resetted (the settings stored in flash). See https://www.espressif.com/sites/default ... et__EN.pdf.

So the default settings would be factory reset + :
  • AT+UART_DEF: The default UART speed. The slower, the smaller the RAM buffer needed but also, well, slower it is to transfer stuff. 9600, 14400, 19200, 28800, 38400 or 57600?
  • AT+CWJAP_DEF: Wifi autoconnect: seems pretty essential. Connects to your router automatically by default with the credential supplied to the Uzenet setup tool.
  • AT+CWMODE_DEF: Wifi mode: Station mode
  • AT+SAVETRANSLINK=0: wifi passthough-mode: not enabled by default.
  • AT+CWDHCP_DEF=1,1: Enable DHCP for station mode
That's it! Only these saves a lot of hassles for the games in setup cost.
User avatar
L4rry
Posts: 242
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Uzenet default parameters

Post by L4rry »

uze6666 wrote: Sat Oct 13, 2018 4:21 am Following the main Uzenet thread, I wanted to discuss what you guys think of default settings for the 8266 when it is enabled or resetted (the settings stored in flash). See https://www.espressif.com/sites/default ... et__EN.pdf.

So the default settings would be factory reset + :
  • AT+UART_DEF: The default UART speed. The slower, the smaller the RAM buffer needed but also, well, slower it is to transfer stuff. 9600, 14400, 19200, 28800, 38400 or 57600?
  • AT+CWJAP_DEF: Wifi autoconnect: seems pretty essential. Connects to your router automatically by default with the credential supplied to the Uzenet setup tool.
  • AT+CWMODE_DEF: Wifi mode: Station mode
  • AT+SAVETRANSLINK=0: wifi passthough-mode: not enabled by default.
That's it! Only these saves a lot of hassles for the games in setup cost.
Awesome. Thanks for doing this. I think a default baud rate of 9600 is fine. Each game/application is likely to set their own anyway based on demand. So you can just as well settle on that for a default as it's the generally accepted lowest one. Sort of like a '0' or 'null' value. I'm fine with the rest of the defaults too.

For me the biggest concern is that pressing the reset button on the Uzebox, does nothing to the current state of the WIFI module. So you might set the defaults with a dedicated ROM, but most applications will use and set (as they should) the current state (or '_CUR' commands) to suit their needs. Right now it seems you need to power cycle to get the defaults loaded again.
User avatar
D3thAdd3r
Posts: 3222
Joined: Wed Apr 29, 2009 10:00 am
Location: Minneapolis, United States

Re: Uzenet default parameters

Post by D3thAdd3r »

Those defaults are good. For the reset issue, I would recommend any Uzenet game to toggle the ESP8266 reset pin at program start. Within a few seconds it should be rebooted and reconnected to WiFi in a known state. Then error checking only needs doing after what should have worked is done. If there was some reason it didn't work, game software isn't going to handle it anyway, so save the hassle. If it passes setup utility tests, it should "always" work, and put the complex error checking there like it seems everyone agrees with.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet default parameters

Post by uze6666 »

For me the biggest concern is that pressing the reset button on the Uzebox, does nothing to the current state of the WIFI module. So you might set the defaults with a dedicated ROM, but most applications will use and set (as they should) the current state (or '_CUR' commands) to suit their needs. Right now it seems you need to power cycle to get the defaults loaded again.
This is so strange. As Lee said, reset usually worked (I think!) to reset the module and you would see it reconnecting with the "GOT IP" message. Does it do that for you (when not in pass-through mode)? What pcb and esp8266 at firmware are you using?
User avatar
L4rry
Posts: 242
Joined: Sun Dec 28, 2014 7:19 am
Location: Cape Town, South Africa

Re: Uzenet default parameters

Post by L4rry »

uze6666 wrote: Thu Oct 25, 2018 12:35 am This is so strange. As Lee said, reset usually worked (I think!) to reset the module and you would see it reconnecting with the "GOT IP" message. Does it do that for you (when not in pass-through mode)? What pcb and esp8266 at firmware are you using?
I have the v1.3.1 PCB and my ESP-12f is running SDK Version 1.5.4.1 with AT version 1.2.0.0. If I call the software reset function, then that does seem to reboot the wifi module and also exits passthrough as a result. I neglected to use this initially. I missed it in the uzenet demo. Lee's above comment made me look for it. So I am using it now.

Code: Select all

void wifiHWReset(){
    //reset module
    DDRD|=(1<<PD3);
    PORTD&=~(1<<PD3);
    WaitVsync(1);
    PORTD|=(1<<PD3);
}
I guess I was expecting pressing the hardware reset button on the uzebox would automatically reboot the wifi module too. But if it's understood and recommended to use the software reset instead, I'm absolutely fine with that.
User avatar
uze6666
Site Admin
Posts: 4801
Joined: Tue Aug 12, 2008 9:13 pm
Location: Montreal, Canada
Contact:

Re: Uzenet default parameters

Post by uze6666 »

Really happy to hear this! :D It's essential to use the software reset because the esp8266 reset pin is only connected to the 644! So as a design rule, insure the CH_PD pin is low when not needing the module (ie nothing to do by default) and high when required, to help save battery life on the portable.
Post Reply