• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Ngrok and ESp8266 WebServer

Q&A Forum › Category: ESP8266 › Ngrok and ESp8266 WebServer
0 Vote Up Vote Down
brianmorrisuk asked 4 years ago

I’ve just set up the ESP8266 Web Server with WebSocket via ngrok and it has stopped refreshing and syncing with other clients. I can manually refresh and it works. Have I done anything wrong or should I expect this when using ngrok? I’m running ngrok on a raspberrypi..

Question Tags: ESP8266, refresh, Rgrok, syncing
10 Answers
0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Hello Brian, thank you for letting me know.

Unfortunately the ESP websocket only works with HTTP.

You’ll need to open the ngrok URL with the http:// (not https).

If you open ngrok like this, it will work:

  • http://YOUR-NGROK-URL.ngrok.io

Does that work for you?

0 Vote Up Vote Down
brianmorrisuk answered 4 years ago

Thank you Rui for coming back to me so quickly. 
I will try again by implementing your advice.
Kind regards and stay safe 👍
Brian

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Let me know your results (simply using the HTTP URL should make it work)!

0 Vote Up Vote Down
brianmorrisuk answered 4 years ago

Hi Rui,
Yes http worked great on windows 10 in the MS Edge browser but still doesn’t work on IOS Safari.
If there’s a technical reason for this could you explain it for me please Rui?
Thanks for your time,
Kind regards,
 
Brian

0 Vote Up Vote Down
brianmorrisuk answered 4 years ago

Hi Rui,
Further to my last message and Interestingly when I manually refresh the Safari browser(IOS) it doesn’t update to the latest know state from last client interaction it sends it’s own out of sync message and sets the other clients as they sync with it.
Thanks in advance..
Brian

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Hello Brian, I think Safari browser is blocking your websocket connections, you might need to use Google Chrome web browser…

0 Vote Up Vote Down
brianmorrisuk answered 4 years ago

I’m afraid I’ve tried Google Chrome, Firefox and Safari but none of them will allow it to work on IOS iPhone SE (new model). No worries…
Thanks for your time. I’ll let you know if I ever figure it out.
Brian

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

If it doesn’t allow you to change the state even after you refresh, it means iOS is completely blocking the WebSocket communication.
Does it work if you only use the web server in your iPhone directly using the ESP IP address?
Thanks!

0 Vote Up Vote Down
brianmorrisuk answered 4 years ago

Hi Rui, I have now tested this on several platforms:
iPad (4th gen) Safari, Firefox, Chrome..
iPhone SE (new version) Safari, Firefox, Chrome
Fire HD (4th gen) Silk
window 10 PC Edge, Firefox, Chrome.
RasberryPi (rgrok and Chromium)
It works completely on everything except IOS. No browsers work with it on iPad or iPhone. IOS allows authentication and connection but refuses to communicate continuously. I am beginning to think that it is SSL or TLS that is some how blocking it via rgrok…! The IOS devices works on local network using esp8266 IP address.

I’ve also tried it on various IOS devices not associated with my setup to negate the possibility that some other software (AV, VPN) is somehow getting in the way..

Cheers
Brian

0 Vote Up Vote Down
Rui Santos Staff answered 4 years ago

Thank you for providing all that debugging information, it’s very helpful. In the upcoming weeks, I’ll try to find if it’s possible to make them work in iOS. 
Thanks again!

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.