WiFi to setup a PIC based device


+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default WiFi to setup a PIC based device

    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

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,517

    Default Re: WiFi to setup a PIC based device

    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).

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383

    Default Re: WiFi to setup a PIC based device

    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
    Name:  screen.jpg
Views: 134
Size:  119.5 KB

    ps , esp modules are as cheap as bluetooth ones and 100000 times more versatile
    Warning I'm not a teacher

  4. #4
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default Re: WiFi to setup a PIC based device

    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

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,383

    Default Re: WiFi to setup a PIC based device

    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

    when you are comfortable with the concepts ask again for some examples
    Warning I'm not a teacher

  6. #6

    Default Re: WiFi to setup a PIC based device

    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.
    Name:  esp-link.JPG
Views: 102
Size:  127.9 KB
    Name:  Capture.JPG
Views: 91
Size:  80.8 KB
    Last edited by amgen; - 2nd December 2023 at 02:23.

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,795

    Default Re: WiFi to setup a PIC based device

    Thank for the great info. Time for a crash test...

    Ioannis

Similar Threads

  1. Serial to WiFi <> Wifi to virtual com port
    By flotulopex in forum WiFi
    Replies: 11
    Last Post: - 4th April 2018, 14:18
  2. Replies: 22
    Last Post: - 5th January 2012, 07:49
  3. Wifi & PIC
    By Megahertz in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th December 2010, 04:16
  4. Sms based device switching
    By Farhan in forum GSM
    Replies: 3
    Last Post: - 28th November 2008, 19:14
  5. Interrupt & device setup for a PIC16F628A in Microcode Studio Plus
    By wildpikachu in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 3rd May 2008, 17:28

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts