Configure a Wifi Access point for intranet/Local network only

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
sylvanomtl
Posts: 7
Joined: Thu Jan 09, 2020 12:37 am

Configure a Wifi Access point for intranet/Local network only

Post by sylvanomtl »

Happy new year everybody.
I am quite new to the world of Linux/Microcontrollers/Arduino... I am more a general engineer guy with more a mechanical background.

After months of gathering information on the Internet, and various trials with Arduino/esp8266's, and a first try of MQTT/Node-red, I would like to start implementing a battery powered local network, to monitor sensors of various types, with a lot of flexibility.

I ended up to the conclusion that MQTT would offer the best alternative, as it seems easy to implement on microcontrollers such as Arduino/Esp8266/Esp32...
So I decided to the RaspberryPi3(B?) I have to host a Broker and develop some node-red code on it.


In term of hardware I would have:


Sensors --> uController with Wifi connectivity, Sub+Pub MQTT requests

<---> RaspPi as an Access Point with MQTT Broker and a node-red
<---> Stations connecting to the Raspberry (smartphone/tablet/Other Pi) to either conrol the whole network by connecting to the Access point page (node red: port 1883 and 1880), or by having their own node-red dashboard and sub+pub to the broker.

Finally, everything will operate on batteries, in harsh environment (at least IP68 required) and miles away from an ethernet plug. There will be no ethernet cable. (Maybe later to transfer data)

Quite long description, he ?


So to carry out the development I have installed DietPi, Node-Red, MQTT... But I need to configure the Access Point. The dietPi-software propose to install something to activate the Hotspot capability, but it fails as I have no ethernet cable.


Question:
1) How to setup an access point while there is no ethernet connexion (and no internet access)?
2) If not possible, can I plug an ethernet cable and fake the DIetPi? Then remove the ethernet cable and still have the capability to operate my DietPi as an Access Point ?


Thank you and best wishes for the coming year!
Sylvain
User avatar
Joulinar
Posts: 2546
Joined: Sat Nov 16, 2019 12:49 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by Joulinar »

Hi,
welcome to the board and happy new year to you as well.

To setup the WiFi hotspot, you would need to have an internet connection because you would need to download install packages from the web.

Hope this answer your question.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sylvanomtl
Posts: 7
Joined: Thu Jan 09, 2020 12:37 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by sylvanomtl »

The issue I am facing, is that I do not have access to an ethernet plug. The modem is not accessible.
I have tried the tutorial:
https://www.raspberrypi.org/documentati ... s-point.md
but there is no dhcpcd-leases file installed on my dietpi (I had also to install other package as the dhcpcd.conf was not present on my dietPi OS)

I switched to this tutorial from adafruit:
https://learn.adafruit.com/setting-up-a ... l-software
but same again, I am stuck to fix the IP address: the command ifconfig is not available, and I am struggling to download the net-tools package.

I guess that if you own a Pi zero W then you want to do similar to what I am doing on my Pi3.
User avatar
Joulinar
Posts: 2546
Joined: Sat Nov 16, 2019 12:49 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by Joulinar »

Hi,
probably you misunderstood DietPi and what it is about 8)

DietPi is an extremely lightweight Debian OS, therefore it doesn't contain that much software and it dons't ship any additional packages compare to a standard Debian/Raspbian Lite. Every software title that is needed in addition, would need to be downloaded (requires an internet connection) and installed. DietPi is that lightweight, that it basically contains nothing except stuff that is needed to boot up.

Just to get an idea in the comparison between DietPi and Raspbian Lite. It's from 2015 but still valid.

https://docs.google.com/spreadsheets/d/ ... edit#gid=0

Yes you can run a HotSpot with Dietpi. DietPi even offers an automated setup. But this always require an internet connection for the initial installation.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sylvanomtl
Posts: 7
Joined: Thu Jan 09, 2020 12:37 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by sylvanomtl »

Hi Joulinar,
Thank you for your help!
I have found dietPi very recently and also the link you provided. I have also found a comparison of power consumption somewhere, and it seemed that DietPi was the best choice I could go for.

I guess I will switch to to another distribution (I still have the NOOB sd card). However I am still keen on going ahead with DietPi.
User avatar
Joulinar
Posts: 2546
Joined: Sat Nov 16, 2019 12:49 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by Joulinar »

yes DietPi is great thing but it requires an internet connection to setup thinks. Once all configs done, it will work independently.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
sylvanomtl
Posts: 7
Joined: Thu Jan 09, 2020 12:37 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by sylvanomtl »

So few days after, I could configure exactly what I wanted.
As a beginer, having used Microsofts system all my life, things are not obvious, especially when it came to format properly the SD card. Without going into much details, I had to use the CMD windows console, plus disk management service.

Everything run smoothly, and it is a great pleasure to discover the power of this distribution. Having a barebone system force me to think on what I need to make my projects (not an already made meal :D )

So as you mentionned, with an ethernet cable, things are pretty easy. I wonder though how you manage to to when the RPi does not have an ethernet cable (Rpi zero w) . Will I have to make an image of the system I am running on my RPi3 ?
User avatar
Joulinar
Posts: 2546
Joined: Sat Nov 16, 2019 12:49 am

Re: Configure a Wifi Access point for intranet/Local network only

Post by Joulinar »

glad to hear that we could help along the way

Regarding the RRi Zero W: best to my knowledge it has WiFi and you could use it in first place to download all needed packaged. Once all packages are there, you could configure the HotSpot function. Honestly I never did it like this but it might gonna work 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply