SGD Return Values

C Clive Lacey 3 years 7 months ago
266 1 0

Hi Guys,
Following on from my previous posts I have moved to using JSON for sending and receiving information to the printers with LINK-OS
I have the following scenario.
I have two printers:
 
ZT410 running V75.19.13Z (LiNK-OS V3)
QLN 320n running V68.20.01Z (LINK-OS V4)
 
I have an older application that I can use to send an SGD request using the getvar command as follows ! U1 getvar "ip"
On both of the printers this returns the following as expected.
ip.
ip.dhcp.
ip.dhcp.enable : on , Choices: on,off
ip.dhcp.cid_type : 1 , Choices: 0,1,2
ip.dhcp.cid_prefix : 
ip.dhcp.cid_value : ac3fa406f286
ip.dhcp.requests_per_session : 2 , Choices: 1-10
ip.dhcp.request_timeout : 2 , Choices: 2-30
ip.dhcp.session_interval : 10 , Choices: 0-60
ip.dhcp.lease.
ip.dhcp.lease.length : 86400
ip.dhcp.lease.time_left : 86321
ip.dhcp.lease.server : 10.107.129.12
ip.dhcp.lease.last_attempt : 1485480291
ip.dhcp.cache_ip : off , Choices: on,off
ip.dhcp.vendor_class_id : Zebra Technologies ZTC QLn320-203dpi CPCL
ip.dhcp.user_class_id : 
ip.dhcp.option12 : on , Choices: on,off
ip.dhcp.option12_format : 
ip.dhcp.option12_value : XXQLJ132000707
ip.dhcp.cid_enable : off , Choices: on,off
ip.dhcp.cid_suffix : ac3fa406f286
ip.dhcp.cid_all : ac3fa406f286
ip.dhcp.arp_verify : off , Choices: on,off
ip.dhcp.auto_provision_enable : on , Choices: on,off
ip.dhcp.ntp.
ip.dhcp.ntp.enable : off , Choices: on,off
ip.dhcp.ntp.received_servers : 
ip.ftp.
ip.ftp.enable : on , Choices: on,off
ip.ftp.execute_file : off , Choices: on,off
ip.ftp.request_password : no , Choices: yes,no
ip.lpd.
ip.lpd.enable : on , Choices: on,off
ip.tcp.
ip.tcp.enable : on , Choices: on,off
ip.tcp.nagle_algorithm : enabled , Choices: enabled,disabled
ip.udp.
ip.udp.enable : on , Choices: on,off
ip.http.
ip.http.enable : on , Choices: on,off
ip.http.admin_name : admin
ip.http.admin_password : *
ip.http.port : 80
ip.http.faq_url : http://support.zebra.com
ip.http.custom_link_name : 
ip.http.custom_link_url : 
ip.smtp.
ip.smtp.enable : on , Choices: on,off
ip.smtp.server_addr : 0.0.0.0
ip.smtp.domain : ZBRPrintServer.com
ip.pop3.
ip.pop3.enable : on , Choices: on,off
ip.pop3.print_headers : off , Choices: on,off
ip.pop3.verbose_headers : off , Choices: on,off
ip.pop3.print_body : off , Choices: on,off
ip.pop3.save_attachments : off , Choices: on,off
ip.pop3.poll : 240 , Choices: 0-65535
ip.pop3.username : 
ip.pop3.password : *
ip.pop3.server_addr : 0.0.0.0
ip.pop3.print_attachments : off , Choices: on,off
ip.snmp.
ip.snmp.enable : on , Choices: on,off
ip.snmp.get_community_name : *
ip.snmp.set_community_name : *
ip.snmp.create_mib
ip.snmp.trap_community_name : public
ip.telnet.
ip.telnet.enable : on , Choices: on,off
ip.telnet.disconnect
ip.addr : 10.107.176.2
ip.netmask : 255.255.192.0
ip.gateway : 10.107.128.1
ip.port : 6101
ip.remote : 
ip.ping_remote
ip.netstat : Active Internet connections
Proto Recv-Q Send-Q  Local Address          Foreign Address        State
tcp        0      0  *.23                   *.*                    LISTEN
tcp        0      0  *.9300                 *.*                    LISTEN
tcp        0      0  *.9200                 *.*                    LISTEN
tcp        0      0  *.9100                 *.*                    LISTEN
tcp        0      0  *.6101                 *.*                    LISTEN
tcp        0      0  *.515                  *.*                    LISTEN
tcp        0      0  *.21                   *.*                    LISTEN
tcp        0      0  *.80                   *.*                    LISTEN
udp        0      0  *.*                    *.*                  
udp        0      0  *.65534                *.*                  
udp        0      0  *.161                  *.*                  
udp        0      0  *.6101                 *.*                  
udp        0      0  *.4201                 *.*                  
udp        0      0  *.*                    *.*                  
udp        0      0  *.*                    *.*                  
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
  25e270 dgram       0      0   262740        0        0        0 /var/wlan0
 
ip.remote_port : 10013
ip.remote_autoconnect : off , Choices: on,off
ip.bootp.
ip.bootp.enable : off , Choices: on,off
ip.mirror.
ip.mirror.auto : off , Choices: on,off
ip.mirror.username : user
ip.mirror.password : *
ip.mirror.server : 127.0.0.1
ip.mirror.path : Zebra
ip.mirror.freq : 0 , Choices: 0-65535
ip.mirror.fetch
ip.mirror.version : Oct  7 2016 21:40:23
ip.mirror.freq_hours : 0 , Choices: 0-100
ip.mirror.error_retry : 0 , Choices: 0-65535
ip.mirror.feedback.
ip.mirror.feedback.auto : off , Choices: on,off
ip.mirror.feedback.path : Zebra/feedback
ip.mirror.feedback.freq : 0 , Choices: 0-65535
ip.mirror.feedback.odometer : 0 , Choices: 0-4294967295
ip.mirror.success : no
ip.mirror.success_time : Jan 27 2017 01:24:34
ip.mirror.last_time : Jan 27 2017 01:24:34
ip.mirror.last_error : No Error
ip.mirror.mode : ftp , Choices: ftp,sftp
ip.mirror.reset_delay : 5 , Choices: 0-900
ip.mirror.interface : both , Choices: both,wired,wireless
ip.mirror.appl_path : 
ip.ping_len : 56 , Choices: 56-65535
ip.dns.
ip.dns.domain : dt01.local
ip.dns.servers : 10.107.129.12 10.107.129.11
ip.discovery.
ip.discovery.enable : on , Choices: on,off
ip.discovery.port : 4201
ip.roam_packet : on , Choices: on,off
ip.arp_interval : 0 , Choices: 0-30
ip.primary_network : 2 , Choices: 1,2
ip.active_network : wireless
ip.ntp.
ip.ntp.enable : off , Choices: on,off
ip.ntp.servers : 
ip.ntp.log : File Not Found
ip.port_alternate : 9100
ip.port_json_config : 9200
ip.port_single_conn : 9300
ip.port_single_conn_idle_timeout : 180 , Choices: 0-3600
 
However if I use JSON to do the same thing I get back a different result (on both printers):
 
"{\"ip\":\r\n{\"ip.dhcp.vendor_class_id\":\"Zebra Technologies ZTC QLn320-203dpi CPCL\",\r\n\"ip.dhcp.user_class_id\":\"\",\r\n\"ip.dhcp.auto_provision_enable\":\"on\",\r\n\"ip.dhcp.ntp.enable\":\"off\",\r\n\"ip.dhcp.ntp.received_servers\":\"\",\r\n\"ip.ftp.enable\":\"on\",\r\n\"ip.ftp.execute_file\":\"off\",\r\n\"ip.ftp.request_password\":\"no\",\r\n\"ip.lpd.enable\":\"on\",\r\n\"ip.tcp.enable\":\"on\",\r\n\"ip.tcp.nagle_algorithm\":\"enabled\",\r\n\"ip.udp.enable\":\"on\",\r\n\"ip.http.enable\":\"on\",\r\n\"ip.http.admin_name\":\"admin\",\r\n\"ip.http.admin_password\":null,\r\n\"ip.http.port\":\"80\",\r\n\"ip.http.faq_url\":\"http://support.zebra.com\",\r\n\"ip.http.custom_link_name\":\"\",\r\n\"ip.http.custom_link_url\":\"\",\r\n\"ip.smtp.enable\":\"on\",\r\n\"ip.smtp.server_addr\":\"0.0.0.0\",\r\n\"ip.smtp.domain\":\"ZBRPrintServer.com\",\r\n\"ip.pop3.enable\":\"on\",\r\n\"ip.pop3.print_headers\":\"off\",\r\n\"ip.pop3.verbose_headers\":\"off\",\r\n\"ip.pop3.print_body\":\"off\",\r\n\"ip.pop3.save_attachments\":\"off\",\r\n\"ip.pop3.poll\":\"240\",\r\n\"ip.pop3.username\":\"\",\r\n\"ip.pop3.password\":null,\r\n\"ip.pop3.server_addr\":\"0.0.0.0\",\r\n\"ip.pop3.print_attachments\":\"off\",\r\n\"ip.snmp.enable\":\"on\",\r\n\"ip.snmp.get_community_name\":null,\r\n\"ip.snmp.set_community_name\":null,\r\n\"ip.snmp.create_mib\":null,\r\n\"ip.snmp.trap_community_name\":\"public\",\r\n\"ip.telnet.enable\":\"on\",\r\n\"ip.telnet.disconnect\":null,\r\n\"ip.port\":\"6101\",\r\n\"ip.remote\":\"\",\r\n\"ip.ping_remote\":null,\r\n\"ip.remote_port\":\"10013\",\r\n\"ip.remote_autoconnect\":\"off\",\r\n\"ip.mirror.auto\":\"off\",\r\n\"ip.mirror.username\":\"user\",\r\n\"ip.mirror.password\":null,\r\n\"ip.mirror.server\":\"127.0.0.1\",\r\n\"ip.mirror.path\":\"Zebra\",\r\n\"ip.mirror.freq\":\"0\",\r\n\"ip.mirror.fetch\":null,\r\n\"ip.mirror.version\":\"Oct  7 2016 21:40:23\",\r\n\"ip.mirror.freq_hours\":\"0\",\r\n\"ip.mirror.error_retry\":\"0\",\r\n\"ip.mirror.feedback.auto\":\"off\",\r\n\"ip.mirror.feedback.path\":\"Zebra/feedback\",\r\n\"ip.mirror.feedback.freq\":\"0\",\r\n\"ip.mirror.feedback.odometer\":\"0\",\r\n\"ip.mirror.success\":\"no\",\r\n\"ip.mirror.success_time\":\"Jan 27 2017 01:24:34\",\r\n\"ip.mirror.last_time\":\"Jan 27 2017 01:24:34\",\r\n\"ip.mirror.last_error\":\"No Error\",\r\n\"ip.mirror.mode\":\"ftp\",\r\n\"ip.mirror.reset_delay\":\"5\",\r\n\"ip.mirror.interface\":\"both\",\r\n\"ip.mirror.appl_path\":\"\",\r\n\"ip.ping_len\":\"56\",\r\n\"ip.discovery.enable\":\"on\",\r\n\"ip.discovery.port\":\"4201\",\r\n\"ip.roam_packet\":\"on\",\r\n\"ip.primary_network\":\"2\",\r\n\"ip.active_network\":\"wireless\",\r\n\"ip.ntp.enable\":\"off\",\r\n\"ip.ntp.servers\":\"\",\r\n\"ip.ntp.log\":\"File Not Found\",\r\n\"ip.port_alternate\":\"9100\",\r\n\"ip.port_json_config\":\"9200\",\r\n\"ip.port_single_conn\":\"9300\",\r\n\"ip.port_single_conn_idle_timeout\":\"180\"}}"
 
As far as i can tell the JSON is correctly formed BUT the first 13 returns are "missing" from the returned values from the printer?
In both using JSON and gtevar methods i am asking for the "ip" group.
 
I can modify my JSON code to ask for "ip.dhcp" and i get the following, which is stil missing values compared to the original SGD getvar request.
"{\"ip.dhcp\":\r\n{\"ip.dhcp.vendor_class_id\":\"Zebra Technologies ZTC QLn320-203dpi CPCL\",\r\n\"ip.dhcp.user_class_id\":\"\",\r\n\"ip.dhcp.auto_provision_enable\":\"on\",\r\n\"ip.dhcp.ntp.enable\":\"off\",\r\n\"ip.dhcp.ntp.received_servers\":\"\"}}"
 
However If I can use JSON to get the specific values that are missing ie a request for "ip.dhcp.enable" will return the correct value.
 
I can not seem to work out any pattern in this and as far as I can tell I am getting back correctly formed JSON, However the returns from the IP group seem inconsistent using JSON rather than getvar?
I have tried other large groups such as WLAN and that seems to be the same using the two methods, though I have not checked in detail.
 
Any advice much appreciated?
Regards
Clive

Please Register or Login to post a reply

1 Replies

C Clive Lacey

*BUMP*
Any one have anything to share on this please?

CONTACT
Can’t find what you’re looking for?