Ready, steady… save!
You don’t need a chart to join in. Here are 2 ways to record your savings:
1. Cross it off
Pop a chart into your first post. Saved an amount? Cross it out! Read more »
£0.01 £0.02 £0.03
2. Write it down
Skip the chart and add updates to your first post. Read more »
“Another +£3 saved today. Go me!”
Use +£ before each new saving so it counts towards your total.
We’d like to remind Forumites to please avoid political debate on the Forum.
This is to keep it a safe and useful space for MoneySaving discussions. Threads that are – or become – political in nature may be removed in line with the Forum’s rules. Thank you for your understanding.
Linux Programming
NiVZ
Posts: 174 Forumite
Hello,
I'm an experienced Windows user and am writing a program in a scripting language called 'AutoIT'.
My program is going to provide a graphical user interface (GUI) that reads data from diabetic blood glucose meters and uploads them to a database on a web site.
Someone has asked if it would be possible to do something similar in Linux.
I just wondered if anyone could give some suggestions on what is the best flavour of Linux to use, and programming language keeping in mind it needs to have a GUI and access the COM port?
Here is some more techy details from the windows side:
All these meters use USB-to-Serial cables via a virtual COM port. I've heard some versions of Linux detect these and install drivers for them automatically.
The program also needs to be able to handle sending binary via the COM port (to enable sending and receiving of Chr(0) - otherwise it is interpretted as 'end of string')
The uploading to the website is done using an XMLHTTP object and REST.
Any pointers greatly appreciated.
NiVZ
I'm an experienced Windows user and am writing a program in a scripting language called 'AutoIT'.
My program is going to provide a graphical user interface (GUI) that reads data from diabetic blood glucose meters and uploads them to a database on a web site.
Someone has asked if it would be possible to do something similar in Linux.
I just wondered if anyone could give some suggestions on what is the best flavour of Linux to use, and programming language keeping in mind it needs to have a GUI and access the COM port?
Here is some more techy details from the windows side:
All these meters use USB-to-Serial cables via a virtual COM port. I've heard some versions of Linux detect these and install drivers for them automatically.
The program also needs to be able to handle sending binary via the COM port (to enable sending and receiving of Chr(0) - otherwise it is interpretted as 'end of string')
The uploading to the website is done using an XMLHTTP object and REST.
Any pointers greatly appreciated.
NiVZ
0
Comments
-
As a non-programmer, I don't know if the following link will give any hints at all - there's a vast amount of Linux information out there http://www.faqs.org/docs/Linux-HOWTO/Serial-Programming-HOWTO.html#AEN1020
-
Probably the best first step is to find out if any of the current Linux kernels actually do have drivers built-in. If they don't, your best option is simply to say No!
If you download one of the current Linux distributions (Ubuntu is probably a good choice here) and boot it as a LiveCD on a test PC, wait until everything has settled down, plug in your USB device, open a terminal and type "dmesg". You should see (at the bottom of a long list of messages) whether your device was detected, and whether a driver was successfully loaded.
If that works, there are quite a few BASIC-like scripting languages for Linux - for example Gambas - but you will probably need to go to a much more specialist forum for an answer to the question of whether that will support binary via a COM port...0 -
Hello,
Thanks for the replies. I'll have a look at Ubuntu - might try running it in a Virtual PC and see how I get on.
NiVZ0 -
might try running it in a Virtual PC and see how I get on.
I'm not sure why you would choose to do that. You're more likely to find out the limitations of Virtual PC than anything else. Why do you not want to run it as a LiveCD? Ok, it will be slow, but speed surely isn't a concern at this stage?0 -
If you go for Ubuntu, I'd say try a Wubi install, it'll be much faster than a LiveCD and allow you to play around more, but you don't have to go to the trouble of partitioning and formatting the disk as you would for a 'real' install.
In terms of languages, I'd suggest looking into Python. I'm not sure about AutoIT but having had a quick look at the website, it seems fairly basic so Python may have a bit of a learning curve, but it'd be well worth it since Python is a very flexible and powerful language. It also runs on most platforms, so you can do Windows and Linux programming in it. There is a library for using serial/COM ports called pySerial.0 -
Hello,
Sorry should have said I've done plenty of programming VB, .NET and C++
The AutoIT was just for rapid proto-typing and there was already a program available that could interact with the COM port that I've built upon and made it easier to figure out the meters command language (protocols)
On the Linux side, I've seen someone say that you can use the 'lsusb' command to list the USB devices and see if the cable driver has installed.
On the language front I've seen Ruby and Java mentioned a few times. The only other thing I need to think about is whether to go for a language like C++ which would need to be compiled on each platform, or JAVA where it doesn't need re-compiled.
NiVZ0 -
-
Hello,
Tried the Ubuntu 9.10 LiveCD with some success.
Both meter cables are detected. The Lifescan Onetouch cable appears to use /dev/ttyUSB0.
The Abbott cable is detected but I can't figure out which device it is in /dev I had a similar problem in Windows as this cable uses a UMP Port instead of a virtual serial port. The Linux 'demsg' command is showing it as a 'new full speed USB device using uhci_hcd device and address 3'
I was planning to use vmware for the virtual PC as I can't wipe my windows install
and vmware gives better use of the USB devices.
NiVZ0 -
I was planning to use vmware for the virtual PC as I can't wipe my windows install
and vmware gives better use of the USB devices.
Give Wubi a go then, doesn't affect your windows install and if you ever want to get rid of it you can just remove it the same as a normal Windows program. It'll give much better performance than VMWare and give you a truer picture of how the software will function on a normal Linux install0 -
Give Wubi a go then, doesn't affect your windows install and if you ever want to get rid of it you can just remove it the same as a normal Windows program. It'll give much better performance than VMWare and give you a truer picture of how the software will function on a normal Linux install
A simpler set up is the best solution, that being Linux installed on its own partition. Introducing complexity could become time consuming if you've got to troubleshoot later down the line.
I wouldn't recommend using Ubuntu for development. Debian is a far better distro for the task with a much larger community of developers.0
This discussion has been closed.
Categories
- All Categories
- 356K Banking & Borrowing
- 255K Reduce Debt & Boost Income
- 456.3K Spending & Discounts
- 248.5K Work, Benefits & Business
- 606.3K Mortgages, Homes & Bills
- 179.1K Life & Family
- 264.1K Travel & Transport
- 1.6M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.7K Read-Only Boards