[solved] import errors with test project

I’m just trying to follow the basic tutorial here, http://youtu.be/prtxwPbFDwo

But I keep getting import errors on my connectport x4.

I ssh in and: python dia.py


#> python dia.py

Dia auto-detect of rapid reboot DISABLED
Running in environment: digiconnect
iDigi Device Integration Application Version 2.0.11
Source settings file: WEB/python/dia.zip/dia.pyr
Destination settings file: WEB/python/dia.pyr
Core: initial garbage collection of 1176 objects.
Core: post-settings garbage collection of 10 objects.
Core: Starting Tracing Manager...
Core: Starting Scheduler...
Core: Starting Channel Manager...
Core: Starting Device Driver Manager...
CRITICAL:edp_upload:This EDP_Upload driver can only be run on a Digi device with EDP.
CRITICAL:edp_upload:The running platform is not supported.
Core: Exception during core initialization:
Traceback (most recent call last):
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\core\core_services.py", line 381, in epoch
ERROR:AbstractServiceManager:Exception during dynamic class load: Traceback (most recent call last):
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\abstract_service_manager.py", line 206, in service_load
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\classloader.py", line 64, in classloader
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\devices\edp_upload.py", line 59, in ?
ImportError: No module named idigidata

  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\devices\device_driver_manager.py", line 55, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\abstract_service_manager.py", line 110, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\settings\settings_base.py", line 294, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\abstract_service_manager.py", line 126, in apply_settings
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\abstract_service_manager.py", line 158, in _reenumerate_services
  File "C:\Program Files\Digi\python\DevTools-2.0\Dia\Dia_2.0.11\src\common\abstract_service_manager.py", line 210, in service_load
ASMClassLoadError: unable to load 'devices.edp_upload:EDPUpload': exceptions.ImportError:No module named idigidata
Core: Fatal exception caught!  Halting execution.
Core: Stopping xbee_device_manager
Stopping scheduler...done.
Core: Stopping tracing_manager...done.
Core: Threads still running ([, , , ]).
Waiting for them to terminate... 
Core: All threads stopped.
dia.py is exiting...
[/quote]
this is basically a brand new setup, and it will stil run a simple 'hellow world' snippet, but everytime I try to run the idigi stuff it breaks.

You need to update your firmware on your X4 to the latest - see the error messages further up in your output:
CRITICAL:edp_upload:This EDP_Upload driver can only be run on a Digi device with EDP.
CRITICAL:edp_upload:The running platform is not supported.

Yah, this is rather confusing & it will be changed in future Dia. Those 2 missed messages will be moved to occur AFTER the traceback, plus hopefully they add the hint ‘make sure you have the latest firmware’.

well now I can’t connect to the device at all.

I thought there must’ve been something wrong with my DigiESP setup so I reinstalled it and ‘boom’

I can connect via ssh/telnet/webbrowser but the device discovery (inside digiesp) is broken.

Well I’ve gotten it back now.

I’m not sure which POST firmware to use. There are 16 and 32MB versions on http://www.digi.com/support/productdetail?pid=3604

My model/PN: ‘ConnectPort X4 ZB Ethernet’ PN:(1P)50001513-20

well I applied the firmware - seems to be working so I’m just going to assume I used the correct ones :slight_smile:

Now I get a new problem:


 python dia.py

Dia auto-detect of rapid reboot DISABLED
Running in environment: digiconnect
iDigi Device Integration Application Version 2.1.0.8
Source settings file: WEB/python/dia.zip/dia.pyr
Destination settings file: WEB/python/dia.pyr
Core: initial garbage collection of 1354 objects.
Core: post-settings garbage collection of 10 objects.
Core: Starting Tracing Manager...
Core: Starting Scheduler...
Core: Starting Channel Manager...
Core: Starting Device Driver Manager...
Core: Exception during core initialization:
Traceback (most recent call last):
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\core\core_services.py", line 388, in epoch
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\device_driver_manager.py", line 55, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\common\abstract_service_manager.py", line 110, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\settings\settings_base.py", line 294, in __init__
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\common\abstract_service_manager.py", line 126, in apply_settings
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\common\abstract_service_manager.py", line 161, in _reenumerate_services
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\common\abstract_service_manager.py", line 282, in instance_start
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_devices\xbee_sensor.py", line 244, in start
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_device_manager\xbee_device_manager.py", line 899, in register_sample_listener
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_device_manager\xbee_device_manager.py", line 937, in register_rx_listener
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_device_manager\xbee_device_manager.py", line 1087, in xbee_device_event_spec_add
  File "C:\Program Files\Digi\python\DevTools-2.1\Dia\Dia_2.1.0\src\devices\xbee\xbee_device_manager\xbee_device_manager.py", line 356, in __endpoint_add
Exception: Unable to bind endpoint 0xe8! Check that no other programs are running or are set to run on the device. 
Core: Fatal exception caught!  Halting execution.
Core: Stopping sensor0
Core: Stopping xbee_device_manager
Stopping scheduler...done.
Core: Stopping tracing_manager...done.
Core: Threads still running ([, ]).
Waiting for them to terminate... 
Core: All threads stopped.
dia.py is exiting...


Just to sum up, in case anyone else comes across this problem.

I have a connectport x4, ZB Ethernet. In order to run the iDigi projects I needed to update firmare. I grabbed it from here: http://www.digi.com/support/productdetail?pid=3604

The order is important, I needed two updates. First the POST firmware, then the EOS firmware.

The POST was confusing because there wasn’t anything screaming about my connectport’s memory capabilities. But it is shown on the connectport’s web UI-> System information.

Here is mine from after the updates, with my MAC obfuscated:


Model:	 	ConnectPort X4
Ethernet MAC Address: 	 	DE:AD:BE:EF:DA:D0
 
Firmware Version:	 	2.14.1.15   (Version 82001536_K2 03/08/2012)
Boot Version:	 	1.1.3   (release_82001975_D)
POST Version:	 	1.1.3   (release_82001753_H)
Product VPD Version:	 	release_82002010_B
Product ID:	 	0x0085
Hardware Strapping:	 	0x0044
 
CPU Utilization:	 	26%
Up Time:	 	1 minute 16 seconds
Date and Time:	 	Thu Aug 2 16:39:58 2012 
Total Memory:	 	32768 KB
Used Memory:	 	15955 KB
Free Memory:	 	16813 KB
Total Flash Filesystem:	 	3906 KB
Used Flash Filesystem:	 	643 KB
Free Flash Filesystem:	 	3263 KB

See ‘total memory’ is 32MB, so that is the POST file I used.

Update that first via the web UI firmware page. I used 82001753_H.bin. After selecting the file make sure to wait until you see a reboot option on the web UI, then reboot it.

Then I updated the EOS firmware with 82001536_K2.bin, same thing as above, make sure to wait until you can see the reboot option on the page and reboot it.

I must have missed the directions to do this, I’ve read through the manual and find its description of firmware updates completely pathetic. Its less descriptive than the download page. Maybe there is a sticky in one of the subforums here, but this forum software is a nightmare to navigate so I could easily be overlooking the proper subforum.

Maybe this information is somewhere else already, but it seemed unintuitive to me, so I hope this helps somebody else.

lynnl - thanks a million for setting me on the right path. I put in a support request with Digi > 48 hours ago and still haven’t heard anything back from them. (boo)