Install aioble with upip?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
esp32bob
Posts: 7
Joined: Wed Oct 20, 2021 9:19 am

Install aioble with upip?

Post by esp32bob » Wed Oct 20, 2021 9:22 am

Should I be able to add the 'aioble' library to esp32 with upip?
If not, what is the recommended method?

I am using rshell already
Thanks

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Wed Oct 20, 2021 6:15 pm

Would this help?
viewtopic.php?t=10881

esp32bob
Posts: 7
Joined: Wed Oct 20, 2021 9:19 am

Re: Install aioble with upip?

Post by esp32bob » Wed Oct 20, 2021 9:21 pm

Thanks for the reply, but that thread already assumes the aioble libraries are installed.
I am asking how to install them
--P

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Thu Oct 21, 2021 12:08 am

Sorry, I thought you just copied all those files at :
https://github.com/micropython/micropyt ... ble/aioble
to flash on the ESP32 and away you go.

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Thu Oct 21, 2021 1:26 am

Or are you asking how to use rshell to copy any files to your device?

esp32bob
Posts: 7
Joined: Wed Oct 20, 2021 9:19 am

Re: Install aioble with upip?

Post by esp32bob » Thu Oct 21, 2021 6:49 am

davef wrote:
Thu Oct 21, 2021 1:26 am
Or are you asking how to use rshell to copy any files to your device?
Yes, I am asking how to install the aioble library onto the device. You can tell I am not a python developer, I just use python to get networking things working. Copy a file called "aioble.py" and then "import aioble" was what I was hoping for :-)

I can not use upip, and just copying the files within rshell doesn't work for me.
eg;
cp /opt/micropython-lib/micropython/bluetooth/aioble/aioble/* /pyboard

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Thu Oct 21, 2021 7:01 am

I wasn't going to assume anything :)

Are you running rshell in Linux?

What image do you have on your device?

What board are you using?

If you cd to /pyboard/ and do a ls do you see files on the board?

Do you get an error msg when you do:
cp /opt/micropython-lib/micropython/bluetooth/aioble/aioble/* /pyboard
?

Can you copy any files to your board?

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Thu Oct 21, 2021 7:04 am

When the files are copied to /pyboard/
then you should be able to do:

Code: Select all

cd /pyboard
repl
Ctrl-D
import aioble
Then we can deal with the errors that arise from that.

esp32bob
Posts: 7
Joined: Wed Oct 20, 2021 9:19 am

Re: Install aioble with upip?

Post by esp32bob » Thu Oct 21, 2021 7:41 am

Thanks for your help.
All of the files from that folder are in /pyboard

Code: Select all

/pyboard> ls
lib/               ble_temperature.py bt_test.py         core.py            main.py            server.py
__init__.py        boot.py            central.py         device.py          peripheral.py      test2.py
ble_advertising.py bt_irq.py          client.py          l2cap.py           security.py        wifi.py
/pyboard> repl
Entering REPL. Use Control-X to exit.
>
MicroPython v1.17 on 2021-09-02; ESP32 module with ESP32
Type "help()" for more information.
>>>
>>> import aioble
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'aioble'
>>>

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: Install aioble with upip?

Post by davef » Thu Oct 21, 2021 8:10 am

Right. I had a look at the file called manifest.py maybe you have to do something with that. I don't know what the term <freeze> means. Had a look at python keyword freeze and it looks like it was not implemented.

Good luck!
Last edited by davef on Thu Oct 21, 2021 8:14 am, edited 1 time in total.

Post Reply