View Full Version : WiFi to setup a PIC based device

- 29th November 2023, 17:03
I wonder if there is a way to setup parameters to a PIC based device.

One way would be to force the user to connect the device to a PC through a serial cable and on the PC a terminal program can do the configuration. But this is a bit old school...

The idea is to use a WiFi module placed temporary on the device that will communicate through serial port of the PIC. The WiFi module will work as access point and a mobile phone will connect to it.

On the phone, a terminal program may run and do the configuration.

I hope that there exist such terminal programs on mobile phones and avoid making an app to do the config (besides I do not know how to do that app).

Is this idea doable?


- 29th November 2023, 18:53
I'm sure UART over WiFi is possible but if the goal is to use a smartphone with a terminal program then I would think Bluetooth would be easier.
Something like a HC-06 module on the PIC side and Serial Bluetooth Terminal app on the phone (if Android, don't ask me about iOS).

- 29th November 2023, 23:59
On the phone, a terminal program may run and do the configuration.

simple, anything with a browser can set data fields and/or transfer files up or down to an esp8266 module of your choice
the esp can host the server on its own net or on your chosen wifi network then transfer the data to/from the pic.
With esp's asyncwebserver and or websockets you are only limited by your imagination and a little knowhow for html and js or similar scripting

ps , esp modules are as cheap as bluetooth ones and 100000 times more versatile

- 30th November 2023, 23:44
Bluetooth is an option I 've not though to use. Will consider it if it can be used also on iOS.

WiFi is sure more versatile. I guess setting up an ESP needs some knowledge on C, right?

Asking for a working example would be too much?


- 1st December 2023, 03:05
I guess setting up an ESP needs some knowledge on C, right?
Yes ,
first step get a esp8266 , set up arduino for esp , install the espasync tcp and webserver libs and arduinojson too

try the examples, then try this

https://tttapa.github.io/ESP8266/Chap01 - ESP8266.html

and this
when you are comfortable with the concepts ask again for some examples

- 2nd December 2023, 01:20
about 6 months or a year ago I mentioned an 8266 UART-WIFI bridge. After programming a few files into it, after that it just starts up able to send and receiving at set baud over your wifi settings. You can use some terminal program to send and receive although I made a visual studio program to do that to/from an f2525 at 115K baud. The few 8266's I programmed have been working constantly for several years. All the work is then done directly with serial. I set up the f2525's with timer and UART interrupts. The timer int loops the program 10X a second and when a character comes in, it is checked in small asm at int. It checks for a start '[' and end ']' characters and raises flags to start taking characters and then process the received string...... so it is basically real time receive thing. The files programmed in the 8266 have a web page for setting and other more advanced things I never used. The modules were $5 amazon.

- 2nd December 2023, 13:31
Thank for the great info. Time for a crash test...