Author Topic: Unable to load firmware in safe mode  (Read 16180 times)

jure

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Unable to load firmware in safe mode
« on: September 08, 2008, 08:02:26 AM »
I have a problem loading firmware on SBC68EC.

I was updating firmware without a problem till today (version v305). Today I tried to upload version v306 of the web server. After flash was updated the board did not boot any more. I think I tried to load wrong version of firmware to the board ( nobl version).  :-(

I switched to safe mode and could not update the board either. The board is in safe mode (4 blinks) but can not be pinged nor updated. Something is working on the board because when I type arp -a on the host I get the boards MAC address.


I did some further investigation with Ethereal and this is what I found.

The board answers to the ARP request and sends the proper MAC to the host.

Then host starts to send UDP packets on port 54211 to the board, but the board does not answer.


modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #1 on: September 11, 2008, 09:49:19 PM »
When in safemode, the board can only be accessed via the 3 pre defined IP addresses as mentioned in the documentation here:
http://www.modtronix.com/products/sbc65ec/doc/update_firmware

They are 10.1.0.1, 192.168.1.1 and 192.168.0.1. In safemode only default values are used, in case the configuration data set by the user got corrupted. So, you have to ensure that your network can access one of these three IP addresses. The SBC65EC will scan the network for a message arriving on any one of these IP addresses. After starting your board in safemode, you must connect to it with the Modtronix Network Bootloader. From there you simply select the hex file, and upload it to your board. The hex files (firmware) are available here.

jure

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #2 on: September 12, 2008, 07:14:09 AM »
I do not want to be blunt but please do read my email again. Do not copy/paste answers from HTML help files. I tried everything what is written there.

1. I use the correct IP. I can see with Ethereal that the board responds to ARP request.

2. When the PC sends packet to port 54211 (bootloader) the board does not respond.

3. So the bottom line is that safe mode is not working at all.





buffler

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #3 on: September 17, 2008, 12:59:58 PM »
I am having exactly the same problem. followed protocol EXACTLY as the instructions say for safe mode. I cannot ping 10.1.0.1, but do get reply ping 10.1.0.100 (my host setting). I'm using a crossover cable, so no network hardware. If the SBC is off, I cannot ping the host, so at least the SBC hardware is working. I tried the reset checkbox both checked and unchecked.
HELP!

buffler

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #4 on: September 17, 2008, 01:03:36 PM »
Sorry, forgot to mention that the bootloader simply does not connect.
Don

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #5 on: September 18, 2008, 01:09:25 AM »
Hello

Do you have the latest version of the Modtronix Network Bootloader, V1.06. I have often had problems that a firewall on the system or your network do not allow UDP port 54211. You can see it being sent on your local computer, but it never arrives at the destination computer. I can assure you safemode works very well, and there has to be some network problem. What is your setup, is the SBC65EC board connected directly to your computer? Could you possibly try connecting it to a different computer, a laptop, or just changing the configuration a bit. Between your computer and the SBC65EC there must be something that is blocking the UDP packets. When I connect to the board in safemode, I see the following in Wireshark:
Code: [Select]
1 0.000000    RPTInter_0b:a4:95     Broadcast             ARP      Who has 10.1.0.1?  Tell 10.1.0.100
2 0.000970    Microchi_00:00:00     RPTInter_0b:a4:95     ARP      10.1.0.1 is at 00:04:a3:00:00:00
3 0.001008    10.1.0.100            10.1.0.1              UDP      Source port: 3467  Destination port: 54123
4 0.034587    10.1.0.100            10.1.0.1              UDP      Source port: 3468  Destination port: 54211
5 0.038618    10.1.0.1              10.1.0.100            UDP      Source port: 54211  Destination port: 3468
My computer is 10.1.0.100. Could you please post what you see.

Just to confirm, when you place your board in safemode, the LED should flash about 4 times a second. Is this the case with your board?

If you have a switch or router between your computer and the SBC65EC, could you also please try removing it to see if that makes a difference.

jure

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #6 on: September 18, 2008, 08:23:47 AM »
Hi,

I am attaching an ethereal file. As you can see the ARP request is answered but later on there is no response from the board. The same UDP packet is sent indefinitely.

I am using a crossover cable and there is not switch used. I checked the firewall setting and I open the port 54211 explicitly. The data are getting to the board (the link led on the board connector is flashing when the PC is sending UDP packets).

So I guess nothing is blocking the packets on the PC. It must be something on the board itself. I will try to use another PC anyway to see how it behaves, but I would be very surprised if it would be different.

And yes, the LED is flashing 4 times a sec.


jure

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #7 on: September 18, 2008, 08:47:33 AM »
I did some further testing of safe mode.

I have 2 boards:
A - HW revision 3.2 - working OK
B - HW revision 2.21 - dead for now

Since I have no success in safe mode with board B I tried board A.

I set it in safe mode and look same results as with board B. Network bootloader DOES NOT connect. Than I said well it really could be something wrong with my PC and my setting. But to be really sure lets try bootloader on this board (A) in normal mode. I set it to normal and miracle, the bootloader did connect to board A at once.

So please tell me where is the catch? Bootloader connects in normal mode, but never in safe mode.

buffler

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #8 on: September 18, 2008, 11:54:23 AM »
but board A is WORKING! my board IS NOT, but it was. I have tried every address and mode (safe, operating) possible with a KNOWN GOOD crossover cable, including the last known good DHCP address. NO firewall, WIN 2k.  NO result at all. Will not connect. HW is 3.01  SW v3.6  Follow protocol as written in every case.
Don

catsionson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #9 on: September 18, 2008, 12:39:02 PM »
Hello all,

I Have exactly the same problem with jure.
Safe mode is not working on two different 65 boards.
The one is dead the other is working. On both boards there is led activity. Slow rate at normal mode and fast rate at safe mode.

The situation with the "dead" one is that I cannot find it at any address. Either on normal or safe mode. Either with the bootloader or with the browser.

By experimenting  with the good board using the same computer, I have these results:

1. Normal mode: a. Normal communication through browser at 192.168.0.150

                        b. Normal bootloader sequence at IP 192.168.0.150

2. Safe mode: NO COMMUNICATION AT ALL on any of the three predifined addresses (10.1.0.1,  etc.....)

When in safe mode none of the two boards responds to ping.

The configuration is a laptop running XP sp2 with the firewall and antivirus disabled

and a cross ethernet cable direct to the board.

No switch, no any other network devices present.

Any advice would be welcomed!

Thanks
 

modtro2

  • Administrator
  • Hero Member
  • *****
  • Posts: 564
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #10 on: September 18, 2008, 08:58:46 PM »
The obvious answer I guess could be that the board is damaged. Unfortunately this happens quite easily if your modified firmware drives the PIC pins that are connected to ourput pins of the Network Chip. If your code does this, you will have two outputs driving against each other, and this could blow either the PIC or Network chip's port pin. Often one can see if this has happened by the chip getting hot, or the board drawing more than about 80mA.

1) Did you program the board with modified firmware when it stopped working

2) Are any of the chips getting hot (very hot), and if possible to measure current, is the board drawing more than 80mA?

Because the board is not housed in an enclousre, it can also easily get damaged by static charge, or by placing on conductive surface.

buffler

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #11 on: September 18, 2008, 11:10:46 PM »
I made no code changes. The board is mounted to a heavy aluminum block sitting on the bench. No static. Nothing is hooked up except the power supply and net cable. Unit was working when I attempted to upgrade to 3.10, then it was not. There are three of us with the same problem...within just a couple of days.
Don

jure

  • Full Member
  • ***
  • Posts: 12
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #12 on: September 18, 2008, 11:12:47 PM »
Since we have now more than myself with the same problems in the thread it would be good if modtro2 would specify whom it answers, because everything is getting little fuzzy.

It is funny though to listen to the answer: your board is damaged. The board is not damaged, at least mine is not, but the safe mode is not working. How can someone say that the board is damaged when the board is working in normal mode and NOT working is safe mode at all. Please admit something is wrong with bootloader code in safe mode.

So let try together to find it.


catsionson

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #13 on: September 19, 2008, 10:51:01 AM »
Dear modtro2 & jure

 Thanks for the reply!


MY STORY FOR THE FAULTY BOARD:

The board was brand new worked only for 2-3 hours out of the box.
It was attached to the relay board IOR5 and I was just having a look at the web pages through the browser.

My first "programming" attempt was to change the ip address to something more convenient for me.
I succeded to do it 192.168.0.150. No prob so far.

Then I read about bootloader function and how to load a different firmware. I decided to experiment the uploading procedure with the same firmware 3.06. So I was sure I was uploading a known good and working firmware and I was experimenting only with the loading procedure. Not with the content of the hex file.

I passed through this uploading with success as well. So i had back my board with a "fresh" 3.06 to its original address.

I hard reset the board (recycle power) and changed again  the address to 192.168.0.150

I said OK, now I am able to upload a new hex to my board. I learned and I tested the whole procedure.

Soooooo I proceeded one step beyond!

I tried the 3.10 beta version that I found on your site.
I uploaded the 3.10 to the board through bootloader (while the board was at 192.168.0.150)

after power reset I established communication with the freshly "firmwared" 3.10 board at 10.1.0.1 (with the pc net settings configured accordingly on every IP change).


I changed the IP through browser config page to 192 168 0 150, I pressed the update and reset the power.

AFTER THIS I LOST THE BOARD. Either on normal (trying at 192.168.0.150) mode or on safe mode (at all the three predifined adresses).

i also trying all this with the 65 board detached from the relay board but unfortunately no change.

I assume that the board is not dead beacause I have led activity. A dead pic does not give a flashing led. I assume that the network module also works beacause I have activity on both of its leds (connect+activity).

MY STORY FOR THE GOOD BOARD.

After the "adventure" described above, I tried to establish communication (through bootloader) with the good board set on safe mode.
NOTHING.
I was unable to communicate on either of the three predifined addresses.
Of course by returing the jumper to normal mode everything was working perfectly!

So we shouldn't  blame a hardware failure here....

My investigation goes on...... Any ideas are more than welcomed.

Thanks for reading so far!

TO BE CONTINUED...............

buffler

  • Full Member
  • ***
  • Posts: 13
    • View Profile
Re: Unable to load firmware in safe mode
« Reply #14 on: September 19, 2008, 01:03:58 PM »
To further the investigation:

1) I have a colleague who successfully loaded 3.10 to his new board, and was successful. He developed a Python program to communicate with the '65 and was successful. All this was in Linux, not windows. So, his bootloader worked and so did 3.10

2) I installed wireshark on the laptop I am using as a platform, with my laptop on my local network, and started Wireshark, then powered up the SBC in operating mode. I had previously, before starting this adventure, set the delay to 8 seconds. A little more than 8 seconds after starting WS, the SBC asked for DHCP from 10.1.0.1 with 255.255.255.255 (!) as destination. There was also a transaction number. Later, at 11 seconds, the same request issued. No reply that I can see either time from my DHCP server which I think is the combined DSL modem and router?  I'm not sure about thiis.  Anyway, the SBC apparently wasn't serviced ???
This agrees with being able to ping the SBC in operate mode at 10.1.0.1 and with inability to reach it at another address.

3) Putting the SBC in safe mode, starting the sniffer and looking for utterances from the SBC produced nothing while connected to my local network.

4) an observation only: 192.168.0.1 as a safe mode destination is most unfortunate, as my DSL modem/router comes with that value in its firmware. This means that every time I try the SBC in safe mode I have to change my local machine address, reboot, etc.etc. Only a minor problem in light of our present situation

5) Wireshark is really neat! Thanks, modtro2
Don