0
Answered

MD4-5 first download problem (ida3 file)

blags 4 years ago • updated by Ulrik Zakariasson (Software development) 3 years ago 17

On three new devices: first device: tried to download 5 times via CAN and once via Ethernet. Succeeded at about the sixth time via CAN. Second Device: succeded first time via CAN, download took 20 minutes. Third device: Succeeded 4th time via CAN. Note that after the first download, subsequent updates only take seconds. I need to solve this before serious production quantities.


Under review

I always prefer using ethernet to update my MD4 modules. The firmware of the MD4 is about 20 MB, so updating it via 250 kbit/s CAN will take time. When shipped from our production, the MD4:s are loaded with all the firmware, but almost always an earlier version than the latest available.


But both methods should work though. Starting with the attempt at downloading via ethernet, how were you connected to the MD4? E.g. laptop disconnected from the docking station and the office network, with a cable directly to the C3 connector? Or the MD4 C3 connector plugged into the office network?

What you could have is that the ethernet port on you PC has been blocked for certain types of traffic. This would be something to suspect if IQANdesign/IQANrun does not find the MD4 at all.


If the CAN download fails, that is more likely to be due to the CAN wiring. What CAN dongle are you using, and how is it wired? E.g. 120 ohm termination on the CAN dongle, and just the MD4 as the only module on the bus. Or a more complex CAN network with multiple IQAN and non-IQAN modules on the diagnostics bus?



I think the troubleshooting in this case is of quite general nature and could be interesting for other users, is it ok with you if I move this topic from helpdesk to the open part of the forum?

Ok not a problem if this is part of the open forum.

Perhaps the Ethernet cable was not properly connected, but for us it was not the prefered solution. I had to disconnect my laptop from the company network and connect my laptop to a home-type access point device with a DHCP server. I did the same with the MD4, so I got known IP addresses for both. About the CAN solution I probably had a CAN cable terminated at both ends. It the CAN interfaces terminated internally when they ship out of your factory? If this is the case perhaps this was the problem.


It there a way to "reset" or download a prior version of the firmware so that I can test further?

For the CAN connection, yes, the MD4 is default terminated on all CAN buses when there is no application in it. With an application loaded, termination of the individual buses is controlled by the application. But it seems strange, over terminating with just one 120 ohm resistor too much is normally not causing any problems.


If you have a DHCP server, then it should be enough to have the PC and the MD4 connected to that.

When connecting the laptop directly to the MD4, without a DHCP server, it should normally be able to connect with the MD4 using Auto IP. The PC would just need to be set to "obtain IP address automatically", the same setting as when you have a DHCP server.

But I have experienced that if this function is blocked, then setting the PC to a static IP in the same address range as the MD4 is a workaround that can be used.


The "reset" function for the MD4 is to start it in safe-mode. By either disconnecing or shorting the IdTag, it will start without its application, and only run the firmware.


Is there a way to test back how it was at factory default? Presently when I start the MD4 in safe-mode it only takes seconds to download the ida3 file, in either: Ethernet mode, CAN with 1X120 Ohms termination, and CAN with 2X120Ohms termination. So obviously, the firmware is not re-downloaded.

The MD4 comes from our production the firmware already loaded. What you can do is to create a minimal application with an earlier IQANdesign version, and use that to downgrade the MD4 to the version it had when leaving the factory.

Currently, we load the MD4:s with version 3.16.9 in production, the closest match to this that you can get is the 3.16.7, this is part of IQAN Creative Studio 3.16.2

http://divapps.parker.com/divapps/iqan/IQANStudiosOld.html

I tried 3.15 version instead of the 3.19 version I am currently using. Connecting via ETHERNET with the 3.15 version is often a problem because the IQAN device is not always detected and specifying an IP address is not a possibility with 3.15. I was able to update via CAN. When updating with 3.19, the IP address was not auto-detected in neither auto-ip nor DHCP mode, so using DHCP mode, with 3.19, I could specify an IP address directly. With both IQAN-RUN and IQAN-Design, the download hung (not at the same place, I believe that in my last attempt, it hung at about 50% complete of the last file) and I had to terminate ether IQAN-RUN or IQAN-Design, I therefore had to shutoff the MD4, wait a while (to cool off?), and was then able to download via CAN, this download took about 8 minutes.

I am not sure that I understood exactly how you connected, but if you have specified a static IP in the MD4, then it will not take an address via DHCP. Auto-IP should still work also in this case.


I don't understand what it is that stops the download halfway. Just to check, a colleague just ran some extra tests going from 3.15 to 3.19 (MD4 connected directly to the PC via Auto-IP), that works fine here.


I tried Auto-IP, but the MD4 was not auto-detected. It there a sequence that must be followed?

For example:

1- Close IQAN software (design or run);

2- Power-down MD4

3- disconnect PC from network

4- Wait for Auto-IP on PC

5- start IQAN software (design or run0

6- Power MD4

7- Try to connect with a set date-time to confirm connection

8- etc.


The Auto-IP is not necessary for me (DHCP could do), but it might give you a clue on my connection problems.


One difference with Auto-IP is that it takes a while to negotiate the IP address, it normally takes about 30 seconds or more after plugging the MD4 C3 connector into the PC until Auto-IP is ready and the IQAN software can detect the MD4.


If it does not work, it is possible that Auto IP is not enabled.


To use Auto-IP, make sure that Automatic private IP address is ticked under alternate configuration



You should not have to reboot the MD4, even if it was just connected to a DHCP server, it will get an IP address via Auto-IP when you disconnect it from the network and plug it straight into the PC.

You will be able to see in the MD4 menu system if "IP address 0" ends up in the range 169,254.x.y.


You can keep the Connect via Ethernet dialogue open, when Auto IP completes, you should see your MD4 showing up under "discovered modules".



I have a possible explanation to why there is a problem when sending the project file update to an MD4 with a fixed address. When setting a fixed IP address, the traffic is sent with TCP, while it uses UDP when it is on a network with a DHCP server and when running Auto-IP. I got a hint from one of the developers that we have an open bug report on unstable communication when sending over TCP.

I tried again. It appears as the "discovering" does not work in my installation, and yes I did verify that the IP address property is not set (set to default) on the MD4.


I tried both: Auto-IP and DHCP (I know static IP works that is how I was connecting previously)


In the following screenshots I connected both the CAN and the ETHERNET interfaces. I initially connected via CAN to enable my maintenance menu:


Connected via CAN



My PC settings: IP: 169.254.199.156


Then if I try to connect via ETHERNET:



Now trying with DHCP: (I connect via a D-LINK access point)




On MD4 menu: IP address1: 192.168.1.101




Still no discovery


It seems as if the the function for discovering the module is being blocked on your PC, probably a setting in the firewall.

What IQANdesign does when you bring up the Connect via Ethernet dialogue is that it sends out an UDP broadcast, and waits for the responses (by the MD4:s). Perhaps the UDP broadcast is being blocked?

Could you try to connect to the MD4 with your firewall temporarily disabled?


Also, a correction about when the tools use TCP and when they use UDP. I wrote that TCP is being used when the MD4 has got a fixed address, but it does not matter how the MD4 gets its address. If the MD4 is responding to the UDP broadcast, it will show up under discovered modules, and when connecting to it UDP will be used for the communication. It is when IQANdesign/IQANrun is connecting to a "Static module" that TCP is used.

I added both IQAN-Design and IQAN-RUN programs full permissions in outgoing traffic in my advanced firewall setting, but still no discovery. But note that our PC overall security levels are managed by company-wide settings that I cannot change locally and that most probably the permissions I added to the programs IQAN-Design and IQAN-Run are overulled at a higher level.

Are there any updates relative to this issue?

Hi,

We have fixed an issue with update project via static IP in IQANrun 4.00, so that method should work now.

But I still don't understand why the MD4 is not discovered when using AutoIP or DHCP.