Author Topic: == Programming SBC65EC and SBC68EC boards ==  (Read 18616 times)

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
== Programming SBC65EC and SBC68EC boards ==
« on: March 30, 2008, 08:41:13 PM »
The firmware and webpages on the SBC65EC and SBC68EC boards can be updated with the Modtronix Network Bootloader, no PIC programmer is required. For documentation on using the Modtronix Network Bootloader, see documentation located here:
http://www.modtronix.com/soft/netloader/

For additional information on updating firmware and webpages for SBC65EC see:
www.modtronix.com/products/sbc65ec/doc/update_firmware
www.modtronix.com/products/sbc65ec/doc/update_webpages

For additional information on updating firmware and webpages for SBC68EC see:
www.modtronix.com/products/sbc68ec/doc/update_firmware
www.modtronix.com/products/sbc68ec/doc/update_webpages

If the bootloader doesn't work on your network, it is possible that your firewall is blocking it. The following ports have to be enabled, seeing that the bootloader uses them:
  • UDP port 54211, this is used by the bootloader.
  • Netbios TCP and UDP ports (135-139)
  • FTP port 21, is also used by the bootloader to send webpages

For information on what memory is used by the bootloader, see Memory Map section in this post.

For additional information on the bootloader, please search this forum. For info on the protocol used by the bootloader, see this post.

The Trouble Shooting post also has informaion on updating the firmware and webpages.

« Last Edit: September 18, 2008, 02:12:10 PM by modtro2 »

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #1 on: April 06, 2010, 09:37:18 AM »
I was not able to download web pages in SBC65EC via web loader. Only possible with serial cable and HyperTerm (also tried TeraTerm with serial but seems to have some problem with Xmodem version since pages load OK but not displayed correctly).

Conserning the web bootloader i tryed everything but still stucks after succesfull connection (for ever)

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #2 on: April 06, 2010, 11:58:04 AM »
Need more information:

1) Are you able to get to web pages?
2) Do you have more than one module turned on and connected to the network?

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #3 on: April 06, 2010, 12:44:34 PM »
Hello

Only one board to network (directly via cable, no router). Board works OK when
a) ping
b) load firmware, default webserver firmware or custom -mine after compilation and works OK
c) Default web pages read OK from PC browser, can see all pages, change IO, read inputs, set outputs  even perform a UDP to serial redirection....
d) Even custom s/w works OK. this one involes serial com with PC (2 way), UDP packet from a VB program - board gets UDP from PC, replies in both UDP AND serial to PC.........

with serial bootloader i can upload web pages, but not with web loader...

thanks!

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #4 on: April 06, 2010, 02:43:50 PM »
Oh.  I understand now!  Yes, the web page loader is less reliable.  I learned a few tricks.
1) After compiling your web page wait about 5 seconds before uploading.
2) Make sure the board isn't performing any network traffic during web page upload.  For me I accomplish this by moving to static web pages such as the 'contact' page.  The 'detailed analog values' page is an example of a bad page because it refreshes every 5 seconds or so.  You may need to shut down other custom network services that you may have written for your particular sbc board.
3) Despite all this about 1 in 10 attempts fails and the web pages are corrupt.  In this case I just upload one more time.

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #5 on: April 07, 2010, 12:13:50 AM »
Hello

I'll try what you say. However, some comments :

1) i think i've try with already compiled pages (as modtronix default)
2) Usually board is in main page of default web, or not serving http at all (when running my custom sw with udp service only


Thank you !

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #6 on: April 07, 2010, 02:34:38 AM »
Hi again

Tried again the web upload, didn't work again........
configuration
Found: SBC65EC, Hardware V3.01 (PIC18F6627)
Bootloader V1.0

instead of default web pages i had loaded the compressed page (no dynamic hhtp etc)
so no auto - traffic

Here's what i got as response from uploader

12:23:17.968 - Establishing FTP connection to Target...
12:23:22.515 - Connected to FTP Server
12:23:22.515 - Uploading file to FTP Server

the last one took forever.......

on the other hand firmware updates NEVER fail !!!

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #7 on: April 07, 2010, 05:03:06 AM »
.......Forgot to mention this : FTP with windows Explorer doen't work also.....
Only displays login box then no response

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #8 on: April 07, 2010, 07:26:12 AM »
I'm sure it's your UDP server code.  Is there a way to disable this code from the web page?  I have added checkboxes to one of the web pages that disables certain features for when I am doing certain debugging so that the features don't interfere.  I think you might want to do the same thing.

From a DOS window if I do ftp to the board I get a username request (this is an actual cut and paste from dos window):
Quote
c:\>ftp mxboard
Connected to mxboard.
220 Ready
User (mxboard:(none)):

If that doesn't work for you obviously something is messed up with the ftp server software on the board.

nikosxan

  • Sr. Member
  • ****
  • Posts: 28
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #9 on: April 07, 2010, 08:44:22 AM »
Hello

Don't quite understand the 'UDP code"

The problem exists either with default MODTRONIX s/w running (i don't think something in there blocks board's responce since it should be checked)...

In the case of my code this one is based on an UDP example. Basically listens to UDP packets, replies to some of them via UDP or Serial - very simple code indeed.

Both of them fail to upload web pages.

Have tried the DOS ftp also, same response as windows explorer FTP (can connect, asks for user / password, after this no response....) Saw in a thread that maybe something wrong with the firewall, BUT
in this setup of my laptop there is NO firewall -have a separate partition to have this s/w installed...)

OK. Thanks for your time. It's not a primary requirement for me since a) i am using serial to upload the pages and b) This was a need because I wanted to use fseePutbyte to store some config data in web pages EEPROM. Having problem ALSO with put byte i changed to use simple write / read EEPROM functions that WORK.......

Rick314

  • Hero Member
  • *****
  • Posts: 55
  • SBC65EC/66EC, PT24E, LCD2S-204FHB, PICkit 3, MPLAB
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #10 on: February 28, 2011, 10:58:31 PM »
Help please -- I can't program my new SBC65EC using Modtronix Network Bootloader.

Configuration: SBC65EC (HW V3.01, BLN V1.00, SW V3.10), to a Linksys WRT54G Wireless-G Broadband Router LAN port.  A Windows XP laptop is connected to another router LAN port.  The PC is running Modtronix Network Bootloader "v1.06" (window title) although I downloaded v1.07 (installation bug I think).  SBC65EC has all default settings (id admin, password pw).  I want to use the Linksys router, as remote firmware updates are my goal.

I can browse to http://mxboard and navigate through all the web pages.  Other information:

C> ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection 2:
        Connection-specific DNS Suffix  . : hsd1.wa.comcast.net.
        IP Address. . . . . . . . . . . . : 192.168.1.102
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.1.1
C> ping mxboard
Pinging mxboard [192.168.1.106] with 32 bytes of data:
Reply from 192.168.1.106: bytes=32 time=1ms TTL=100
Reply from 192.168.1.106: bytes=32 time=1ms TTL=100
Reply from 192.168.1.106: bytes=32 time=1ms TTL=100
Reply from 192.168.1.106: bytes=32 time=1ms TTL=100
Ping statistics for 192.168.1.106:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 1ms, Maximum = 1ms, Average = 1ms

Network Bootloader program setup:

Hex File: ...\websrvr65_v310_hw211.hex
Image File: ...\fw_v3.10\websrvr65_v310.img
Target IP Address or NetBIOS name: mxboard
Target IP Address for Bootloader: 192.168.1.102 (see next paragraph)

*** What is the previous setting?  It isn't mentioned in any "Help" I can find.  It is unclear whether it is "Target" (192.168.1.106 = mxboard) or my Windows PC running Network "Bootloader" (192.168.1.102) or maybe 10.1.0.1???  I tried all 3, and none work.

"Connect" results in "Trying to connect with Target....." until canceled.

I've also made sure UDP port 54211 traffic is allowed through Windows Firewall.  Dead end.

Suggestions?
« Last Edit: February 28, 2011, 11:00:15 PM by Rick314 »

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #11 on: March 01, 2011, 07:32:11 AM »
Use 192.168.1.106 for both addresses (target ip addresses) in this case.  Don't use mxboard for either.  But double check that this is the correct address each time you reboot the mxboard although I don't expect it to change very often.

Also try disabling the firewall completely.

Also try powering the mxboard off before hitting the connect button, then turning it back on as soon as possible after you hit the connect button (or after you enter the password).  There is a 1 or 2 second window after you reboot the modtronix where it is more easily programmed.  In this case you certainly want to uncheck 'reset before connecting'.

Make sure you try to connect before you try to download.  Get connect working first.

Try not resetting (unchecking 'reset before connecting').

It usually works for me just fine with all default settings.

Is it possible there is some jumper that disables updating the board?  I don't think so but I forget.  Also you might want to disable dhcp through the web interface and give the board a permanent fixed address.  Otherwise each time the bootloader resets the board it might get a different ip address.

Rick314

  • Hero Member
  • *****
  • Posts: 55
  • SBC65EC/66EC, PT24E, LCD2S-204FHB, PICkit 3, MPLAB
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #12 on: March 01, 2011, 12:35:01 PM »
Thank you for your help gr, but it is still not working.  Here is what I did:

Board Normal/Safe jumper in Normal position (as shipped); "Target IP Address or NetBIOS name" and "Target IP Address for Bootloader" both to 192.168.1.103 (current mxboard IP discovered via "ping mxboard"); "Reset Target Before Connecting" unchecked; Windows Firewall off; board off; "Connect"; board on.

Results: Green LED is on; yellow LED flashes continuously (network activity); red Status LED blinking every second (as per default board configuration); Modtronix Network Bootloader shows "........" as it tries to connect.  Other ideas?

If I can't get it working soon I will buy a crossover LAN cable to try it direct from PC to SBC and get my Linksys router out of the equation.  But I have to get the router working in the system eventually.

gr

  • Hero Member
  • *****
  • Posts: 171
    • View Profile
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #13 on: March 01, 2011, 01:30:53 PM »
Before you said the address was 106 and now you say it's at 103.  I think the linksys is giving it a different address each time!  This is the root of the problem.  Go into the mxboard web menus and give it a *fixed* ip address.  I know linksys and it is giving out addresses > 100 through dhcp so you can use any address from 2-99 for fixed addresses.  Make it .50 or something (192.168.1.50).  Make it fixed and disable dhcp.  Reboot the board and make sure you can still get to it through ping and web browser and make sure it is now at 50 (not 103 or 106 or whatever).

What was going wrong (I think) is that it would be at say 106  and the bootloader would reboot the board (it has to if you don't reboot it) and it would then try to communicate through udp but now the board is at a new address so it can't connect.

This should fix all your problems but here are other thoughts:

There is a brief window between when the board is powered on (or rebooted) and when the board red led starts blinking that you can program the board (connect button in bootloader).  The way bootloader works normally is it reboots the board and then quickly tries to connect with udp before that red led starts blinking meaning it's too late and the eprom code is running.  Alternatively, to do a manual boot, uncheck the reboot checkbox in the bootloader (this is if the above fix isn't enough).  Then hit connect in bootloader, then while the dots are going by you reboot the mxboard.  Make sure the mxboard ip address is *fixed* and you aren't using dhcp.

If you can ping it then your linksys is probably not blocking you.  I've had issues with linksys routers but they always blocked ping also.

Using this board is really not that hard once you get your stuff configured.

leifo

  • Hero Member
  • *****
  • Posts: 51
    • View Profile
    • Olsens PrivatPC
Re: == Programming SBC65EC and SBC68EC boards ==
« Reply #14 on: March 01, 2011, 01:53:28 PM »
"Reset Target Before Connecting" unchecked;
This box should be checked when upgrading the firmware.
/Leif