ddt4all icon indicating copy to clipboard operation
ddt4all copied to clipboard

Connection problem from Ubuntu 20.04 Python 3.8

Open adriancouesnon opened this issue 3 years ago • 5 comments

Hi @cedricp , everybody,

I try to use ddt4all from Ubuntu 20.04 but it still not working correctly.

If I click on "Test ELM", he stays blocked on "Tentative d'ouverture du port192.168.0.10:35000 @ 38400".

In Connected mode, it's same.

Capture d’écran de 2021-12-09 18-05-18

Do I have to download special dependenties or not (Except PyQT5 because I already have installed it) ?

I use the Wifi ELM and he's working good from Windows Package.

Thanks for your reply.

adriancouesnon avatar Dec 09 '21 17:12 adriancouesnon

I use the Wifi ELM and he's working good from Windows Package.

Which Windows package, with Python 2 or 3? In my tests Python 3 version on Windows and Linux - Wifi doesn't work a ddt4all problem

Python 2 version on Windows and Linux - Wifi works Bluetooth works on Linux v18.04 but not on v20.04 a Linux problem

KarelSvo avatar Dec 12 '21 06:12 KarelSvo

Hi @KarelSvo,

With Python 2 Package.

ddt4all can't work with Python 2 on Ubuntu 20.04.

adriancouesnon avatar Dec 14 '21 01:12 adriancouesnon

ddt4all can't work with Python 2 on Ubuntu 20.04.

I have installed

#python 2 sudo apt-add-repository universe sudo apt-get update sudo apt-get install python2-minimal #serial sudo apt-get install python3-pip sudo pip install pyserial==2.7 -t /lib/python2.7 #pyqt5 https://askubuntu.com/questions/1254347/how-to-get-pyqt5-for-python2-on-ubuntu-20-04

KarelSvo avatar Dec 14 '21 18:12 KarelSvo

@adriancouesnon if you launch it with

python3 ddt4all

you are using python3

@cedricp

if i'm right i've found the problem (at least with my adapter) in the file elm.py , function init_wifi() you are setting the socket timeout to null with

self.hdr.setblocking(True)

in the function read() , you are reading the socket byte= self.hdr.recv(1)

but there is nothing in the buffer to read, it hangs waiting for a byte to come ....

if i add in the init function

self.hdr.settimeout(5)

and remove the line

self.hdr.setblocking(True)

it seems to work, at least at home i can query the adapter with the "EML benchmark" button

davidea72 avatar Jan 22 '22 23:01 davidea72

i use it today with my adapter on my twizy and it works

davidea72 avatar Jan 23 '22 17:01 davidea72

This is solved in https://github.com/cedricp/ddt4all/pull/779

Resync you code and close issue

Furtif avatar Feb 21 '23 01:02 Furtif

https://github.com/cedricp/ddt4all/issues/836 now need py 3.10.x

Furtif avatar Jun 02 '23 18:06 Furtif