Skip to content

Instantly share code, notes, and snippets.

@bshambaugh
Created September 2, 2023 16:57
Show Gist options
  • Save bshambaugh/aeaac0d27af80ac0fb42008aee114719 to your computer and use it in GitHub Desktop.
Save bshambaugh/aeaac0d27af80ac0fb42008aee114719 to your computer and use it in GitHub Desktop.
reverse proxy and mDNS
1) Deal with the use of only port 80 and 43 on most public networks with a reverse proxy
https://www.tutorialspoint.com/how-to-configure-nginx-as-reverse-proxy-for-websocket
2) Deal with a changing IP address of the websockets server with
bshambaughOP
08/30/2023 4:44 PM
That reminds me, in https://github.com/bshambaugh/BlinkyProject/blob/remoteSigner/edgeDevices/ESP32-testing/include/websocketserver_config.h I have the IP address of the laptop assigned by the router hardcoded which I can discover by hostname -I on the laptop. Recompiling the ESP32 with the new IP address when I move to a new network like 192.168.1.29 (or even if the router reassigns it .... occasionally locally I go from 10.0.0.4 to 10.0.0.5 and back again) is a pain. I think this is a different issue though....I just need to somehow give my devices unique identifiers, call out to them through some sort of broadcast scheme and pull down their assigned IP addresses.
lots to think about, thanks for your help so far. (Find the IP address of the esp32 by another esp32 on the same local network)
https://stackoverflow.com/questions/44187924/nodemcu-resolving-raspberrys-local-dns-through-mdns
https://esp32.com/viewtopic.php?t=29291
@bshambaugh
Copy link
Author

@bshambaugh
Copy link
Author

@bshambaugh
Copy link
Author

@bshambaugh
Copy link
Author

bshambaugh commented Sep 4, 2023

  1. Deal with some networks only having 5GHz. Try using the RTL8720DN.

I still get the error "error: Enter Uart Download Mode" This video supposedly has the solution, but he's doing some things with the wires that I do not understand. https://www.youtube.com/watch?v=X2jtR1rMAOs

"Select Board: RTL8722DM/RTL8722CSM
(Arduino IDE "Tools" Menu -> "Board:" -> "Ameba ARM (32-bits) boards" -> "RTL8722DM/RTL8722CSM")
Hold the Rtlduino "Burn" button, press the "RST" button and then release the "Burn" button
Press "Upload" for compile and upload the program

"https://www.instructables.com/RTL8720DN/

ahh...further down in the instructable...."Rtlduino is a RTL8720DN breakout dev board, but I guess it is designed for using AT Command firmware only. The USB to Serial chip is connected to the Serial Port, GPIO1(PB1) and GPIO0(PB2), that using for AT firmware communication only. If you want to program it with Arduino IDE, amebad_image_tool require communicating to LOG Serial Port, pins GPIO14(PA7) and GPIO15(PA8). The simplest way to fix this issue is connect 2 Serial Ports together, i.e. join PB1 to PA7 and join PB2 to PA8. Please be reminded that this method sacrificed 1 Serial Port or 2 GPIO pins, but no need to desoldering and reroute any connections."

for reference, here is another video showing the non-breakout version being programmed: https://www.youtube.com/watch?v=pzwV1lgUK7Y

for reference, here is some code that I tried, but it appears to be outdated: https://github.com/xidameng/BW16_RTL8720DN_Arduino

@bshambaugh
Copy link
Author

bshambaugh commented Sep 4, 2023

RTL8720DN is not supported by platform.io. Adding support appears to be a lot of work: https://community.platformio.org/t/adding-a-new-board-from-arduino-ide-to-platformio/32050 . RTL8720DN development might be easier with the Arduino IDE, which does provide support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment