Shop Learn
ESP 8266 commands — Parallax Forums

ESP 8266 commands

I am working on a project to connect an alternate throttle to my MRC DCC system using the ESP 8266 module.
I can connect to the DCC wifi unit with the command:
wifi.str(string(ST,"JOIN:NRCWi-Fi, ",CR))
The MRC unit uses port 12090 for the JMRI connection. When I try to establish a TCP link with the command:
the command fails.
I have connected to the ip and port with my pc and can manually send JMRI commands. I am missing something with the ESP8266 module?


  • Upon further testing, it appears that when the module connects to the MRC WiFi module, it does not get an IP address. Attaching with my computer, I do get an IP address.
  • Did you try connecting using the web page on the ESP8266 unit to see if that works. Once it connects to a unit it will automatically connect to it each time it is powered on.

    From there you can just sent the connect command.

  • It connected after I used the web page. I would still like a routine to parse the available access point and allow that to work with out a comuputer.
  • While there is a function to return a list of access points doing so seem redundant in that you would have to supply the password for that access point. So if you know what access point is that you want to connect to then you would also know the SSID of it.

    Unless you are moving around and and you don't know what environment you might end up in it could use the list to know what access point to attach too.

    If the join function is not working then we need to look into that to see why it is not getting an IP address since this is a function of the Access Point when DHCP is used. Some routers could be setup to not give out an IP address as a security measure. In that case you would have to supply one prior to connecting.

Sign In or Register to comment.