Page 1 of 2

Install aioble with upip?

Posted: Wed Oct 20, 2021 9:22 am
by esp32bob
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

Re: Install aioble with upip?

Posted: Wed Oct 20, 2021 6:15 pm
by davef
Would this help?
viewtopic.php?t=10881

Re: Install aioble with upip?

Posted: Wed Oct 20, 2021 9:21 pm
by esp32bob
Thanks for the reply, but that thread already assumes the aioble libraries are installed.
I am asking how to install them
--P

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 12:08 am
by davef
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.

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 1:26 am
by davef
Or are you asking how to use rshell to copy any files to your device?

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 6:49 am
by esp32bob
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

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 7:01 am
by davef
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?

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 7:04 am
by davef
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.

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 7:41 am
by esp32bob
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'
>>>

Re: Install aioble with upip?

Posted: Thu Oct 21, 2021 8:10 am
by davef
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!