April 26, 2024, 10:49:33 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Help with com ports in Ubuntu

Started by Andy, February 13, 2015, 07:29:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andy

I'm looking into how my windows program can work in Linux, so I installed Ubuntu to try it.

I installed the package called Wine that allows windows programs to run in Linux, so far no problem.

My program runs but I use a serial device called an ELM327 based on Prolifics pl2303 chip, this in windows is a USB to Serial device.

I've not used linux for years, and I'm having problems getting my program to communicate with it. The program is designed to use a com port - say com2 in windows.

Is there any kind sole out there willing to help, I've tried so many suggestions from websites, they either don't work, utilities not there or my eyes are going square!

can anyone help please,
Thanks,
Andy.

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

LarryS should be back Monday and he is a linux guru so he should be able to help you.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Andy

Thanks Larry,

I've just found the answer.

I was doing everything correct, except I needed to type a command "chmod" which is something like "Run as Administrator" in Windows.

The com port is now recognised, and my program works in Linux, which means probably means most IWBasic programs will run in Linux.

Basically, in Linux you need to install a third party program called "Wine", which allows Windows .exe files to run on non-windows platforms, it was getting the "com ports" as windows calls them to work with my program.

If anyone needs to know how I managed it, please reply or send me a message as I'm always happy to help.

Regards,
Andrew.
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

LarryMc

Glad you figured it out.
I was aware of WINE but know nothing about using LINUX.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

Quote from: andy1966 on February 14, 2015, 06:06:34 AM
The com port is now recognised, and my program works in Linux, which means probably means most IWBasic programs will run in Linux.

Havent yet decided whether changing to Linux or not, but this is good news if I decide to do so. The only detail preventing me to change, is how my UDP routines will work.

One last question: will it be necessary to type "chmod" every time you start the program, or is this something that can be done by setting the program properties?
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Hi Egil,

At the moment, the chmod command only needs to be typed once after you have started linux, the program will run as many times as you want until shutdown / restart of linux.

I only need the chmod to allow access to my USB to Serial device, most windows applications probably
don't need serial devices.

I can tell you that the Wine Windows Program Loader application does work without any Windows O/S on a machine, you simply add in your windows .exe files (only once) and select run in Windows XP mode (my choice).

You do not need to add them in again after a shutdown / restart.

Yes linux is nice, it's just a matter of getting used to it after so many years of running windows.

You can try Ubuntu, that's what I have, and you can install it along side Windows, (dual boot), or run it from a DVD.

Thanks,
Andy.


Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Thanks for the information Andy!

In a month or so, I will receive two used computers from the local taxi company. Both of them will be whithout harddisks. So my plan is to insert new harddisks, install Linux and start experimenting.
Wine will come in  handy at the start, but I hope to be able to compile native Linux programs in the future, using the Linux version of EB. These programs must cope with multiple comports and/or multiple soundcards and be able to communicate on both local network and the internet using UDP.
If I succeed, these computers will replace  two rather old netbooks running 24/7 decoding AIS (vessel positions) and ADSB (plane positions by decoding the "secondary radar" transmissions).

I am part of an international network of enthusiasts collecting data from these two systems, and forwarding the results to servers in England, and you can see the results youself here: http://shipfinder.co/ for vessel positions (approx. 25 nautical miles radius around my home), and http://planefinder.net/ for plane positions (approx. 220 nautical miles range).
And since Micro$oft tend to make hobbyprogramming harder in both Win8 and Win10, I am constantly looking for other suitable operating systems. Presently Linux seems to be the best option.

Regards
Egil

Support Amateur Radio  -  Have a ham  for dinner!

Doc

QuoteOne last question: ....or is this something that can be done by setting the program properties?

In a nutshell, that's exactly what "chmod" is doing. CHMOD is the most simple form of application and/or file security on Linux systems and actually means "change mode" or to change properties. The three most common modes for any given file or folder/directory are:

(r) read
(w) write
(x) execute

chmod'ing a file with the property of "x" would make it executable, allowing the user to launch it as an application presuming there is a suitable program on the system to actually run it. In the case of a Windows executable (.exe) file that you might want to run on a Linux system, that program would be the aforementioned WINE.

Here is a short and simple tutorial on the subjext of chmod:
http://catcode.com/teachmod/chmod_1.html

HTH,
-Doc-

Andy


Thanks Doc!

Egil - (and anyone else), you may find reading this help file may help you, especially
Step 4 - ELM configuration.

I made this help file yesterday (not finished yet).

The software I wrote is called AutoScan - a car diagnostics program to view live vehicle data, it can also reset the engine warning light.

AutoScan is written in IWBasic.

The ELM mentioned in the help file is a USB to Serial interface device to connect to vehicles.

Other points:
Most Linux kernels have the ELM driver included, so there was no need to download & install a drivers for it.

Hope it makes interesting reading (and any suggestions as to how I can simplyfy the initial steps would be welcome).

Thanks,
Andy
:)

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Thanks Andy!
That help file makes many things easier to understand.
Funny thing is that in the 1980s I worked for a company that amongst other things, was developing diagnostics software for large maritime diesel engines. I do not know all details, as I was working on another project , but every Friday we had meetings where the project groups were imformed about the other projects to see if there were similarities the different projects could benefit from.

Hi Doc!
Seems like the chmod command works like the old DOS command ATTRIB.

Support Amateur Radio  -  Have a ham  for dinner!

Andy


Thanks Egil!

Yes, you think of the chmod command like Attrib in dos / windows.

You can also find a wealth of information on linux commands on-line to help you.

I would love to write and compile a native linux program using IWBasic, but for this program I will stick to Wine to run it
as it's a very large program.

Glad the help file helps you!

All the best,
Andy.
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

February 16, 2015, 07:55:07 AM #11 Last Edit: February 16, 2015, 08:02:58 AM by Egil
Quote from: andy1966 on February 16, 2015, 06:17:26 AM
I would love to write and compile a native linux program using IWBasic, ...

So do I. That makes us two, and if we only could persuade more people to think like us, maybe LarryS will consider to do more work on the IWB Linux version...... ?  ;)

At least there now is more information (and hopepfully more valid information) on the internet about the different Lunux distros, than last time I had a look at it several years ago.
Support Amateur Radio  -  Have a ham  for dinner!

Andy

Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Rock Ridge Farm (Larry)

I am back - just got to catch up now.

I actually do work on the linux version time to time.
Had it working and GTK changed - got ticked and put it aside.
It is high on my list once 3.0 is all wrapped up.
I actually built an IWLinux based on Debian so I would have a bit more control.
Possible in a month if I can fix the gtk changes.

Larry

Egil

Support Amateur Radio  -  Have a ham  for dinner!

Brian

Hi,

Just looking at Averoy on Google Earth - there doesn't appear to be much there, except you, of course!

Brian

Egil

February 18, 2015, 04:08:37 AM #16 Last Edit: February 18, 2015, 04:10:25 AM by Egil
Hi Brian!

You are right, less than 3000 people living on this island, but we have constantly lots of tourists visiting here. They come all year round, and pay a fortune to stay. They come mainly for fishing, diving and windsurfing. And for our scenic nature and fresh air.

I attach a map with a red marker indicating where I live at the northern part of the island. The place is called Futsetra. Shall I put the kettle on?    ;D ;D ;D
Support Amateur Radio  -  Have a ham  for dinner!

Brian

Yes, please, Ty-Phoo tea will do nicely! Sadly, I can't make it at the moment, as I am recovering
from a total hip replacement 16 days ago

Do you see the Northern Lights from there? Would love to see them...

Brian

Andy

You should be on Paros Island Greece we have snow and very high cold north winds kettle is on. If you and Brian fancy a cup of English tea
Andy
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Andy

may be in a couple months when you have recovered Brian  you should come over for some sun hope you recover quickly
Andy
:)
Day after day, day after day, we struck nor breath nor motion, as idle as a painted ship upon a painted ocean.

Egil

Quote from: Brian Pugh on February 18, 2015, 06:45:43 AM
Yes, please, Ty-Phoo tea will do nicely! Sadly, I can't make it at the moment, as I am recovering
from a total hip replacement 16 days ago

Do you see the Northern Lights from there? Would love to see them...

Brian

I don't now that brand, but the local tea d eal can most certainly get it for me. Would be nice with a visit.
Hope your hip replacement was successful, and that you recover soon!

We can see the northern lights (aurora borealis) every now and then, but only in the winter time, so it is a rather cold experience. But as a radio amateur I used to communicate on the VHF  bands, using the northern lights as a reflector. But when the lights become visible at my latitude, the radio reflections are blocked. So I like it better when it is not visible... :D Around 300 days a year such radio arora conditions occour.  

Had an accident some years ago, and injured my spine and right hip. After several hospital stays, my back is now ok, but the hip is killing me. Fortunately I have always been in good physical shape (I was injured in a mountain bike competition...), so recovering after the spine surgeries, was just a continuation of my usual exercises, but the hip gets worse every week now.
Was at the hospital for hip examination some weeks ago, and doctors said they'll  set me up for a hip replacement. Unfortunately there is a queue, so my patience is in for a beating.

Andy's Paros Island sounds very tempting... But I alwlays beleived you had higher temperatures and nice beaches donw there.

But now we have strayed so much "off topic" that we are probably up some "noise" from LarryMc.... ;D
Support Amateur Radio  -  Have a ham  for dinner!

Brian

OK, last word!

Andy: Rhodes and Symi is the nearest I have been to Paros

Egil (that name can't be right!): The hip operation is a doddle - op in the morning, stood at the side of the bed in
the afternoon, up and down steps the next day, down the corridor on the third day, and then they kick you out

Worst thing is getting the muscles in the hip going properly, which takes quite a few weeks.
Already had the left hip done, the recent op was the right one

Brian

Egil

Andy:
If you mean my christian name, it is quite correct. It is a very old boys name here in Scandinavia, and means "he who has a sharp vision".

(and english speaking people pronounce my name the same way as  the pronounce the word "eagle". That birds also have a sharp vision... ;D ;D)
Support Amateur Radio  -  Have a ham  for dinner!

LarryMc

Quote from: Egil on February 18, 2015, 08:22:45 AM
But now we have strayed so much "off topic" that we are probably up some "noise" from LarryMc.... ;D

AH HA!!!! CAUGHT YA'LL IN THE ACT!!!
;D :D ;D :D ;D :D ;D
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library