Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doubt: accessing ports on the nodes #2

Open
beckmx opened this issue Aug 6, 2019 · 10 comments
Open

doubt: accessing ports on the nodes #2

beckmx opened this issue Aug 6, 2019 · 10 comments

Comments

@beckmx
Copy link

beckmx commented Aug 6, 2019

I was reading your readme file and was wondering if after getting an IP I can access whatever port on whatever protocol? for instance if I want to get the 80 port to see a page in the module and then switch to another port to see stream of images, can this be done?

@martin-ger
Copy link
Owner

Yes, you can. You can access any port on the participating nodes. Without further software (routing), you cannot accesss nodes outside the VPN.

@beckmx
Copy link
Author

beckmx commented Aug 7, 2019

From what repository is this dependency?
nacl/crypto_hash.h

@martin-ger
Copy link
Owner

Package libnacl-dev

@beckmx
Copy link
Author

beckmx commented Aug 7, 2019

wow, I just tested, it works like a charm, if it is not much to ask can you elaborate how it works behind the scenes in the ESP?

@beckmx
Copy link
Author

beckmx commented Aug 28, 2019

I have been pushing in forward a little bit more each time, I used the esp32 cam demo project and responds good, and then in the stream part I noticed something, the firsts couple of frames are sent but then it usually stops with this message:

I (30741) MQTTIF: Received mqttip/10.0.1.97 - 96 bytes
I (30821) MQTTIF: Received mqttip/10.0.1.97 - 96 bytes
I (30821) MQTTIF: Received mqttip/10.0.1.97 - 96 bytes
I (30831) MQTTIF: Received mqttip/10.0.1.97 - 96 bytes
assertion "tcp_receive: valid queue length" failed: file "/Users/esp-gnu/esp-idf/components/lwip/lwip/src/core/tcp_in.c", line 1123, function: tcp_free_acked_segments
abort() was called at PC 0x400dab8f on core 0
0x400dab8f: __assert_func at /builds/idf/crosstool-NG/.build/HOST-x86_64-apple-darwin12/xtensa-esp32-elf/src/newlib/newlib/libc/stdlib/assert.c:62 (discriminator 8)

Do you think I should focus on the esp32 lib to find the issue or more on the linux IF

@martin-ger
Copy link
Owner

I would guess, it is an ESP issue. Does this happen under high load? "tcp_receive: valid queue length" failed" sounds like a kind of overflow...

@beckmx
Copy link
Author

beckmx commented Aug 28, 2019

it does happen when I .try to stream images "like a video" if I call it directly in it's real physical IP it streams, and when called over the vpn it stops, btw I just discovered that if you use 10.0.1.200 or bigger than x.x.x.99 the linux IF creates a strange topic in mqtt

@beckmx
Copy link
Author

beckmx commented Aug 28, 2019

you were right, I had to add 1200 ms to the stream between each camera shoot, that way the IF in the esp32 manages to keep memory afloat

@pastry777
Copy link

pastry777 commented Jan 4, 2022

wow, I just tested, it works like a charm, if it is not much to ask can you elaborate how it works behind the scenes in the ESP?

how did you manage to get this running on Linux? I installed libnacl-dev, but mqtt_vpn.c does not want to compile, the error persists:
/ usr / bin / ld: /tmp/ccs2jNoK.o: in the "msgarrvd" function:
mqtt_vpn.c :(. text + 0x8dc): undefined reference to "crypto_secretbox_xsalsa20poly1305_ref_open"
/ usr / bin / ld: /tmp/ccs2jNoK.o: in the "main" function:
mqtt_vpn.c :(. text + 0xfa0): undefined reference to "crypto_hash_sha512_ref"
/ usr / bin / ld: mqtt_vpn.c :(. text + 0x1874): undefined reference to "crypto_secretbox_xsalsa20poly1305_ref"
collect2: error: ld returned 1 exit status

I'm already tired of looking for a solution, was it really difficult for the author to write a couple of lines of what and how to install, many, including myself, do not understand how to do this = (

@pastry777
Copy link

I managed to compile with the command:
gcc -o mqtt_vpn /mqtt_vpn.c -l paho-mqtt3c -l nacl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants