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

C implementation of hyperswarm? (IoT / embedded / ESP32) #89

Open
Harvie opened this issue Oct 19, 2021 · 7 comments
Open

C implementation of hyperswarm? (IoT / embedded / ESP32) #89

Harvie opened this issue Oct 19, 2021 · 7 comments

Comments

@Harvie
Copy link

Harvie commented Oct 19, 2021

I think hyperswarm would be great match for IoT devices.
Currently you usualy need cloud to control your smart light bulbs and/or domestic heating.
But with hyperswarm it would be possible to control my home/lab directly without middleman.

If we would be able to run hyperswarm directly on wifi-enabled microcontroller (like ESP32), we would be able to handle all communication through p2p network. But usualy it is only feasible to program such tiny devices in C.
Having hyperswarm ported to C would help a lot.

Also there is already LwIP network stack available on embedded devices, which is relatively advanced and should provide all needed APIs for sockets and raw packets.

@lanmower
Copy link

I second this :) what would it take, moving some more of hyperswarm to native libs? Wouldn't that be really good for the node hyperswarm in the long run too? It doesn't have to be a separate implementation, it can be an optimization for the main package

@jb0gie
Copy link

jb0gie commented Feb 14, 2024

I completely agree with your thoughts. The use of hyperswarm for IoT devices could indeed revolutionize the way we interact with our smart devices. The idea of eliminating the need for a cloud-based middleman and enabling direct control over devices through a peer-to-peer network is very appealing.

The potential of running hyperswarm on a wifi-enabled microcontroller like ESP32 opens up a whole new realm of possibilities. It would make the communication process more efficient and direct, which is a significant advantage in the world of IoT.

Porting hyperswarm to C would indeed be beneficial, considering that most microcontrollers are programmed in C due to its efficiency and control over hardware. This would make hyperswarm more accessible and usable in the realm of embedded systems.

The availability of the LwIP network stack on embedded devices is another advantage, as it provides all the necessary APIs for sockets and raw packets. This would make the implementation of hyperswarm on such devices much smoother.

In conclusion, your idea holds a lot of promise and could potentially lead to significant advancements in the field of IoT. It’s an exciting prospect to consider!

@lanmower
Copy link

For reference sake, here is someone that compiled a realtime PC/MAC library for ESP32

https://github.com/torsoelectronics/link-esp

This is the ableton link library, it's a UDP metronome sync between ocmputers using Kalman filters

@lanmower
Copy link

There are also some javascript projects for ESP32, that might be a lead if we can somehow make them work with the same native libraries

@lanmower
Copy link

I feel that some of the work is already done here... I see there's https://www.moddable.com/

There will also be other js implementations, can we rip the beating heart of hyperswarm out of node and put it in one of these other platforms?

@lanmower
Copy link

lanmower commented Feb 16, 2024

image

This sounds like exactly what we need for hyperswarm on esp @mafintosh do you think this sounds feasible?

https://www.moddable.com/documentation/xs/XS%20Differences

@lanmower
Copy link

lanmower commented Feb 16, 2024

The more I think about this idea the more it makes sense, imagine pairing a little usb hotspot with a esp device, and programming it to rove around, you could have remote controlled drone vehicles and extend their range anywhere where there's internet signal, on simple consumer sim cards...

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