Hi All, How can I upload the .HEX files already compiled directly to the Wio Terminal?
Gianfranco
Hi @Gianfry60
Easier way is to use the aip tool we have for ArduPy, which supports flashing bin
files. If you also have the compiled bin files you can upload using the following:
aip flash [YOUR BIN PATH]
Thanks @ansonhe97, where can I download this tool?
Hi @Gianfry60
Please follow this guide to install aip: https://wiki.seeedstudio.com/ArduPy/#install-aip-with-macos
Hi @ansonhe97, I’m trying to use aip as you told me, but despite having correctly placed the fw.bin file in the root of d: I always get an answer “Could not find the specified path”. Why?
Can you give me a suggestion?
Thank you
C:\Users\gianf\AppData\Local\Programs\Python\Python38\Scripts>aip flash d:\fw.bin
MODE COM19:BAUD=%d PARITY=N DATA=8
Stato del dispositivo COM19:
Baud: 115200
Parità: None
Bit di dati: 8
Bit di stop: 1
Timeout: OFF
XON/XOFF: OFF
Sincronizzazione CTS: OFF
Sincronizzazione DSR: OFF
Sensibilità DSR: OFF
Circuito DTR: OFF
Circuito RTS: ON
C:\Users\gianf\AppData\Roaming\aip\ardupycore\Seeeduino\tools\bossac\1.8.0-48-gb176eee/bossac.exe -i -d --port=COM19 -U --offset=0x4000 -w -v d:\fw.bin -R
Impossibile trovare il percorso specificato.
C:\Users\gianf\AppData\Local\Programs\Python\Python38\Scripts>
Can you show me a screenshot of the terminal please, hard to tell from text here. Thanks
Hi, @ansonhe97
I captured your terminal but unfortunately it is in Italian I hope you can translate it with the help of google
Hi @Gianfry60
The reason for this it’s the path is not correctly used, you can do the following:
-
Type
aip flash
in the terminal -
Then drag the bin file to the terminal, this will do the correct path for you.
Excuse me @ansonhe97 but I am not very experienced in python, for terminal you mean the terminal after I launched Python or the Windows Prompt? I am using windows and not Mac. I tried to drag the file to the windows prompt but it didn’t work it gives me the same error
You can use window’s powershell and has all the same command. Under powershell, can you simply try typing:
aip
and see if this is working properly?
If so, try the following to upload an ArduPy firmware to Wio Terminal first to make sure that the aip is working properly:
aip build --board=wio_terminal
aip flash
hi @ansonhe97, there is a problem with the aip when i try to run aip build --board = wio_terminal python gives me an error about the certificate which probably has expired. Can you update it?
Thank you
Gianfranco
What exactly is wrong? I don’t have that problem here. If you could post some log, maybe you could help us.
Hi @Baozhu, I am attaching below the log of commands and messages I get when I try to run “aip build --board = wio_terminal”, I believe there are expired certificates because this is a typical Python error when this happens. If not, please tell me how to fix it.
Thank you
C:\Python38\Scripts>aip build --board=wio_terminal
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’))’: /ardupy/ardupy-core.zip
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’))’: /ardupy/ardupy-core.zip
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’))’: /ardupy/ardupy-core.zip
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’))’: /ardupy/ardupy-core.zip
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’))’: /ardupy/ardupy-core.zip
ERROR: Exception:
Traceback (most recent call last):
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 672, in urlopen
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 376, in _make_request
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 994, in validate_conn
File “site-packages\pip_vendor\urllib3\connection.py”, line 360, in connect
File "site-packages\pip_vendor\urllib3\util\ssl.py", line 370, in ssl_wrap_socket
File “ssl.py”, line 423, in wrap_socket
File “ssl.py”, line 870, in _create
File “ssl.py”, line 1139, in do_handshake
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “site-packages\pip_vendor\requests\adapters.py”, line 449, in send
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 760, in urlopen
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 760, in urlopen
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 760, in urlopen
[Previous line repeated 2 more times]
File “site-packages\pip_vendor\urllib3\connectionpool.py”, line 720, in urlopen
File “site-packages\pip_vendor\urllib3\util\retry.py”, line 436, in increment
pip._vendor.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=‘files.seeedstudio.com’, port=443): Max retries exceeded with url: /ardupy/ardupy-core.zip (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’)))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “site-packages\pip_internal\cli\base_command.py”, line 188, in _main
File “aip\build.py”, line 349, in run
File “aip\build.py”, line 291, in downloadAll
File “site-packages\pip_internal\operations\prepare.py”, line 198, in unpack_url
File “site-packages\pip_internal\operations\prepare.py”, line 124, in get_http_url
File “site-packages\pip_internal\operations\prepare.py”, line 216, in _download_http_url
File “site-packages\pip_internal\network\download.py”, line 189, in call
File “site-packages\pip_internal\network\download.py”, line 157, in _http_get_download
File “site-packages\pip_vendor\requests\sessions.py”, line 543, in get
File “site-packages\pip_internal\network\session.py”, line 421, in request
File “site-packages\pip_vendor\requests\sessions.py”, line 530, in request
File “site-packages\pip_vendor\requests\sessions.py”, line 665, in send
File “site-packages\pip_vendor\requests\sessions.py”, line 665, in
File “site-packages\pip_vendor\requests\sessions.py”, line 245, in resolve_redirects
File “site-packages\pip_vendor\requests\sessions.py”, line 643, in send
File “site-packages\pip_vendor\cachecontrol\adapter.py”, line 53, in send
File “site-packages\pip_vendor\requests\adapters.py”, line 514, in send
pip._vendor.requests.exceptions.SSLError: HTTPSConnectionPool(host=‘files.seeedstudio.com’, port=443): Max retries exceeded with url: /ardupy/ardupy-core.zip (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1076)’)))
C:\Python38\Scripts>
Hi @Gianfry60
Could you run this command first and build the firmware again?
pip install --upgrade certifi
Hi @lakshan, thanks for your directions but unfortunately I still haven’t solved when I launch your command I have these messages:
C:\Python38\Scripts>pip install --upgrade certifi
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))’: /simple/certifi/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))’: /simple/certifi/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))’: /simple/certifi/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))’: /simple/certifi/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))’: /simple/certifi/
Could not fetch URL https://pypi.org/simple/certifi/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/certifi/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))) - skipping
ERROR: Could not find a version that satisfies the requirement certifi (from versions: none)
ERROR: No matching distribution found for certifi
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=‘pypi.org’, port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, ‘[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1124)’))) - skipping
C:\Python38\Scripts>
Your problem seems similar to this: https://github.com/pypa/pip/issues/5448
Hi @ansonhe97, I solved my problem by uninstalling openssl and installing Pyton39. The openssl installation most likely conflicted with python.
Thanks anyway for your help.
Gianfranco
Hi @ ansonhe97, I’m trying to install aip on another computer. the installation of aip was successful but when I try to install the WIO terminal board it gives me this error.
Click to see the code
C:\Python38\Scripts>aip build --board=wio_terminal
Traceback (most recent call last):
File “c:\python38\lib\runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “c:\python38\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Python38\Scripts\aip.exe_main.py", line 7, in
File “c:\python38\lib\site-packages\aip\main.py”, line 52, in main
from aip.command import commands_dict, parse_command
File “c:\python38\lib\site-packages\aip\command.py”, line 47, in
from aip.install import installCommand
File “c:\python38\lib\site-packages\aip\install.py”, line 34, in
import requests
ModuleNotFoundError: No module named ‘requests’
C:\Python38\Scripts>
Can you help me figure out where I’m wrong?
Thanks
Hi @Gianfry60
Please install requests library by typing the following command:
pip install requests
After that you may proceed with:
aip build --board=wio_terminal
Best Regards,
Lakshantha
Thanks @lakshan, I installed requests as you indicated, but now it gives me another error. I am attaching you below.
C:>cd C:\Users\gianf\AppData\Local\Programs\Python\Python39
C:\Users\gianf\AppData\Local\Programs\Python\Python39>pip install requests
Collecting requests
Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 1.9 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
|████████████████████████████████| 147 kB 3.3 MB/s
Collecting chardet<5,>=3.0.2
Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
|████████████████████████████████| 178 kB 2.2 MB/s
Collecting idna<3,>=2.5
Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
|████████████████████████████████| 136 kB 3.3 MB/s
Installing collected packages: urllib3, idna, chardet, certifi, requests
Successfully installed certifi-2020.12.5 chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.2
C:\Users\gianf\AppData\Local\Programs\Python\Python39>aip build --board=wio_terminal
update local board json…
http://files.seeedstudio.com/ardupy/package_new_seeeduino_ardupy_index.json
done!
‘packages’
Traceback (most recent call last):
File “c:\users\gianf\appdata\local\programs\python\python39\lib\runpy.py”, line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File “c:\users\gianf\appdata\local\programs\python\python39\lib\runpy.py”, line 87, in run_code
exec(code, run_globals)
File "C:\Users\gianf\AppData\Local\Programs\Python\Python39\Scripts\aip.exe_main.py", line 7, in
File “c:\users\gianf\appdata\local\programs\python\python39\lib\site-packages\aip\main.py”, line 52, in main
from aip.command import commands_dict, parse_command
File “c:\users\gianf\appdata\local\programs\python\python39\lib\site-packages\aip\command.py”, line 46, in
from aip.build import buildCommand
File “c:\users\gianf\appdata\local\programs\python\python39\lib\site-packages\aip\build.py”, line 34, in
from pip._internal.operations.prepare import (
ImportError: cannot import name ‘_download_http_url’ from ‘pip._internal.operations.prepare’ (c:\users\gianf\appdata\local\programs\python\python39\lib\site-packages\pip_internal\operations\prepare.py)