DCC-EX / dcc-ex.github.io

The DCC-EX website, written in reStructuredText, generated using sphinx, and served by GitHub pages.
https://dcc-ex.com
GNU General Public License v3.0
12 stars 32 forks source link

Cheap WiFi router setup tutorial instead of promoting "AP mode" on the ESP8266 #633

Open pmantoine opened 1 year ago

pmantoine commented 1 year ago

AP mode is so poor on the ESP8266, that it's much preferable to suggest folks use any old WiFi capable router as a stand-alone AP for their railroad's WiFi network instead.

Recipe: 1) Take any old WiFi router you can find for free due to upgrade etc. 2) Configure router WiFi to the SSID you want for your model railroad 3) Enable WPA2 security and set a password of your choice 4) Configure EX-CommandStation in STA mode with that same SSID and password 5) Configure WiFi router to offer DHCP addresses, and enable DNS caching 6) Reboot WiFi router, confirm WiFi network is accessible via smartphone or tablet device 7) Write configuration to EX-CommandStation and boot 8) Confirm smartphone or tablet can now access EX-CommandStation

FJ-SA commented 1 year ago

Hi everyone. Im new to the DCC++ CommandStation-ex

I have a mega, L298N modified according to the DCC-EX website. Have the code installed.

The problem comes in with my wifi. I have a ESP-01 adapter with the ESP8266. I have looked everywhere for both boards codes and even the ESP8266 alone have so many libraries.

The question here is,is there something (code) to install for the ESP-01 adapter? If yes can you please share the link.

Now for the ESP8266, which library code do i install for CommandStation-EX?

Wilbur2 commented 1 year ago

Hi FJ, I would start by connecting usb to the ESP01 and see that it talks. Find out what its spec is. (If you're in the business you'll know all this already!) If you need to re-program it, it will help to know the settings: SPI speed, SPI type (DIO, QIO etc) how much RAM, what RAM map (512+512, 1024+1024 etc), frequency. Now you will be able to re-program it if it goes pear-shaped. Next, just connect it to the command station and see if it works! No special software or drivers required. When you configure your Command Station (config.h) do not enter any SSID or network password at first. This will make the ESP01 boot up as an access point (AP mode), which is easier for testing as it rules out router/network problems. If you connect the Arduino IDE serial monitor you will see the command stations bootup log and it will show some WiFi timeouts and "connected" and the ESP01's IP address (usually 192.168.4.1 I think). If so, it works! Open your favourite phone app eg Engine Driver for Android and connect directly to the command station's ESP01.

Wilbur2 commented 1 year ago

Complications! Some people have found that some Espressif AT software versions work better than others. Particularly v2.x versions. DCC-EX recommend v1.7.4. I have used this and v1.6.2 with no noticeable problems. And programming the devices is sometimes easy, sometimes very hard to get right. I suggest avoiding changing the ESP8266 firmware unless you definitely have to. Your system should be easy to get working, just power, ground and the Tx/Rx leads crossed over... Good luck! Oh - and if you have any problems, do visit our discord, which is a friendly and humorous support group. https://discord.com/channels/713189617066836079/735194734611398676

FJ-SA commented 1 year ago

Good morning Wilbur,Thank you for replying. Ok then it works. As i could see the AI-Thinker D8D017 (but only when connected to 5v on my Mega. I have an iphone so i use Withrottle lite. See screenshot attached. I did change the SSID and password as i don’t want it in AP (stand alone) mode. I want it to connect to my router otherwise my phone doesn’t have internet. Please also see other screenshot as the wifi gives an error.  Can you perhaps also help with why i have a CPU error? Without God i'm Hopeless...With God i'm Fearless... On 05 Jul 2023, at 23:35, Wilbur2 @.***> wrote: Complications! Some people have found that some Espressif AT software versions work better than others. Particularly v2.x versions. DCC-EX recommend v1.7.4. I have used this and v1.6.2 with no noticeable problems. And programming the devices is sometimes easy, sometimes very hard to get right. I suggest avoiding changing the ESP8266 firmware unless you definitely have to. Your system should be easy to get working, just power, ground and the Tx/Rx leads crossed over... Good luck! Oh - and if you have any problems, do visit our discord, which is a friendly and humorous support group. https://discord.com/channels/713189617066836079/735194734611398676

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

FJ-SA commented 1 year ago

A New Way to Chat with Friends & Communitiesdiscord.comThe link you have provided doesn’t exist 🙈Without God i'm Hopeless...With God i'm Fearless... On 06 Jul 2023, at 08:01, Ferdi @.> wrote:Good morning Wilbur,Thank you for replying. Ok then it works. As i could see the AI-Thinker D8D017 (but only when connected to 5v on my Mega. I have an iphone so i use Withrottle lite. See screenshot attached. I did change the SSID and password as i don’t want it in AP (stand alone) mode. I want it to connect to my router otherwise my phone doesn’t have internet. Please also see other screenshot as the wifi gives an error.  Can you perhaps also help with why i have a CPU error? Without God i'm Hopeless...With God i'm Fearless... On 05 Jul 2023, at 23:35, Wilbur2 @.> wrote: Complications! Some people have found that some Espressif AT software versions work better than others. Particularly v2.x versions. DCC-EX recommend v1.7.4. I have used this and v1.6.2 with no noticeable problems. And programming the devices is sometimes easy, sometimes very hard to get right. I suggest avoiding changing the ESP8266 firmware unless you definitely have to. Your system should be easy to get working, just power, ground and the Tx/Rx leads crossed over... Good luck! Oh - and if you have any problems, do visit our discord, which is a friendly and humorous support group. https://discord.com/channels/713189617066836079/735194734611398676

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>