Giter Site home page Giter Site logo

uploader.py/sh info about arduinobleota HOT 13 CLOSED

sdetweil avatar sdetweil commented on July 30, 2024
uploader.py/sh info

from arduinobleota.

Comments (13)

sdetweil avatar sdetweil commented on July 30, 2024 1

no, missed link above.. which fixed gi issue..

SO now script runs.. onward!

thanks

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

i have been unable to get python dbus installed, used by bluezero... on mac or ubuntu

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

this made me update my 'app version' characteristic to retrieve the hw type as well. for image selection ...thx...

from arduinobleota.

vovagorodok avatar vovagorodok commented on July 30, 2024

the bash script is looking two dirs up from tools folder, but on my mac under platformio its 4 levels up
and its looking at some json objects..

Added more info in tools folder: https://github.com/vovagorodok/ArduinoBleOTA/blob/main/tools/README.md

how is the hw/sw info used in the ESP on begin() compared to what on the sender app side?
what is the HW 'name' and value supposed to represent?

Added more information about it: https://github.com/vovagorodok/ArduinoBleOTA/blob/main/doc/VERSIONING.md

when platformio uploads the new code it reports
ESP32-D0WD-V3 (revision v3.0)

It's not related to specific devkit hardware. HW name characteristic is used only for update possibilities. See VERSIONING.md

I have to port all the uploader to my IOS config app.
get info on images from some server api. then get the selected one (how tbd) and then send to the connected device

You can check how it implemented in https://github.com/vovagorodok/ble_ota_app. It helps to small developers attach their devices to update system (for free) just by adding new line to this app: https://github.com/vovagorodok/ble_ota_app/blob/main/doc/ADD_NEW_HARDWARE.md and not create their new app for updating (if they want of course). Application is ready and will be released soon in Android and iOS stores.

from arduinobleota.

vovagorodok avatar vovagorodok commented on July 30, 2024

i have been unable to get python dbus installed, used by bluezero... on mac or ubuntu

Hmm strange it should work only in linux because of DBus. Ubuntu contain systemd and dbus

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

says dbus not found...

not a python guy. all the instructions for solving fail to build some 'wheel'?

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

on the added Doc. got it.. I think I was expecting more checking against the info needed on begin().

thanks for app info.. not sure I can go that way as your service in not advertising unless my app sends a trigger thru my service's characteristics. (ie, your service is ONLY available JUST for a the actual upload)

app.. my app is written in Ionic, so there is a layer between my JS code and hardware access.. will see..

from arduinobleota.

vovagorodok avatar vovagorodok commented on July 30, 2024

says dbus not found...
not a python guy. all the instructions for solving fail to build some 'wheel'?

In Ubuntu I just install bluezero:

pip3 install bluezero

Please show me error log

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

ok dbus fixed... next

(base) sam@sams:~/ArduinoBleOTA/tools$ pip3 install bluezero
Collecting bluezero
  Using cached bluezero-0.7.1-py2.py3-none-any.whl (41 kB)
Installing collected packages: bluezero
Successfully installed bluezero-0.7.1
(base) sam@sams:~/ArduinoBleOTA/tools$ ./uploader.py
Traceback (most recent call last):
  File "./uploader.py", line 2, in <module>
    from bluezero import adapter
  File "/home/sam/anaconda3/lib/python3.7/site-packages/bluezero/adapter.py", line 10, in <module>
    from bluezero import async_tools
  File "/home/sam/anaconda3/lib/python3.7/site-packages/bluezero/async_tools.py", line 7, in <module>
    from gi.repository import GLib
ModuleNotFoundError: No module named 'gi'

uname -a
Linux sams 5.4.0-122-generic #138-Ubuntu SMP Wed Jun 22 15:00:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.4 LTS
Release: 20.04
Codename: focal

and trying to install gi

 pip3 install PyGObject  
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (3.36.0)
Collecting pycairo>=1.11.1
  Downloading pycairo-1.23.0.tar.gz (344 kB)
     |████████████████████████████████| 344 kB 4.5 MB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pycairo
  Building wheel for pycairo (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /tmp/tmp6sj0_60m build_wheel /tmp/tmp6l7kr8mr
       cwd: /tmp/pip-install-gy39sq2h/pycairo
  Complete output (19 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-cpython-38
  creating build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-38/cairo
  copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo
  running build_ext
  building 'cairo._cairo' extension
  creating build/temp.linux-x86_64-cpython-38
  creating build/temp.linux-x86_64-cpython-38/cairo
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=23 -DPYCAIRO_VERSION_MICRO=0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/uuid -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/python3.8 -c cairo/bufferproxy.c -o build/temp.linux-x86_64-cpython-38/cairo/bufferproxy.o -Wall -Warray-bounds -Wcast-align -Wconversion -Wextra -Wformat=2 -Wformat-nonliteral -Wformat-security -Wimplicit-function-declaration -Winit-self -Winline -Wmissing-format-attribute -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpacked -Wpointer-arith -Wreturn-type -Wshadow -Wsign-compare -Wstrict-aliasing -Wundef -Wunused-but-set-variable -Wswitch-default -Wno-missing-field-initializers -Wno-unused-parameter -Wno-unused-command-line-argument -fno-strict-aliasing -fvisibility=hidden -std=c99
  cairo/bufferproxy.c:32:10: fatal error: Python.h: No such file or directory
     32 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pycairo
Failed to build pycairo
ERROR: Could not build wheels for pycairo which use PEP 517 and cannot be installed directly

from arduinobleota.

vovagorodok avatar vovagorodok commented on July 30, 2024

https://stackoverflow.com/questions/21530577/fatal-error-python-h-no-such-file-or-directory

Try:

sudo apt install python3-dev

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

thx, that worked, but no change really

(base) sam@sams:~/ArduinoBleOTA/tools$ pip3 install PyGObject  
Requirement already satisfied: PyGObject in /usr/lib/python3/dist-packages (3.36.0)
Collecting pycairo>=1.11.1
  Using cached pycairo-1.23.0.tar.gz (344 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: pycairo
  Building wheel for pycairo (PEP 517) ... done
  Created wheel for pycairo: filename=pycairo-1.23.0-cp38-cp38-linux_x86_64.whl size=325280 sha256=ca20052e697bf5f14f4e8f5d6cfe9bad8700872eed7a71a9d088648c31980aaf
  Stored in directory: /home/sam/.cache/pip/wheels/d9/25/86/ba7950c33840b1fda7ab932c7c7172d77b994807c5fd35c3ea
Successfully built pycairo
Installing collected packages: pycairo
Successfully installed pycairo-1.23.0
(base) sam@sams:~/ArduinoBleOTA/tools$ ./uploader.py
Traceback (most recent call last):
  File "./uploader.py", line 2, in <module>
    from bluezero import adapter
  File "/home/sam/anaconda3/lib/python3.7/site-packages/bluezero/adapter.py", line 10, in <module>
    from bluezero import async_tools
  File "/home/sam/anaconda3/lib/python3.7/site-packages/bluezero/async_tools.py", line 7, in <module>
    from gi.repository import GLib
ModuleNotFoundError: No module named 'gi'

from arduinobleota.

vovagorodok avatar vovagorodok commented on July 30, 2024

https://stackoverflow.com/questions/71369726/no-module-named-gi

uploader.py i started from

#!/usr/bin/env python3

Maybe not the same instances.
Try python3 uploader.py instead ./uploader.py

from arduinobleota.

sdetweil avatar sdetweil commented on July 30, 2024

closing now..

from arduinobleota.

Related Issues (20)

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.