Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 5:49 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Oct 31, 2007 8:19 am 
Offline
User avatar

Joined: Mon Apr 09, 2007 10:50 am
Posts: 48
Location: Dayton, Ohio
Hi guys,



I'm attempting to use the code provided here:



http://www.qsiforums.com/viewtopic.php? ... e++address



to change the IP in my G70 terminal running firmware 2.5. I do this through a UDP message (EthernetServerV2 set to net_udp) to the unit that is parsed by the unit and then used to update it's IP. However, when I call



Code:
SetSystemSetting (SYS_IPADDRESS, addr, SYSACT_ALWAYS)




The terminal excepts. Catching the error yields this error message:



Quote:
SetSystemSetting: Transmission channel is in use




So I tried setting the enabled property to false on both my EthernetServerV2 & HTTPClientV2 objects. This yields no change to the error message. I also tried setting a timer and changing the IP external to the Server's DataReceived event (i.e. 5 seconds after the unit received the UDP message). This still produces the same error.



Right now I'm at a loss as to what I'm doing incorrectly. Any guidance would be much appreciated.



Thanks

Doug


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 31, 2007 8:25 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
You cannot change the IP address of a terminal on the fly if any other objects have a network channel open.



You could attempt to close the network channels of your other network enabled objects (they usually have some sort of method such as "CloseConnection" that you can call.). Simply disabling the objects will not close their network channels.



However, I would recommend instead that you reboot your unit after making the change -- this is generally the safest approach.



Code:
SetSystemSetting (SYS_IPADDRESS, addr, SYSACT_ONBOOT)

SetSystemSetting (SYS_SAVE, true, SYSACT_DONOW)







This will change the setting, commit the change to flash memory and reboot your unit with the new setting.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 31, 2007 12:22 pm 
Offline
User avatar

Joined: Mon Apr 09, 2007 10:50 am
Posts: 48
Location: Dayton, Ohio
Thanks Jeremy.



I had also tried using the CloseConnection in combination with enabled=false, but that didn't work either. I always intended on rebooting; it looks like the SYS_ACT_ALWAYS was what was killing me. When I replaced that with SYSACT_ONBOOT everything worked like a charm. Again, thanks for the help.





Doug


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group