evilsocket / evilsocket/pwnagotchi
[BUG] GPS plugin considers hostname:port device invalid despite bettercap supporting it
- Dominant language
- Python
- Stars
- 9.2k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
The GPS plugin expects that the "device" option point to a serial device [that can be `open()`d](https://github.com/evilsocket/pwnagotchi/blob/544314b88cee7f2ee488b49bd61636d664a4c7fa/pwnagotchi/plugins/default/gps.py#L28) like `/dev/ttyS0`.
However, bettercap also [supports a hostname:port](https://github.com/bettercap/bettercap/blob/8c00207e7e24b0671b6f3bd20835c04790e2d617/modules/gps/gps.go#L41-L44) for connecting to a GPSD instance. This allows the GPS receiver to be used for setting the system clock _and_ for location tracking with bettercap.
**To Reproduce**
Steps to reproduce the behavior:
1. Setup GPSD
2. Set `main.plugins.gps.device = "localhost:2947"` in your pwnagotchi config
3. Restart pwnagotchi
4. GPS plugin fails to start with "no GPS detected" warning.
**Expected behavior**
GPS works without issue.
Contributor guide
Research direction
Start in pwnagotchi/plugins/default/gps.py at the device handling referenced by the issue, then review how the main.plugins.gps.device setting is passed to the plugin. Reproduce with GPSD at localhost:2947 and verify that the GPS plugin starts without the “no GPS detected” warning while retaining serial-device support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100