Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

pyOBD and serial port advice please

649 views
Skip to first unread message

T i m

unread,
Sep 6, 2011, 7:11:02 AM9/6/11
to
Hi all,

This may be a bit OT but the prog I'm trying to get working on Linux
(because I don't have an OSX laptop [1]) was I believe originally
written for and tested on OSX.

I've bought one of the little USB interfaced car diagnostic 'trouble
code' readers (for the s&g's really) and whilst I've had it running on
XP ok I've not been so lucky under Linux.

The USB to serial converter chip that is inbuilt into the device
appears under Ubuntu / Mint as /dev/ttyUSB0 whereas pyOBD:

http://www.obdtester.com/pyobd-download

only seems to offer in it's GUI config options ttyS0-3.

I Googled to some help on such things and tried to redirect /ttyUSB0
to (say) ttyS3 but once done, when you went into the config option S3
was missing from the list. ;-(

So, I was wondering if anyone had dealt with Python (or PySerial?) and
assuming this *nix stuff was close enough to know if there was a prefs
file where I could maybe pre-set the port to ttyUSB0 please (on one
install it came up default trying to talk to 'ttyACM0' and I was able
to redirect that and think it worked (I didn't have it connected to a
car at the time to be sure)). ;-)

All the best in any case,

Cheers, T i m

[1] Time for a Hackintosh maybe?

Message has been deleted

Woody

unread,
Sep 6, 2011, 10:22:34 AM9/6/11
to
T i m <ne...@spaced.me.uk> wrote:

> Hi all,
>
> This may be a bit OT but the prog I'm trying to get working on Linux
> (because I don't have an OSX laptop [1]) was I believe originally
> written for and tested on OSX.

It is a faff to use it there too.

> I've bought one of the little USB interfaced car diagnostic 'trouble
> code' readers (for the s&g's really) and whilst I've had it running on
> XP ok I've not been so lucky under Linux.
>
> The USB to serial converter chip that is inbuilt into the device
> appears under Ubuntu / Mint as /dev/ttyUSB0 whereas pyOBD:
>
> http://www.obdtester.com/pyobd-download
>
> only seems to offer in it's GUI config options ttyS0-3.
>
> I Googled to some help on such things and tried to redirect /ttyUSB0
> to (say) ttyS3 but once done, when you went into the config option S3
> was missing from the list. ;-(
>
> So, I was wondering if anyone had dealt with Python (or PySerial?) and
> assuming this *nix stuff was close enough to know if there was a prefs
> file where I could maybe pre-set the port to ttyUSB0 please (on one
> install it came up default trying to talk to 'ttyACM0' and I was able
> to redirect that and think it worked (I didn't have it connected to a
> car at the time to be sure)). ;-)

Can't really help on that one - I have tried to use pyOBD (in fact last
week on the new car) but couldn't get it to work well. I have a
bluetooth OBD interface and couldn't get it connecting last week. Need
to try again.


--
Woody

T i m

unread,
Sep 6, 2011, 5:43:57 PM9/6/11
to
On Tue, 6 Sep 2011 14:38:42 +0100, Colin Harper
<colin...@x.com.invalid> wrote:


>> I Googled to some help on such things and tried to redirect /ttyUSB0
>> to (say) ttyS3 but once done, when you went into the config option S3
>> was missing from the list. ;-(
>>
>
>

>I would use udev rules, to make my device appear how I want it.

Ah, from my experiments with udev so far (trying it to automate the
slowing of a fast mouse) I think that one is going to be beyond my
programming powers right now. ;-(

Thanks anyway.

Cheers, T i m


T i m

unread,
Sep 6, 2011, 5:51:25 PM9/6/11
to
On Tue, 6 Sep 2011 15:22:34 +0100, use...@alienrat.co.uk (Woody)
wrote:

>T i m <ne...@spaced.me.uk> wrote:
>
>> Hi all,
>>
>> This may be a bit OT but the prog I'm trying to get working on Linux
>> (because I don't have an OSX laptop [1]) was I believe originally
>> written for and tested on OSX.
>
>It is a faff to use it there too.

Oh. ;-(
>

>> So, I was wondering if anyone had dealt with Python (or PySerial?) and
>> assuming this *nix stuff was close enough to know if there was a prefs
>> file where I could maybe pre-set the port to ttyUSB0 please (on one
>> install it came up default trying to talk to 'ttyACM0' and I was able
>> to redirect that and think it worked (I didn't have it connected to a
>> car at the time to be sure)). ;-)
>
>Can't really help on that one - I have tried to use pyOBD (in fact last
>week on the new car) but couldn't get it to work well.

Well I have got it to work (I think and only once), it's just I don't
know if there is a config / prefs file and where it would be stored?
If there is such a thing (and there generally seems to be under Linux
/ OSX) then isn't it likely the tty port indent would be stored in
there, at least as a starting default?

> I have a
>bluetooth OBD interface and couldn't get it connecting last week. Need
>to try again.

I thought it might be best to avoid bt, at least to start with. ;-)

It seems quite a few people use the various (free) Windows OBD apps
via WINE but I was trying to keep it all native as such (I've only got
Linux (Mint) on the eeePC 701 and thought that might make a nice OBD
tool).

Cheers, T i m

Bruce Horrocks

unread,
Sep 6, 2011, 6:50:38 PM9/6/11
to
T i m <ne...@spaced.me.uk> wrote:

Have a look at <http://www.reactivated.net/writing_udev_rules.html> and
scroll down to the Palm Pilot example. Is that not exactly what you want to
do?

Alternatively you could search the Python source code for references to
/ttyS3 and replace them with /ttyUSB0? (I'm only on the iPad at the moment
so not able to examine the source code to see if this is really feasible.)

--
Bruce Horrocks, Surrey, England

T i m

unread,
Sep 6, 2011, 7:35:47 PM9/6/11
to
On 6 Sep 2011 22:50:38 GMT, Bruce Horrocks <07....@scorecrow.com>
wrote:

>T i m <ne...@spaced.me.uk> wrote:
>> On Tue, 6 Sep 2011 14:38:42 +0100, Colin Harper
>> <colin...@x.com.invalid> wrote:
>>
>>
>>>> I Googled to some help on such things and tried to redirect /ttyUSB0
>>>> to (say) ttyS3 but once done, when you went into the config option S3
>>>> was missing from the list. ;-(
>>>>
>>>
>>>
>>> I would use udev rules, to make my device appear how I want it.
>>
>> Ah, from my experiments with udev so far (trying it to automate the
>> slowing of a fast mouse) I think that one is going to be beyond my
>> programming powers right now. ;-(
>
>Have a look at <http://www.reactivated.net/writing_udev_rules.html> and
>scroll down to the Palm Pilot example.

Ok and yes, that looks like it could be handy.

> Is that not exactly what you want to
>do?

Yes, I believe it is, however if I understand the concept correctly,
udev is to automate an action around a USB activity and for me step
one may be more about the syntax of doing what I want (even manually).

ie. What would I have to type into terminal for make say /dev/ttyS3
actually point to the physical device /dev/ttyUSB0 in a way that an
app would think ttyS3 still exists and allow me to select it from the
GUI config page (I'm not sure I've explained this very well).

I ask because when I followed some instructions before they suggested
I first remove ttyS3 and then redirect (using a soft or hard link) to
my ttyUSB0 but then when starting the app (pyOBD) it only offered
ttys0-2?
>
>Alternatively you could search the Python source code for references to
>/ttyS3 and replace them with /ttyUSB0?

I'm not sure how I would do that (as I said, I'm no programmer or even
much of a CLI jockey) but wouldn't there typically be a mating text
based config file for this sort of thing? A pyobd.conf or similar (I
couldn't find one mind but could have been looking in the wrong place
or the wrong way).

> (I'm only on the iPad at the moment
>so not able to examine the source code to see if this is really feasible.)

Ah, ok, well if when you do get a suitable moment I would be
interested in what you find please. ;-)

Cheers, T i m


0 new messages