Jump to content

Stargazers Lounge Uses Cookies

Like most websites, SGL uses cookies in order to deliver a secure, personalised service, to provide social media functions and to analyse our traffic. Continued use of SGL indicates your acceptance of our cookie policy.

csmart

Astroberry - Second WiFi for HotSpot / HostAPD

Recommended Posts

Hey folks,

I've got an oddball question for a somewhat unique use case...  I'm almost done building my new ROR observatory and at the stage of getting all the little electronics set up.  The ROR is about 300 feet from the house.  I use a Minix NEO42C for my imaging rig, with power supplied by solar panel(s) -- no AC power to the observatory.  I am at the limits of the WiFi signal for the NEO but it is working reasonably well.

There are a few other devices that are just at the edge of range and it's causing some issues for me.  Specifically, I have a few ESP8266 units that I use to monitor battery bank voltage, temperatures, etc.  Eventually also want to set up some sky condition sensors, etc. - also using an ESP8266.  The ESP8266 devices connect to an MQTT server on my home network, which logs the data to csv files for historical purposes.  

I've tried setting up an outdoor access point off my network to extend the range, but the one I have is actually weaker than my primary router.  (Complicated network setup so will not go into details here as they aren't toally relevant.)  Likewise, I've comandeered an old ASUS router and set it up as a WiFi repeater.  This works better, but the router runs off AC and I do not want to leave the inverter running as it tends to outpace my solar panels - particularly in the winter.  I also find that the repeater occasionally drops signal, which then wreaks havoc with the ESP devices.

Ok - stage set, now here's what I'm trying to do.  I want to set up an RPi unit (I have a few surplus laying around) as an intermediary.  Using a WiFi dongle, I can have one interface connect back to the main network, and use the RPi to setup a local network for the observatory devices.  (I can also use a high-gain antenna to improve on signal for the RPi <--> Main Network connection.)  Install an MQTT broker and have it collect the history, etc.  Sync'ing back to my main server can be done periodically using rsync.  Having a local WiFi signal and MQTT broker should resolve any issues with the ESP's.  No issues there.

Where I am running into trouble is trying to get hostpad working correctly on raspios.  I've found loads of tutorials online and managed to get the hotspot working intermittently.  However there seems to be something "off" with the setup and the SSID only shows up periodically.  (Generally I have to manually restart the hostapd service after booting and the SSID disappears again after a few minutes.)  I've also tried using systemd-networkd and a few other approaches I've found online but all have their issues. 

I very much like AstroBerry as a standalone astro server, (and could use it to run the mount on my second pier) but it seems that it will only support a single WiFi interface.  When I try to connect a USB WiFi dongle, it is greyed out in the settings.  I've poked around in the background via console but am not quite sure what's disabling the second WiFi.

So...  Does anyone know if it's possible to set up a second WiFi device on Astroberry?  Would appreciate any suggestions on how I might get a hotspot running on a second WiFi device!  (Or alternative suggestions on how I might accomplish my objectives above...)

I could just invest in a point-to-point wireless bridge, but at some point I need to cut off the spend!  Am currently in process of setting up Ubuntu 20.04 on an RPi3 to see if I can resolve the hostapd issues that way, but accomplishing this with Astroberry would be ideal.  Sorry for the long winded message - trying to be as clear as possible on usage case and what I've tried so far.

Cheers!

Corey

Share this post


Link to post
Share on other sites

Maybe set up two or three Pi's as a rack. Not sure how but it might be feasible to have one with wifi connection and the other as hotspot.

I recently managed to connect my Pi direct to MacBook via a Lan connection, you can feasibly go 100m + distance wise. That might be an alternative for long distance wifi.

Share this post


Link to post
Share on other sites
Posted (edited)

not sure if this would help?
https://thepihut.com/products/wifi-dongle-ultra-long-range-high-gain-w-5dbi-antenna

Best check compatibility with your particular Pi model first, does sound like its a WiFi dongle and not just an aerial. Otherwise a directional WiMAX aerial if you can hook that to the Pi may get you the range to the home WiFi.

https://tienda.siliceo.es/en/wifi-panel-antenna/121-alfa-network-apa-m04-7-dbi-gain-sma-directional.html

Better solution tho would be run armoured/direct burial LAN cable back to the router and have something more reliable. You may want to put surge isolators on that too tho to give some protection to the end gear in case of spikes caused during electrical storms.

edit - seems they've made the aerial integral to the board track print, bummer that'll limit any aerial mods I expect.

Edited by DaveL59

Share this post


Link to post
Share on other sites
19 hours ago, MarkAR said:

Maybe set up two or three Pi's as a rack

Hmmm... That could work.  Feels like a waste of a pi but could be feasible if I can't get it working otherwise.  I've actually got a weather station running on a Pi2 that I could relocate if it comes to that.

 

18 hours ago, DaveL59 said:

not sure if this would help?
https://thepihut.com/products/wifi-dongle-ultra-long-range-high-gain-w-5dbi-antenna

Best check compatibility with your particular Pi model first, does sound like its a WiFi dongle and not just an aerial. Otherwise a directional WiMAX aerial if you can hook that to the Pi may get you the range to the home WiFi.

https://tienda.siliceo.es/en/wifi-panel-antenna/121-alfa-network-apa-m04-7-dbi-gain-sma-directional.html

Better solution tho would be run armoured/direct burial LAN cable back to the router and have something more reliable. You may want to put surge isolators on that too tho to give some protection to the end gear in case of spikes caused during electrical storms

Already have a high gain dongle for the Pi, but can't get the hostapd hotspot working corrrectly.  Have looked at the WiMAX and similar offerings but trying to avoid yet another purchase as they can be a little spendy.  I host a repeater tower for our wireless ISP so might see if he has any surplus CPE units he'd be willing to part ways with. 

Direct burial cable would be ideal but not an option for me.

Thanks to both...  Got distracted adding some concrete to raise the pier heights yesterday so didn't get far with the Ubuntu solution.  Going to chase that one and then will move on to other options...  Work looks like it's going to be a bit nuts this week but will report back with progress.

Corey

Share this post


Link to post
Share on other sites

I ran an armoured Cat6 cable (50m) down the line of the fence / hedge of my garden to a Ubiquiti Picostation set up as just an access point. The Picostation is POE so no power worries. It connects to a Netgear gigabit switch (overkill, but what i had), that connects to my home network.

/callump

 

  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Woot!  Problem solved...  I think!

Stumbled across RaspAP, which does exactly what I wanted all via a nice clean webgui.  Installed a fresh copy of RaspiOS (no Astroberry - yet), ran the various commands to upgrade the system and then installed via the Quick Installer on the RaspAP site...  Magic ensued!

Working as desired on my desk...  Will have to cross my fingers that the high gain USB antenna I have will talk to my router from the observatory.  At the least I can set up a local network out there and keep the ESP's happy.  :)

Haven't quite figured out how to set up a static route between my main router and the observatory network yet. Looks like it should do it all for me if I choose WLAN1 as the AP device, but that's my high gain unit and want to save it for the main link...  I do have a second one laying on the desk beside me tho, so maybe I go with WLAN1 / WLAN2 for the 2.4Ghz connections and setup WLAN0 as a 5GHz local AP.

RaspAP has a toggle for Bridged Routing if I get desperate - just means greater reliance on the shaky link back to the main.  Also supports AP-STA mode so that (theoretically), this could all be done with a single wifi device.

Not sure that RaspAP will happily coexist with Astroberry, since both want to offer up a web interface on port 80, but I'll take this for now.  Still have the Pi4 in reserve so I may end up with two of them out there when I'm done.

UPDATE: Found a spot in RaspAp to change the port number, so there's still hope for Astroberry!

Yay!  Thanks to all for the suggestions along the way!

Corey

Edited by csmart
Updated comment re astroberry co-existence
  • Like 2

Share this post


Link to post
Share on other sites
Posted (edited)

Not to beat this one to death, but here's a quick shot of what I ended up with for future reference...  Up and running beautifully.  Need to switch the ESP's over to the observatory MQTT broker but they were rock solid all night just connecting thru to the server on the main network.

  • Pi4 running latest RaspiOS (as of August 25, 2020)
  • High gain USB wifi on wlan1 (old and probably obsolete, but works perfectly for my needs) 
  • RaspAP with local AP running on wlan0
  • mosquitto running as MQTT broker on the Pi -- accessible from both wlan0 and wlan1 ports so I can get data from both sides
  • All power via 12v, fed by solar panels to the deep cycle battery you see in the picture - no measurable voltage drop off the battery bank with the Pi running overnight.  (Approx 10 hours of full dark right now.)  Given there's about 200 AH of battery behind it (and another 100 AH on a second circuit), that's not all that surprising tho...

It took some fiddling to get the devices on the local network to talk to both the internet and the main network.  Send private message if any needs help with settings and I can share my setup.  I suspect I'll have issues with DNS lookup when I try to connect RDP to the Windows machine I have running the mounts but if I give it a static IP, that should solve the problem for me.

Decided in the end that I'm going to use a second Pi to run Astroberry rather than tinker around trying to get it to happily coexisting with RaspAP.   Will likely add a few more  gizmos to the Pi as I get time and cloud.  (GPS based NTP server, web server with data graphs, all sky camera, etc.)

Had to add a few (14) inches of concrete to the piers and still waiting for that to cure but getting close to First Light for the observatory.  :D

starlight_station.jpg.bbea050481d2474786b700f58033a2fa.jpg

And just for fun...  Confirmed via Google Maps 92m / 302 ft from router to the Pi.  (Approx -obviously!)

340400371_Screenshot2020-08-27at07_56_26.thumb.png.5e180b9c6a912a9b349a86d63c6af973.png

 

 

Clear skies!

Corey

 

Edited by csmart
Added satellite photo with measurement
  • Like 1

Share this post


Link to post
Share on other sites

I think we need to swap houses 😋

  • Haha 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.