Programming GTK Linux hardware configurator


(Steve) #1

Hi,

I require an equivalent to the Microchip utility for the MCP2200 USB to serial converter. This is currently struggling to be completed by overseas programmers on Freelancer for various reasons.

I am serious. Contact me if you’d like to have a go. Quote me too. All hardware can be delivered to your door if need be but I also have a server setup for online access. Even if you aren’t sure of your capabilities but you want to use it to further your skills you should jump in.

My timeline is getting shorter and shorter so I am encouraging you to jump in. There are a number of other programming jobs to follow if you would be interested.

Contact me (Steve) on 0423 591 130 or swmcl@internode.on.net


(Hovo) #2

If you just want a USB to serial converter (equivalent)
Arduino boards have been using the Atmega16u2, the code will be somewhere online as well


(Stuart Longland) #3

Is there a reason why GTK+ is stipulated?

While it is popular due to its LGPL heritage, do something slightly wrong (and “wrong” differs between GTK+ versions) and it poops over stderr with random crap.


(Pamela Hauff) #4

I am not sure what you are looking for but I know that the USB-interface to the arduino is a separate chip as not all arduinos come with the USB interface. One of the usb serial chips is FTDI Chip and there is a chinese one as well for the arduino clones.

https://www.ftdichip.com/USB.html

Hope that helps.


(James Churchill) #5

Guys, please actually read the first post, because all of these replies are completely off-target. OP isn’t asking for recommendations for a usb-serial device. They already have a specific device in their design and require a linux tool to configure it.

So please keep the discussion restricted to the MCP2200 that was explicitly specified and drop all the FTDI/arduino/avr/etc talk. Thanks!


(Steve) #6

Hi all,

This project is still open. Redhatter, I would be ‘all ears’ to anything better than GTK. I simply want open source, a simple GUI and low cost. I believe Qt is costly.

I may not be able to get what I want of course …

I did have an email from andrewm but I can’t seem to contact him… anyone ?

Even if you think I am off-beam and need some good advice as to the structure of the project I would come down to Brisbane to do this.

Cheers,
Steve


(Stuart Longland) #7

Qt Open Source and GTK+ are under the same license: GNU Lesser General Public License.

Qt is also available under a commercial license that allows you to statically link it with your code if you so choose. GTK+ does not give you this option.

My thinking with this actually, is that someone writes a library that provides basically an open-source equivalent to Microchip’s library, thus giving you an API to do the sorts of things you’re asking for, then that can be used to write a UI in anything people wish, e.g. command line, ncurses, GTK+, Qt, QNX Photon MicroGUI, Apple Aqua, WIN32 forms… whatever they like.

The leading question of course is, what license would this proposed MCP2200 interface be in? Would we be releasing the code under a permissive BSD/MIT-style license, something copyleft like GPL/AGPL, or something proprietary?


(Ashley Gittins) #8

I’d love to take this on but I just don’t have the time this year.

I’d suggest a python implementation might be a good way to go, then having python/tkinter provide a Tcl/Tk gui for it. There is an implementation for that chip on github I think, but no idea what state it’s in/at (and might depend on you being OK with an open source end-product).

Are there technical issues you’re having with the outsourced implementation, or are they all social/business/interpersonal issues?


(Steve) #9

Hi ag,

I don’t know where to start with the software side of things - in that - I don’t know what implementation would be best.

If I could even get some birds-eye-view by talking to people I’d appreciate it. At this point I couldn’t be certain of a particular implementation but I do know I would like the user experience to be simple.

For example, could I lay down some preparatory work that would help get the project over the line? I have spoken to Microchip. They do offer a service to convert their Microsoft libraries to Linux libraries. Would that help ?

Am I OK with an open sourced product ? Hmmm. I would probably be most OK with an open-sourced command-line product but I wouldn’t feel too comfortable with a GUI being copied so much. I must admit to not giving it too much thought TBH. I think most open source stuff isn’t paid-for software is it ?

I’m a paying ‘client’ who would also contribute as much as I could to the product. My skills are more in hardware.

I am very keen to get something happening on this one and will provide as much help as possible to get the project over the line. So if you have hardware needs or other things perhaps maybe there could be some room to move ?

Thanks for the reply.

Steve


(Stuart Longland) #10

Well, doing an open-sourced library (say, under a MIT/BSD/ISC license) means you could use that to create a GUI in potentially any toolkit you name.

I am not a lawyer, but my understanding is BSD/MIT/ISC/etc licensed code, when imported into a GPLed project, effectively become “GPL”. You might do what Google etc, do, and ask for a “contributor license agreement” which allows for the contributions to that library to be licensed to you under, say the BSD license; that would then still let you use those contributions in a proprietary application.

@agittens’ idea of using Python isn’t a bad one. While it’s been a while since I touched tkinter in Python, my understanding is it’s pretty capable and would make the application truly cross-platform if done right. There are at least two ways to link a library written in C to a Python application without involving a sub-process.

A lot will depend on how much Microchip want to reveal about their device, and how much they are comfortable to make “open”. Are there actual specifications on how the USB interface works, with disclosure agreements that permit a viable open-source library to be written?

Their offer of translating a library might be worth looking into if you’re after a purely proprietary solution. I’ll admit up front I’m no fan of proprietary code and actively avoid it away from my work. (…and at work, I’ve been even known to turn down work involving it. We use OpenThread because I refused to touch Z-Stack as I didn’t want the “taint” from its NDAs.)

My biggest gripe with such systems is they tie you in to specific ABIs (application binary interfaces), which can really be a pain when you need to move to X version of some core library, but find that it breaks your proprietary piece of code you need. Having the code means you can just re-compile against the libraries you are using to side-step that problem. But I digress…

Out of interest, what was the off-shore team specifically struggling with? Was it the GUI-building aspect, writing code for Linux in general, understanding requirements, or was it more business-related?


(Steve) #11

As it happens, just this minute I see that the programmer has released the remaining milestones on the project so I will be able to re-post it. That’s good news!

OK. Redhatter, you are a bit above me (a little over my head) I should say… My main concerns are to try to be as independent of certain players as possible - I’m sure you understand. I’m probably more concerned to avoid certain players than I am about being an owner as such. I’m not sure it has great commercial value !

I’m losing interest in the way it is achieved for sure. I’m wanting a solution. This project has been a sticking point for a while now and I’ve tried to employ persons several times.

I think my adverts attract guys who are not kernel / hardware experienced. (Let alone Linux experienced !) This seems to be something that is not the straight programming toolkit and is a bit edgey. They start out making a GUI and they come to grief trying to communicate with the chip.

I think Microchip have produced various datasheets that should help in a big way but the programmers seem to not understand those datasheets. The programmers I attract aren’t embedded-systems guys …

I didn’t get the feeling that Microchip was being terribly guarded. Its just that Microchip made their Windows utility and then the whole thing hasn’t needed any further work for a number of years. If I paid them for a conversion of their libraries I suspect it would be everything I would ever need.

I believe there has been an amount of effort to do a project similar to this on Github but I think the project has fallen on hard times. So others have had a go. My thought isn’t original !

I think I need help in scoping the project - using the right terms etc. This last guy went the closest but wanted to use GoLang ?? I don’t actually have anything that works from him.

Can I ask for help from our community in scoping if people are not able to actually do the work ? I would then advertise again based on that discussion. I’m in Toowoomba so I’d need to arrange a time to chat and bring various datasheets etc.

Thanks redhatter for your response - I most appreciate it.

Cheers,
Steve


(Andrewm) #12

quote
A lot will depend on how much Microchip want to reveal about their device, and how much they are comfortable to make “open”
/quote

Microchip reveal everything about it already in the datasheet and “MCP2200 HID Interface Command Description” PDF. It is a pretty standard HID thing. Making a config tool for Linux would not be too hard at all and any competent embeded+linux programmer should be able to do it in a day if they already are set up for that kind of thing.

Why the config tool needs to be in Linux was my query as from what I have been told about it the config only needs to be programmed once. Not over and over again in the final system.

I get the final product is going to have Linux computer attached and there are “fine and noble” reasons to avoid the software of satan for the end user.

Why the one time config that is going to set up the chip needs to be Linux I still don’t understand. In the end when it’s made in some factory in china they are going to have windows machines doing a lot of other things in the factory, what does it matter if they are going to set the config in windows or Linux.

Or if I am miss understanding what is being meant by the word “product” and there is only going to be 3 units ever made and its not going to be some factory in China. In that case I will happily reprogram the config on the 3 units for you on one of my windows machines for a lot less money than I will charge you to make a config tool that runs in linux.


(Pamela Hauff) #13

Hi Steve,
I was looking around seems there is a python interface on github. https://github.com/cdtx/mcp2200/blob/master/cdtx/mcp2200/device.py
I dont think it would be hard to make a gtk2.0+ interface in gcc. I have some familiarity about the GTK 2.0 interface from debugging gpsdrive on ubunutu.
Pyhton uses:
import sys

import usb.core
import usb.util
C++ uses libusb.

and here is another example


using https://github.com/signal11/hidapi

Pamela


(Steve) #14

Thanks to those replying.

I will say there is a bit more to the configurator project that makes it difficult or impossible to achieve on Windows (I believe). That detail I don’t want to discuss out in the open but it isn’t too difficult to achieve in Linux. The recent attempt by a programmer did nearly work in that respect.

I will say also that this configurator project is just the start of a further 3 projects. I have approached USQ some time ago and have had a formal quote from them too. So I know how much is too much ! (With their lawyers and admin taking a huge chunk … the guy doing the programming was left with bugger all in comparison !!)

Andrew has said it is a days work to someone with some experience in this field. I believe this is the attitude from various people who respond to my adverts also. The problem is that most (nearly all) of them don’t have the experience. I will be fair to say that having hardware to test on is another issue. In my most recent attempt, I had setup a server and left it running overnight with hardware attached for the programmer to test. It hardly ever worked out for him. If I can get someone to work on this locally, I would of course give them hardware.

Worst case is that I somehow gain the skills ! Hey ! I’m a tinkerer and a startup like you, OK ?

Cheers,
Steve


(Pamela Hauff) #15

Hi steve,
Willing to give it a go…please email pamela.hauff@gmail.com


(Andrewm) #16

OK - If there was more to the configuring that means it needs to be done over and over again I accept that a linux tool may be desirable.

From what I had heard so far it seemed like the reason for wanting a linux tool was open source zealotry. I was trying to save you from suffering for religious reasons in pointing out that configuring once on windows (or Mac) is not sooo evil as to damn you for eternity. Also if a config tool for an ancient outdated USB chip like the MCP2200 is NOT needed - the overall improvement to the world would be greater if you took the money that would be spent developing that tool and donated it too a small struggling open source project you like.

I have the skills and have done this kind of thing before. That is making a HID interface work with linux using libusb. I don’t however have a dev environment set up for doing it at the moment. So would not be a day project for me as it would take several days to get up to speed and then a day to do the last bit.

My offer still stands to give you advice on the “big picture” part of the project and why there is a USB bridge at all.


(Stuart Longland) #17

As far as test hardware, I was eyeing this off:

https://au.rs-online.com/web/p/interface-development-kits/8252486/

I might order one on the grounds that there’s a jumper to switch between 3V3 and 5V. I have two FTDI cables lying around (genuine ones), one 3V3 and the other 5V, but the annoyance being you must grab the right one. This kinda solves that problem elegantly, as it can be wired to a switch.

I’m not sure if that’s compatible with the test hardware you’re using, but might be in the ballpark at least.


(Steve) #18

Hi Redhatter,

I’m an electronic engineer who has been making / developing all sorts of hardware for 30 years. My boards are well tested by now.

If you want me to make you something just for general use I could adapt a previous design quite easily. I also have a good number of electronic parts if you need a more left-field application.

The design you link to is extremely limited in its abilities.

Rgds,
Steve McLevie


(Steve) #19

Then again,

I have a Microchip document that speaks of a Microchip Demo board for the MCP2200 (DS51901A) that looks suspiciously like that in the RS photo …

If it is the Microchip board or a copy of it then it would do a good amount of demonstrationsing…


(Stuart Longland) #20

Well, the principle thought was that it appears to have all the signals broken out; if it’s the same chip as what you’re using, it should be possible to write something against that which allows programming of the chip, and then apply it to whatever you’re using.

It’d be a good first step. If however, it’s not the same chip, then okay, sure, we’ll need to keep looking. It just struck me as being reasonably minimalist and not expensive.