Forum > Other

how to (need idea)

(1/1)

krolikbest:
Hi,

 i'm in the middle of building some sensors net. I've ten sensors (based on esp8266) around and they're communicating with RPi over TCP. On the RPi works my httpserver which keeps connection with these sensors. Let say this network has addressing 192.168.0.1 .... 10 (sensors[1..10]) and RPi sees them. This works (on my desk), I can read sensor's datas. However PRi and sensors work in range of my home router, so IP / wifi net name is hard coded in every sensor and RPi on the start first makes scan looking them through some address range in this wifi net name.  So far so good. However RPi should act also like AP (access point) in case there won't be any other wifi net (lack of router).  So if there is no ethernet (no router, no other AP etc) then RPi  provides own wifi net (of course sensors then would have hard coded this wifi net (name, passwd, IP etc). And there comes the question: is this possible to configure Raspberry Pi that it acts like router or AP and then there is no need to use other router?
Hope I messed it up only minimal describing my idea :)

Thaddy:
Yes that is possible, like with any cpu. A good example is PiHole which I run permanently on my home server (which is actually an array of RPi's )  PiHole runs a DNS server and that is basically what you need.
Study the code from PiHole (Python). It should be able to be translated to FreePascal, but I am not really interested in doing that.

krolikbest:
Meanwhile it seems I've found solution but have to read docs and then test. It's true, it can act like AP and bridge (if there is other router)... But if someone has it done already, I don't mind if shares hot to set it up on RPi :) ( I have RPi 3B+)

Navigation

[0] Message Index

Go to full version