View previous topic :: View next topic |
Author |
Message |
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
WiFi |
Posted: Thu Apr 23, 2020 6:02 am |
|
|
Hello to all.
I need a WiFi module for a custom remote switch.
I know all about esp8266 and I tried all methods below, but:
1) AT-command method is not for complex things.
2) Espressif SDK is not so well documented...
3) NODEMCU hangs anytime it wants and lucks of features.
4) Arduino seems like the best solid approach but I hate it. I am a PIC guy.
So, is there any CCS supported Wifi solution? Embedded or module?
Thanks! _________________ George. |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9221 Location: Greensville,Ontario
|
|
Posted: Thu Apr 23, 2020 7:18 am |
|
|
Well I'm confused...
you say 'custom remote switch' then say 'AT commands' won't work ??
To me a switch is on or off, '1' or '0', so AT cmds should be fine.....read a byte,send a byte.
I did some Zigbee stuff years ago and the ESP8266 seem 'similar'...though I prefer hardwired communications.
I do have some 'wireless serial modems' here ,have to find them, good for about 1km in open air. Had a PIC at both ends,so I was in control of the code !
You should explain more about what you need in data and distance.
All wireless devices need a BIG power supply as they use a lot of power, for a short time( transmitting). If the PSU drops, then communications can be lost or corrupted. Ther's a lot of overhead for a small payload with wireless too. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Thu Apr 23, 2020 7:25 am |
|
|
and in fact there are a hell of a lot of 'complex things' done using AT
commands. The WiFi your computer is using is 99% likely to be using
a modem that actually uses AT commands....
In fact the default Arduino handling is with the esp8266 and AT commands... |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Thu Apr 23, 2020 11:24 pm |
|
|
I say "a remote switch" to spare you from the details.
The question is generic and the wifi module could be used for anything.
Using AT commands is an option but I also prefer hard wired. I would like to write values to registers and get values back with SPI.
Using AT, needs much code to parse the incoming data, split the ASCII part from the actual data etc. It even makes it complex to just connect to an AP.
I know how to do this but it would be my last option.
As for arduino, I do not think it uses AT commands. It has functions for everything and it flashes the esp8266 with your compiled code using bootloader. So, no AT commands. When I say arduino of course I mean writing code FOR the ESP8266 not for external microcontroller and send to esp8266 with AT.
The application is lighting.
I am making some wireless controlled lights. Any of them can be used as a server or as a client by setting from the menu (oled and encoder).
up to 3 lights and an android app connect to the server who deals with sending the data (dim level, color etc) to the rest lights.
I would like to avoid AT commands for the above scenario...
Thanks for your input!!! _________________ George. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Fri Apr 24, 2020 1:00 am |
|
|
Seriously you would not be using AT commands once the unit is online.
AT commands are only used to initialise and setup the connection. Once
established, you are no longer in 'command' mode, and you just talk to the
link as a connection. No AT commands involved.
You only use AT commands again when you want to stop the connection. You
then send the 'escape' sequence (normally delay, +++, delay), to switch
back to command mode, and then start using AT commands. |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Fri Apr 24, 2020 1:23 am |
|
|
Yes I know what you mean, this is transparent mode and I have tried it.
It works very nice. But it is only for single connection. Not multiple.
And in my scenario the "server" must talk to multiple devices.
So, AT commands must be used for all transactions. _________________ George. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Fri Apr 24, 2020 1:39 am |
|
|
You would normally use STAtion mode, and connect to an existing access
point. You then have a WiFi connection that can talk to your devices
on the same network, or on the Internet (if the AP has an internet
connection). |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Fri Apr 24, 2020 1:45 am |
|
|
Yes you are right. But this system must be stand alone independent of access points. That is why any of the devices can be configured as soft AP. _________________ George. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19499
|
|
Posted: Fri Apr 24, 2020 2:40 am |
|
|
There are driver libraries for the Arduino, for about three different firmware
versions at least, including AT.
The ESP-01 Arduino firmware, still uses AT commands, it is just a rather
better version than the standard. Use it.
The documentation is here:
https://www.espressif.com/en/support/documents/technical-documents
Look for all the documents containing ESP8266.
The one "4a-esp8266_at_instruction_set_en.pdf" is the basic command
set description. |
|
|
georpo
Joined: 18 Nov 2008 Posts: 281 Location: Athens, Greece.
|
|
Posted: Fri Apr 24, 2020 2:44 am |
|
|
Ttelmah you are right. I have done my research and I know all this.
Finally I will have to work with AT commands I suppose.
Thanks guys for the precious help! _________________ George. |
|
|
|