Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for help with "Serial port exception" #68

Open
hoall opened this issue Oct 31, 2024 · 5 comments
Open

Request for help with "Serial port exception" #68

hoall opened this issue Oct 31, 2024 · 5 comments

Comments

@hoall
Copy link

hoall commented Oct 31, 2024

Hi,

I am just getting started with the TinySA Ultra. I already upgraded the firmare to the latest version tinySA4_v1.4-177-g1687fbc.bin.

I found your project and did the following steps on my Linux Mint 22:

  1. git clone
  2. cd into it
  3. python3 -m venv env
  4. source env/bin/activate
  5. pip install -r requirements.txt
  6. python3 QtTinySA.py

Everthing works so far except that I get a pop up stating "Searial port exception". The commandline gave me a few hints:

python3 QtTinySA.py Database QtTSAprefs.db found at /home/felix/.config/QtTinySA QtTSAprefs.db open: True QtTinySA v0.11.8 MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen Serial port exception. A possible cause is that your username is not in the "dialout" group.

So I added myself to dialout, logged out and back in. Still the same issue.

Regarding the MESA error I found this as an solution:

LIBGL_ALWAYS_SOFTWARE=1 python3 QtTinySA.py

My python magic is not strong, so I kindly ask for your help. My first naiv thought is that it could be the venv?

Kind Regards

@g4ixt
Copy link
Owner

g4ixt commented Nov 1, 2024

I haven't seen that MESA error before. The 'serial port exception' comes from error trapping in the 'testPort' function, so that may be a separate issue but you could try running it as 'root' (sudo) and if that stops the serial port error you will know that's a permissions issue. It needs to be able to access the USB port, so perhaps check if you are also in the 'plugdev' group?

The MESA issue is something to do with your graphics drivers I think. Try searching on Google for "MESA: error: ZINK: failed to choose pdev glx: failed to create drisw screen" and see what that shows.

You could also try the Linux executable and if that is the same then it's probably not you venv.

Ian

@water-carrier3
Copy link

water-carrier3 commented Nov 9, 2024

I'm getting the same error on Manjaro using the QtTinySA.bin after chmod u+x. I added myself to the dialout and plugdev group.

To be fair i don't think it's a grouppermission issue because i was already added to the uucp group (Arch version of dialout) and I did get it to work when I ran the binary under root which was neither part of dialout/uucp/plugdev...

@g4ixt
Copy link
Owner

g4ixt commented Nov 10, 2024

I will try to help but I am not a Linux Guru despite having used it for many years. Could you try this at the command line without the tinySA connected, then with it connected:

ian@pi4-8gb:~ $ ls /dev/ttyA*
/dev/ttyACM0

ian@pi4-8gb:~ $ ls /dev/ttyA*
/dev/ttyACM0 /dev/ttyACM1

So on my Pi4 the tinySA is on port /dev/ttyACM1
Now in a serial port terminal application, such as GTKTerm, chose that port in "configuration" and press enter. You should then see this:

?
ch>

If you type: version
and press enter you should see something like this:

ch> version
tinySA4_v1.4-177-g1687fbc
HW Version:V0.4.5.1
ch>

If you do this it will at least prove that your serial port is working and communicating with the tinySA with your normal user login.

By the way in case you notice that my example above is on PiOS, the binary file doesn't work on Pi hardware, as it wasn't built for ARM64, but the Python does:

ian@pi4-8gb:~/QtTinySA $ python3 QtTinySA.py
QStandardPaths: wrong permissions on runtime directory /run/user/1000, 0770 instead of 0700
Personal configuration database found at /home/ian/.config/QtTinySA
Database open: True
QtTinySA v0.11.7
Serial port /dev/ttyACM1 open: True
/dev/ttyACM1 test 0 : tinySA4_v1.4-177

@water-carrier3
Copy link

water-carrier3 commented Nov 12, 2024

Sorry I didn't came back to this immediately.
I'm also sorry because apparently I didn't test this properly since at the moment I've come to realize that I can run QtTinySA.bin without being root...
So I probably should have logged out and in this after adding myself to the dialout group. My bad!

@hoall
Copy link
Author

hoall commented Nov 21, 2024

Hello,

I am really sorry for my late response. Currently I am really busy, I am going to give it another try following your advice this weekend. Have a good week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants