Dangerous Prototypes

Other projects => Past projects => Web platform => Topic started by: shuckc on January 11, 2011, 09:31:26 pm

Title: Getting started, web platform from Linux desktop
Post by: shuckc on January 11, 2011, 09:31:26 pm
Web platform arrived today in the post, very impressed. It was very simple with a linux desktop to get the firmware flashed the to the DP microchip TCP/IP demo using ds30 Loader, then to upload the Microchip demo apps. Here are some instructions using Fedora:

Take a local copy of the Web Platform Subversion repository:
[tt:][chris@chris-desktop ~]$ cd workspace/
[chris@chris-desktop workspace]$ svn co http://dangerous-prototypes-open-hardwa ... b-platform (http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/web-platform) web-platform
A    web-platform/loader-apps
A    web-platform/loader-apps/settings.xml
A    web-platform/loader-apps/ds30 Loader
...
A    web-platform/hardware/DP-webplatformv1c.sch
A    web-platform/hardware/DP-webplatformv1c-image.jpg
A    web-platform/hardware/DP-webplatformv1.1-partlist.html
Checked out revision 615.
[chris@chris-desktop workspace]$[/tt:]

Plug in the web platform using a USB cable, and check the ouput of [tt:]$ dmesg[/tt:] to be sure what device the USB serial port is given. Note ttyUSB0 will be found under [tt:]/dev/ttyUSB0[/tt:] when later typing this into ds30 loader.
[tt:][chris@chris-desktop workspace]$ dmesg | tail
[ 8030.737230] usb 5-2: Detected FT232RL
[ 8030.737235] usb 5-2: Number of endpoints 2
[ 8030.737239] usb 5-2: Endpoint 1 MaxPacketSize 64
[ 8030.737243] usb 5-2: Endpoint 2 MaxPacketSize 64
[ 8030.737247] usb 5-2: Setting MaxPacketSize 64
[ 8030.739105] usb 5-2: FTDI USB Serial Device converter now attached to ttyUSB0
[ 8030.739145] usbcore: registered new interface driver ftdi_sio
[ 8030.739150] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver
[ 8204.395937] lo: Disabled Privacy Extensions
[ 8204.396015] SELinux: initialized (dev proc, type proc), uses genfs_contexts
[chris@chris-desktop workspace]$[/tt:]

Use mono to run the ds30 Loader.
[tt:][chris@chris-desktop workspace]$ mono web-platform/loader-apps/ds30 loader GUI.exe[/tt:]

If the load succeeds it should look like this:
[attachment=0]

I then checked my home ADSL router to determine (under "attached devices") what the IP address of the web platform was. In this example it is 192.168.1.3

Whilst you can try the "index page" of web interface - it does not load at this point. Don't worry, the device is waiting for some web content to be uploaded. Try opening your browser to http://192.168.1.3/mpfsupload (http://192.168.1.3/mpfsupload) - if you have the IP address correct you should see an upload screen:
[attachment=1]

Finally, to extract the microchip demo application, follow the links
from http://www.microchip.com/stellent/idcpl ... e=en537041 (http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2680&dDocName=en537041)
to  "Microchip Application Libraries Download Page", then after the redirect, click "Microchip Application Libraries v2010-10-19"

You might find this direct link works, maybe not http://ww1.microchip.com/downloads/en/D ... taller.zip (http://ww1.microchip.com/downloads/en/DeviceDoc/MCHP_App_Lib_v2010_10_19_Installer.zip)

First unzip the download:
[tt:][chris@chris-desktop workspace]$ cd ~/Download/
[chris@chris-desktop Download]$ unzip MCHP_App_Lib_v2010_10_19_Installer.zip
Archive:  MCHP_App_Lib_v2010_10_19_Installer.zip
  inflating: Microchip Application Libraries v2010-10-19 Installer.exe 
[chris@chris-desktop Download]$[/tt:]

The use wine to launch the installer
[tt:][chris@chris-desktop Download]$ wine Microchip Application Libraries v2010-10-19 Installer.exe[/tt:]

[attachment=2]

When you've completed the installer (say no to the JVM install) I then moved the unpacked content out of the .wine directory where it's tricky to find, into my workspace directory:
[tt:][chris@chris-desktop drive_c]$ mv Microchip Solutions v2010-10-19/ ~/workspace/microchip[/tt:]

You can now use the upload web tool to upload the Microchip application demo. The path for me was ~/workspace/microchip/TCPIP Demo App/MPFSImg2.bin

When you follow the link to "Main page" it should hopefully now show:

[attachment=3]
Title: Re: Getting started, web platform from Linux desktop
Post by: ian on January 20, 2011, 03:29:16 pm
This is such a great guide. May I please copy it to the web platform wiki (it would be licensed CC-BY-SA)?
Title: Re: Getting started, web platform from Linux desktop
Post by: shuckc on January 21, 2011, 01:02:34 am
Thanks ian :-)  I will setup a wiki login this weekend and copy it over. Chris -
EDIT: it's now merged into http://dangerousprototypes.com/docs/Web ... uick_start (http://dangerousprototypes.com/docs/Web_platform_quick_start)  - hope that's OK!
Title: Re: Getting started, web platform from Linux desktop
Post by: ian on January 21, 2011, 07:32:46 am
When the pictures have been viewed 100+ times, it's good to include it in the manual :) Great job, thanks for being willing to include it in the manual.
Title: Re: Getting started, web platform from Linux desktop
Post by: OppaErich on May 29, 2011, 04:55:44 pm
URL does not exist, was it (re)moved ?

Jesus Christ, this antispam crap is driving me mad. Does not allow me to quote my commandline and after removing it, this filter on crack is telling me my post is too short.
Title: Re: Getting started, web platform from Linux desktop
Post by: ian on May 29, 2011, 05:02:59 pm
Hi OppaErich,

I'm really sorry about the spam filter. I eliminated the minimum length setting. Which URL are you having problems with?
Title: Re: Getting started, web platform from Linux desktop
Post by: OppaErich on May 29, 2011, 07:30:39 pm
Ooopsie, sorry. 'svn co' fails with this error.

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00982083976session_write_close ( )...(null):0
20.01012215568ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01012216344Database_MySQL->query( ).../DatabaseHandler.php:119
40.05172355080Database_MySQL->error( ).../Db-mysql.class.php:273