Oh boy, is my brain scrambled!
Last year I set up a local server running on a Raspberry Pi and created a couple of apps that ran on my Android phone.
Recently one app stopped working properly so I looked into what might be the problem - and that’s when I got completely confused and the more I look into how I might fix things, the more confused I become.
Originally I’d log in to my local server from my phone using the Pi IP address and port 9443 (I think). I seem to remember (although time and repeated changes to my Arduino sketch that runs on a NodeMCU) that I had to set the port in the Blynk.begin line in the code to port 9442 (perhaps my memory fails me).
Looking at the Blynk help pages there was great rejoicing that the server port was now 8080, so I changed one or other or both ports on the phone and the sketch to 8080 and, as you might image if you understand these things, nothing worked.
It seems that some help pages for setting up a local server say use 8080 (although not where I should use it in a human understandable way) and some say use 9443 and or 9442. But none of these pages have dates, so I can’t decide whether they are old help files that should have been deleted or whether they are current and are simply confusing me,
And the lovely Anna on YouTube doesn’t seem to have updated the instructions following the port change (unless she doesn’t need to as the 8080 is only if you use the cloud server).
Sorry to appear a gibbering idiot, but in Pavel’s original YouTube pitch he was keen to make the point that Blynk does all the hard work, protecting you from having to understand the workings of communication protocols to get the benefits of IOT.
Can anyone point me to an up to date, idiot’s guide to setting the local server up properly, that also explains in words of one syllable what else has to be updated (I’m thinking here of the Libraries and Tools in the Arduino sketch folders on my Windows machine, where I create the sketches in the first place). The app on the phone is up to date and I have downloaded the latest .jar file and got the Raspberry Pi to run the Blynk server using it.
I guess answering a few questions would get my head above water again, like:
- What port should I be using on the phone’s custom server settings?
- What port should I be setting in the Blynk.begin line in the sketches?
- Should that be done using the ‘#define BLYNK_DEFAULT_PORT 8080’ or actually in the Blynk.begin line or both?
Thanks for any help.