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 : DuinoMite-Mega corrupted HID packet
Author | Message | ||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
(new member alert: hi guys!) I am using the DM-Mega (Rev C, it has MMBasic 2.7) with Linux, which (as expected) logs a message when the board is reset to the bootloader. dmesg shows the message OK except that there are bad bytes in it. Using C-style \xhh escapes to show the bad chars: new full speed USB device using uhci_hcd and address 52 New USB device found, idVendor=15ba, idProduct=0033 New USB device strings: Mfr=1, Product=2, SerialNumber=0 Product: DuinoMite Manufacturer: Olimex \xE4\x90\xA0uinoMite (I've reduced the output a bit as it's not exactly brief) Maybe this is akin to the truncated Basic sign-on message, but this time it's the bootloader that's affected. Anyone else able to confirm this? (I suspect you won't see any message on Windows, corrupt or otherwise.) Also - how do I report this to Olimex? I guess Ken? Do I post here and hope or what? Would I need a PICkit3 or similar to be able to reflash the bootloader? Thanks, John |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
welcome to the back shed... i see i am not the only one with a duino mega good finally at last... i got mine yesterday and as far as linuix goes "i`m soory but i have no idea here out of my terra tory" but if you have corrupeted the chip i really dont se how but yes prolly a pickit ....that is all i know on this subject i`m sorry that i cannot be of further help....oh you need the bootloader that has been specially designed for the "duino" go to "dontronics" and find the ftp page and you will find all the nesscary files there um there is no new version of the firm just yet but there will be one out shortly ..couple of days ...the firm flash is different to the origanal maxi as the "duino" is the same chip ...but it functions differently and the headders are different if you want to run an "rtc" i have one on mine it does use pins "five and six" of the "U-ext" and it also requires that you have a five volt and ground ..negative... i will be up for god knows how long just post any thing in your subject peop`s will look and get back to you ...and yes i would ask ken about your linux problem ...///.../// technicians do it with least resistance |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Thanks for the welcome. I don't believe I have corrupted the chip. It is how the bootloader is, shipped from the factory. I'm saying I believe it is a firmware bug and asking how do I report it to Olimex to get it confirmed / fixed? |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
ok then yes try ken as he`s the "duino" guru of the firm code...."kdsdesigns"... technicians do it with least resistance |
||||
Vikingboy Regular Member Joined: 23/09/2011 Location: AustraliaPosts: 82 |
Hi John, I am just guessing here, but, in other threads on this forum you will see that using the Duino boards on USB via terminal users have reported corrupted output, ie. some scrambled letters etc in the boot message etc. Perhaps what you are seeing is a related problem ? I believe Olimex and Ken etc are aware of it and working on a fix. Idont think it seriously affects useability and apparently not at all if you connect VGA or composite video out. as I said just a guess. rgds and welcome. Andrew PS Olimex et al. read this forum regularly. |
||||
sparkey Senior Member Joined: 15/06/2011 Location: AustraliaPosts: 819 |
thanks andrew i forgot about that ...sparkey.... technicians do it with least resistance |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
Hi John, I'll forward this thread onto Tsvetan of Olimex and Ken. They read basically everything, but of course could easily miss this. I am having trouble understanding in full, but if it is about the log on initial power up message being corrupt and nothing else, then I had hoped to have new firmware to fix this small problem by now. Cheers Don... https://www.dontronics.com |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Thanks, Don. I reckon whoever changed the bootloader will know what's wrong fairly quickly. I suppose the modified HID bootloader sources must be somewhere..... I didn't find them, though :( Got them? John |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
The bootloader is Ken's department. Here is the link to my files for the DuinoMite. http://www.themaximitecomputer.com/max/Programs/index.php?di r=Hardware%2FDontronics%2FOlimex%2FDownload+Files%2F I don't know if it is included in the zips. You may already have the same files. BTW The reason why I have this code on my site, is that when Olimex changes a file name, then every link on every dealers page (including mine) is then wrong. I link to a directory, not a specific file. I would rather just upload a new file, than continually change links on multiple products. If a common file storage is found, then I will redirect one link to that storage area. In the case of the DuinoMite, I usually know about the updates anyway, and can generally post them immediately. Cheers Don... https://www.dontronics.com |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Thanks. I already found those files and they don't seem to have the bootloader source unless I missed it. Not a big issue at all, certainly not urgent. I can see various people have their hands pretty full! You're running a sort of mirror, which is by no means a bad thing. The opposite, really, except I suppose the usual risk of being out of step. Doesn't appear to be broken so doesn't need fixing :) John |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
Hi John, I believe the bootloader is `owned' by each supplier or entity. As they insert their own PID/VID (product and Vendor ID)information in them... I dont believe that Geoff released the source for his and I am certain Ken rewrote the bootloader from scratch, the Boot button acts on a different PIC pins for a start.. The corruption at boot, I believe, is from Ken experimenting with displaying a graphic Logo on the VGA screen (removed from the first release) on power up. Ken extended the amount of text that is displayed on reset/boot and believes that the `screen' corruption is a simple USB buffer overflow.. That will definately be fixed , maybe it should have been fixed in the first release but we were trying to get them out there quickly. As for the corruption you mentioned... I dont understand the details there, I will leave that to Ken to investigate. Just a thought.... You have putty (or your terminal prog) set to 38400 8bit No parity? Regards, Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Good points. It may indeed not be open source (and anyway it's likely a few tweaks to the Microchip USB HID bootloader). The bug concerned will not be seen in putty. I believe it's part of the USB endpoint negotiating with the host (in effect, during a connect rather than subsequent to an open - which is when putty could see it). Baud rate is irrelevant at this stage of a USB device announcing its presence because the device isn't a pseudo-COM port and has no settable baud rate (*). Linux tends to log such device-negotiation things (via syslog, so it ends up where dmesg can get at it). No worries, I expect Ken or someone will fix it. I have a PICkit3 clone but even so will struggle to replace the bootloader due to the non-standard ICSP connector on the board :( unless the bootloader can replace itself. (Yes, I know I can buy a special ICSP plug etc.) I don't think it NEEDS replacing (am not sure), but it sure is ugly to have weird bytes where clearly others should be. (*) edit: actually, the HID bootloader isn't a pseudo COM-port so never does have a settable baud rate, just saying this for completeness. You won't be able to talk to it using putty. Have a look at the code for such as mphidflash if you're interested. John |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Oh, bad words!! My original post (and the rest consistently so) is wrong :( It's not during the bootloader negotiation that the bad bytes are sent, it's during the ordinary (non-bootloader) negotiation. Aargh. Sorry. It's still a bug just it's when the board is saying (to the USB host) that it's a DuinoMite rather than when it's saying it's a HID bootloader. Ken's gonna kill me. Don - please let Ken know the above. John |
||||
donmck Guru Joined: 09/06/2011 Location: AustraliaPosts: 1313 |
I doubt that John, and it's only the doers that make mistakes. If you sit there fat dumb and happy, you will never make a mistake. I put both Tsvetan and Ken onto this thread, so I know it will be looked at. Cheers Don... https://www.dontronics.com |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Thanks, Don. I still feel a fool, but at least there IS a bug. |
||||
bigmik Guru Joined: 20/06/2011 Location: AustraliaPosts: 2914 |
I thought I made a mistake once but when I checked again I was mistaken Mick Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<< |
||||
rhamer Senior Member Joined: 06/06/2011 Location: AustraliaPosts: 174 |
Hey...... I resemble that remark....... Cheers Rohan Rohan Hamer HAMFIELD Software & Hardware Solutions Makers of the Maximite Expander. http://www.hamfield.com.au |
||||
ksdesigns Senior Member Joined: 25/06/2011 Location: United StatesPosts: 143 |
see if this one fixes you usb problem .. so other fixes also Editor still not done sorry works better on serial console have some scroll issues on vga you can test it with fse "filename.bas" changed it from editor to fse now.. ken MMBasic-Olimex-2.7-ksd-11-20 |
||||
JohnS Guru Joined: 18/11/2011 Location: United KingdomPosts: 3800 |
Ken, Thanks. It fixes the corrupted bytes in the USB report found in dmesg. But when I log on to the board (using screen /dev/ttyACM0) I get: Exception code 0 at 0x0 An internal error was trapped (sorry). If I press a key, I then get the Maximite BASIC Version 2.7 sign-on, then: >eption code 0 at 0x0 An internal error was trapped (sorry). > So it looks like the USB part is OK but something else is broken. edit: I see sparkey looks to have updated to the new firmware OK so I wonder what's going wrong for me - maybe mphidflash needs a tweak for the board or something? I see the Windows firmware flasher uses Qt etc - is the flasher available for Linux (or can I build it)? John ------- BTW, any Linux users, this is what I did to update the "firmware" (MMBasic): 1. made sure I had something appropriate in /etc/udev/rules.d in my case in a file 41-microchip.rules where I added: # # DuinoMite (PIC32MX) ATTR{idVendor}=="15ba", ATTR{idProduct}=="0032", MODE="0660",GROUP="dialout" (I'm a member of group dialout but use any group you like and are a member of; note that if you add a new group I believe you need to log out & back in) 2. Then I used mphidflash, which is on the net, like this: mphidflash -v 15ba -p 0032 -w Olimex.X.production.hex -n -r which sends Ken's file to the DuinoMite (mine's a Mega) and then resets it I'm puzzled why I need "-n" (don't verify) but it fails the verify otherwise The -v and -p are the HID device vendor & product ID which I got from dmesg | tail after plugging the board in and resetting it to the bootloader. |
||||
Print this page |