Coder Social home page Coder Social logo

pm_hub's Introduction

PM_hub

Also the parachutemobile-aprs-hub http://parachutemobile.org

FIRST this is a brain dump and learning state.

Parachute Mobile has had an APRS, aprs.org, radio that has transmitted spO2 along with the location and altitude of the jumper. I have wanted to expand to sensors other than just spO2. Was not possible with the current gear. But with MQTT, the raspberry pi and timy circuit python boards with wifi onboard, it is very possible.

Here is the one gotcha that needs to be tested. Teeny tiny antennas and possible issues with the jumpers body blocking the signal. So the first test will be mounting the pi on the chest. Then put the python board at different locations and see what the packet loss is. Initial Test

To see the progress, look here Status

Raspberry Pi 5 Setup

I loaded the headless 64bit raspian.

I made heavy use of chatgpt for the initial bootstrap. I had to be able to start the problem clearly. Still had issues around getting wlan0 to come up and act as a correct access point.

The final configuration is piconfig/wifi_ap_setup.sh Also piconfig/iptablesetup.sh. wifi_ap_setup.sh can be run multiple times. running iptablesetup.sh multiple times will polute iptables.

Set up the MQTT password:

mosquitto_sub -h localhost -u parachutemobile -P parachutemobile -v -t timer

After it started, it is accepting MQTT packets via wlan0 from the qt board. Able to SSH in to wifi or eth0. From wifi, access the internet. So all good.

misc notes

You can read about my failure to get hostapd running. I do want to get it running at some point since it is the proper method.

After talking to a friend he convinced me to abandon bluetooth and use wifi.

The client code and paho clients works.

Setup MQTT client board

Env Setup

Install the circuit python pip wrapper. pipx setups of a venv for python packages the run a commands. Keeps the smallest venv need for the one command. pipx by default installs un ~/.local. Here are the docs
https://pypi.org/project/pipx/

pip install pipx
pipx install circup

Install Libraries

You need to install:\

circup install adafruit_connection_manager
circup install adafruit_requests
circup install adafruit_minimqtt
circup install adafruit_connection_manager

Using https://www.adafruit.com/product/5700

OK, so I could not get the arduino bootloader installed. Circuit Python it is.

MQTT is the library adafruit ported to circuitpython
https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT

Documentation
https://docs.circuitpython.org/projects/minimqtt/en/latest/

Notes on paho software

PAHO is what I am using forraspberry pi MQTT development.

Install paho to write the code to read messages.
apt install python3-paho-mqtt

pm_hub's People

Contributors

mpechner avatar

Stargazers

Mark Cohen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.