View Full Version : WiFi to setup a PIC based device
Ioannis
- 29th November 2023, 18: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?
Ioannis
HenrikOlsson
- 29th November 2023, 19: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).
richard
- 30th November 2023, 00: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
9496
ps , esp modules are as cheap as bluetooth ones and 100000 times more versatile
Ioannis
- 1st December 2023, 00: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?
Ioannis
richard
- 1st December 2023, 04: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
https://github.com/G6EJD/G6EJD-ESP-File-Server
https://www.youtube.com/watch?v=TmV6JAUtrvw
when you are comfortable with the concepts ask again for some examples
amgen
- 2nd December 2023, 02: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.
9499
9498
Ioannis
- 2nd December 2023, 14:31
Thank for the great info. Time for a crash test...
Ioannis
Powered by vBulletin® Version 4.1.7 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.