Raspi WiFi Access Point ‐ Configuration and Troubleshooting - smart-underworld/seestar_alp GitHub Wiki
To operate a ZWO Seestar with a seestar_alp installation on a Raspi, you generally need 3 devices: The Seestar, a Raspi, and a control device (cell phone, tablet, ...). All 3 must be in a common network and be able to reach each other. The easiest way to achieve this, especially if you are somewhere in nature, maybe just on foot with a backpack, is to use the Raspi as a WiFi access point for the Seestar and the operating device. Exactly this configuration describes this WiKi.
The hardware used:
- a Seestar S50
- a Raspberry Pi4 in the standard plastic case, Raspberry Pi OS Lite (64bit) Bookworm
- a control device (cell phone or tablet)
Result:
- you can reach abt. 10-15m distance between each device: Seestar <-10-15m-> Raspi <-10-15m-> Tablet, so max. 20 - 30m between outer points
- you can reach abt. 5V/0.44A power consumption for RasPi4, a small Powerbank is sufficient
- Prerequisite is a Raspi with installed Raspberry Pi OS Lite (64bit) Bookworm, and ssh access via Ethernet
- if you want to work as a non-root user, you have to put a sudo in front of each command, otherwise just run a sudo su once at the beginning
Execute the commands below. Parameters that you could possibly adapt to your circumstances (but you don't have to) are:
- local_ap is the Raspi internal name of the configuration
- raspi_ap is the WiFi name (SSID) that you see when you search for WiFi networks
- bg is the WiFi band, use 2.4GHz for maximum range
- 1 is the WiFi channel (more on channel selection later)
- 12345678 is the WiFi password
- 10.42.0.1/24 is the local network/network mask
- 10.42.0.1 is the default gateway of this network
nmcli device wifi hotspot ifname wlan0 con-name local_ap ssid 'raspi_ap' band bg channel 1
nmcli con mod local_ap wifi-sec.key-mgmt wpa-psk
nmcli con mod local_ap wifi-sec.psk "12345678"
nmcli con mod local_ap ipv4.method shared ipv4.addresses 10.42.0.1/24 ipv4.gateway 10.42.0.1
nmcli con mod local_ap ipv6.method "disabled"
nmcli con mod local_ap wifi.powersave disable
nmcli con mod local_ap connection.autoconnect yes
nmcli con up local_ap
The configuration is now saved in a file and should look something like this, except for the values uuid and timestamp (display with cat /etc/NetworkManager/system-connections/local_ap.nmconnection):
[connection]
id=local_ap
uuid=0da83a8c-bc35-471b-8e35-6f12622cd762
type=wifi
interface-name=wlan0
timestamp=1731503667
[wifi]
band=bg
channel=1
mode=ap
powersave=2
ssid=raspi_ap
[wifi-security]
group=ccmp;
key-mgmt=wpa-psk
pairwise=ccmp;
proto=rsn;
psk=12345678
[ipv4]
address1=10.42.0.1/24,10.42.0.1
method=shared
[ipv6]
addr-gen-mode=default
method=disabled
[proxy]
Now you can test the Raspi WiFi Access Point. Use a device that you would also like to use to access seestar_alp web page(cell phone, tablet, laptop, etc.) and connect to the Raspi WiFi. Select the network (SSID) and enter the password (raspi_ap and 12345678 if you have not changed the configuration above). In the properties of this connection (on the cell phone or whatever you are using) you should now see an IP address from the configured network and also the address of the gateway, e.g. 10.42.0.135 and 10.42.0.1 . If it is possible on the device, configure the MAC address type as device mac (or similar) and not as random mac, as is often the default value.
You can also check on the Raspi, try the commands ip neigh show or arp -a, you should see a device with e.g. 10.42.0.135 on wlan0.
Now you can configure your Seestar to access the Raspi Access Point. To do this, first switch on the Raspi, connect with your cell phone or tablet to the Seestar's internal access point via WiFi and start the Seestar app. Now configure the Seestar's access to the Raspi access point under WiFi -> Station Mode. Just as you would for access to a home network, select the WiFi (raspi_ap e.g.) and enter the password (12345678 e.g.).
The configuration can now be tested:
- switch on the Seestar and wait until it has started completely
- switch on the Raspi, for the test it is best to log in via Ethernet/SSH
- do not connect any other device to the Raspi access point at the moment
- check whether the Seestar has connected to the Raspi access point
On Raspi: Try the commands ip neigh show or arp -a, you should see a device with e.g. 10.42.0.192 on wlan0
In an existing seestar_alp installation, only the IP address of the Seestar determined in the previous section needs to be entered in section [[seestars] of config file ~/seestar_alp/device/config.toml, like in example below:
[[seestars]]
name = "Seestar1"
# ip_address should not have to be changed unless you have more than 1 seestar
ip_address = "10.42.0.192"
device_num = 1
# You can specify the following settings to override those found in the seestar_initialization section on a per-device level
#scope_aim_lat = 60 # start up latitude in degrees -90 to 80 (override default)
#scope_aim_lon = 20 # start up longitude in degrees 0 to 360 (override default)
- place all devices not too far from each other to rule out WiFi range problems for the time being
- switch on the Seestar and wait until it has started completely
- switch on the Raspi
- connect to Raspi Access Point with your cell phone or tablet etc.
- use a web browser and open seestar_alp website, it's http://10.42.0.135:5432 in our example (see above how to find out IP address)
Now you should see the website of Seestar_alp, and also a successful connection to Seestar.
You should also be able to open Seestar App and see your Seestar connected. If seestar_alp ist connected to Seestar, you are in guest mode, and you should see your Raspi device displayed as controller.
Now you can do some WiFi channel and distance tests, ideally at a location where you want to use the Seestar later. The installation of a WiFi scan app (e.g. WiFi Analyzer for Android) is ideal for these tests:
- Determine on which WiFi channel the Seestar's access point is operating (at 2.4 GHz). This is normally channel 8. Do not use this channel in the above-mentioned configuration of the Raspi access point, but a channel that is as far away from it as possible, e.g. channel 1
- Check the Scan app to see if other WiFi devices are active in the area. Try to find a free spot for the Raspi channel as far as possible.
- Test the maximum distance at which the Seestar can still successfully connect to the Raspi access point. The WiFi antenna of the Raspi4 is located near the SD card. Please note that the Seestar including its internal WiFi antenna rotates during operation/goto. This means that the orientation with the worst connection to the access point should be assumed as the maximum distance for a secure connection at all times.
- Test the maximum distance at which your control device (cell phone, tablet) can still successfully connect to the Raspi access point.
Now you have an idea of how the arrangement of the 3 devices could look, e.g. Seestar <10 meters-> Raspi AP <10 meters-> cell phone. The most important thing is of course a secure connection from the Seestar to the Raspi AP, the cell phone is no longer needed after the start of an image session/schedule, you can also start everything and then only check from time to time whether everything is still running.
The general configuration section is intended to describe problems that occur when the 3 devices involved are close together, i.e. the configuration does not work in principle. The Range section is intended to provide some information/recommendations on range problems, but is generally not the subject of this WiKi.
Use fixed IP addresses for the configuration. Test the configuration steps individually and one after the other as described in the sections above. Test the Raspi AP separately, without Seestar and without seestar_alp the registration of the control device must work first.
We use devices with small internal WiFi antennas here, it is completely normal that the range is then also very limited. The best thing to do first is to make a simple drawing with the arrangement and distances of the devices as you want to use them. If you have tested the maximum usable distances individually as indicated above, you can then estimate what additional measures may be necessary if these are not sufficient. As a simple empirical value, you can assume a maximum distance of 10-15 m between the individual components in the configuration described so far (the ?? in the drawing in the Preface section). Of course, it is always assumed that the Raspi is installed in a plastic housing as recommended. It is also best to disable Bluetooth in general on the Raspi.
We can't change anything on the Seestar, and certainly not on the control device (cell phone...) either.
One solution would therefore be to use a WiFi USB stick on the Raspi, with a rubber duck antenna. It is best to find out beforehand which devices are supported by the Linux used (Raspi OS Bookworm i.e. Debian 12).
You can ask chatgpt
or (better..) check which chipsets the kernel supports, e.g. here: https://linux-hardware.org/?id=usb:7392-7822
In the configuration of the Raspi AP, use the WiFi name of the installed UAB stick instead of wifi0.
Another solution would be to use an external WiFi repeater/range extender.
Furthermore, it is of course always possible to bridge part of the required distances using a wire solution. In addition to Ethernet, you can also use Powerline|G.hn adapters.