Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:44 25 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Getting mphidflash to work on 10.04 lts

Author Message
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 06:21am 28 Mar 2012
Copy link to clipboard 
Print this post

G'day Guy's,
Yesterday I finally got around to installing mphidflash and tried to update both the SM1 and the DM mega using it. I downloaded libhid-dev and also libusb and found V1.4 of mphidflash. I get now worries connecting both boards up in 'screen' in the terminal and 'putty' but trying to get the program to see the boards in bootloader mode is getting beyond frustrating.

Just tried the DM now

bryan@bryan-desktop:~$ mphidflash -w Duinomite_MMBasic_V3.1.hex -v 15BA -p 0032 -r
mphidflash Error: Device not found (is device attached and in Bootloader mode?)

The DM is flashing both led's to show it is in programming mode and when running a dmesg both units will come up with each showing the respective vendor names.

generic-usb 0003:15BA:0032.0002: hiddev96,hidraw0: USB HID v1.11 Device [Olimex DuinoMite USB HID Bootloader] on usb-0000:00:1f.4-2/input0
bryan@bryan-desktop:~$

generic-usb 0003:04D8:FA8D.0001: hiddev96,hidraw0: USB HID v1.11 Device [Silicon Chip Silicon Chip Bootloader] on usb-0000:00:1f.4-2/input0
[ 708.753453] usbcore: registered new interface driver usbhid
[ 708.756614] usbhid: v2.6:USB HID core driver



A good mate tried to help last night on IRC and was puzzled as the terminal is seeing both boards but it just plainly refuses to work. He did go look at the ubuntu website and said in fact mphidflash is recommended for ubuntu 10.04 and no problems were posted.

So would any guy's have an insight to where the problem lies as I would love to get it working and not have go back to winblows just to update a project board.

Regards Bryan
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 11:36am 28 Mar 2012
Copy link to clipboard 
Print this post

I've answered this where you posted it on ken's forum.

I reckon you're using the wrong VID / PID i.e. not understanding dmesg

hmm, slightly puzzled now as you posted a different message there and were using different VID etc. What you've posted here looks more like it ought to work. Anything claiming the device / any permissions problems?

Also, is it 32-bit or 64-bit Linux? (Don't know if it matters, though.) I've abandoned Ubuntu so can't help with it specifically.

JohnEdited by JohnS 2012-03-29
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:46am 29 Mar 2012
Copy link to clipboard 
Print this post

Hi Bryan,

See this page about Pinguino install http://wiki.pinguino.cc/index.php/Linux, is about udev configuration.

See also this topic and you can search something similar on internet about pickit2 udev under Ubuntu:
Udev rules


Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 07:14am 30 Mar 2012
Copy link to clipboard 
Print this post

G'day Guy's,
Well I have taken Vasi's advise on the udev rules and also added to the file for the DM and MM this morning before work.

This afternoon I tried both first in 'putty' to ensure both were still working which they were then went thru the pace's again only to find the same problem exists. It does seem so-called support for this DM/MM project couldn't give a damm about my problem and the Pinguino does look like a good open source project. I was looking on their forum and the subject has already been raised about using the DM for the project.

I have talked with a couple of mates in IRC who are linux guru's and both are confused why on a recent install of 10.04LTS it just won't work. What I have shown on both forums are taken straight from the terminal and with me using caps was a trial AFTER the lower case didn't work. One suggestion has been that 'apparmor' is the culprit and it is a real pain to get around.

cheers Bryan
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 02:19pm 30 Mar 2012
Copy link to clipboard 
Print this post

Hi Bryan,

You also must be sure that you use the same udev syntax as your system use. By example, it differs some times from a linux version to another. The udev rules I pointed to, was for Ubuntu 8... you must see inside other udev rules files from your Linux to see the actual syntax (ATTR, ATTRS, etc...).
I'm sorry I can't help you, as I don't have Ubuntu 10.04 LTS. I switched to 10.10 (then to 11, and so on) as 10.04 was buggy for my computer (I had a good impression about 10.10).

If you see the device with lsusb, then there are chances to make it work. I used the USB HID bootloader along with those downloaders with success but I used a PIC18F2550/4550. And now I have the possibility to try a PIC32 Pinguino MX220 (which is working ok with Pinguino IDE under Linux).Edited by vasi 2012-04-01
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
JohnS
Guru

Joined: 18/11/2011
Location: United Kingdom
Posts: 3800
Posted: 08:33pm 30 Mar 2012
Copy link to clipboard 
Print this post

  Bryan1 said   G'day Guy's,
Well I have taken Vasi's advise on the udev rules and also added to the file for the DM and MM this morning before work.

This afternoon I tried both first in 'putty' to ensure both were still working which they were then went thru the pace's again only to find the same problem exists. It does seem so-called support for this DM/MM project couldn't give a damm about my problem and the Pinguino does look like a good open source project. I was looking on their forum and the subject has already been raised about using the DM for the project.

I have talked with a couple of mates in IRC who are linux guru's and both are confused why on a recent install of 10.04LTS it just won't work. What I have shown on both forums are taken straight from the terminal and with me using caps was a trial AFTER the lower case didn't work. One suggestion has been that 'apparmor' is the culprit and it is a real pain to get around.

cheers Bryan

I really would not expect any board maker to offer the kind of very specific support this problem requires. mphidflash works fine in other versions of Linux (e.g. I use it OK) and even that knowledge is probably more than a board maker might have!

Looks like a specific issue with LTS or its udev or whatever.

John
 
ernie
Newbie

Joined: 18/03/2012
Location: Australia
Posts: 14
Posted: 09:34pm 30 Mar 2012
Copy link to clipboard 
Print this post

I only ever user mphidflash to download firmware to my DM mega, but I use it on BSD. Sometimes it doesn't detect the board first up, but if I access the board with the terminal program first, then quit and try again it's fine.

 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:30pm 01 Apr 2012
Copy link to clipboard 
Print this post

Hi Bryan,

You tried in superuser mode?

maybe this text file can help you:
2012-04-02_004812_rules.zip Edited by vasi 2012-04-03
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Bryan1

Guru

Joined: 22/02/2006
Location: Australia
Posts: 1344
Posted: 07:30am 02 Apr 2012
Copy link to clipboard 
Print this post

  vasi said   Hi Bryan,

You tried in superuser mode?

maybe this text file can help you:
2012-04-02_004812_rules.zip



Hi Vasi,
I saw you post this morning and had a read of that text file and thanks as it does provide a heap of detail. Anyway this afternoon I just tried your suggestion of using sudo and my SM1 programmed nicely once I cd'd over to the right folder.

I found a 500 page free online book on using the shell so I'm going full bore on learning and in a few days I'll get on and write the needed stuff so I can program in user mode.

Thanks for all your help mate and when I can get some more etchant I'll have to get a 18f4550 board made up for a pinguino for a bit of fun.

Cheers Bryan
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 03:48pm 02 Apr 2012
Copy link to clipboard 
Print this post

Hi Bryan.

Your problem intrigued me, so I tested a Pinguino MX220 with HID bootloader under SUSE 12.1 and I wasn't able to program it as a regular user, no matter what I tried in settings. So, I wiped it out (forgot to save some photos - my wife don't know yet so don't tell her ) and installed Ubuntu 10.10 (10.04 installer have a black screen on my computer). I did all the settings and I was able to use in user mode a Sanguino like board (FTDI chip) with Arduino IDE, a Chipkit Max32 board (FTDI chip) with MPIDE, a FreeJALduino board with MchpUSB bootloader, I programmed the FreeJALduino couple of times with Pickit2 programmer (which have a kind of bulk USB bootloader), I used before some USB CDC applications and a Bulk USB and worked well.

I don't remember if an USB HID bootloader worked with 18F4550 in user mode but is the next thing I must check and I installed MPLAB X with C18 for Linux and Microchip Applications Library package for this. C18 for Linux is still available but I guess it will be replaced soon by XC8. Just for others knowledge, some C18 projects don't compile yet in XC8.

I wasn't able to use Pinguino MX220 in user mode - it worked only on sudo. Well, not so big problem if I'm not on internet with such a system. Even in Windows, many IDE's and compilers for microcontrollers requests admin rights...(Oshonsoft is one of them?) .

Edited by vasi 2012-04-04
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
vasi

Guru

Joined: 23/03/2007
Location: Romania
Posts: 1697
Posted: 01:11am 03 Apr 2012
Copy link to clipboard 
Print this post

Hi Bryan,

See this post on Pinguino forums.

Vasi
Hobbit name: Togo Toadfoot of Frogmorton
Elvish name: Mablung Miriel
Beyound Arduino Lang
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024