ESP 8266 commands
MSDTech
Posts: 342
in Accessories
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:
wifi.str(string(ST,"CONNECT:192.168.7.1,12090",CR))
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?
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:
wifi.str(string(ST,"CONNECT:192.168.7.1,12090",CR))
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?
Comments
From there you can just sent the connect command.
Mike
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.
Mike