aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2014-08-15 12:57:10 -0700
committerNicholas Corgan <nick.corgan@ettus.com>2014-08-20 09:42:26 -0700
commit2de96cd57c3f19bfa778ccad280ad19170af0967 (patch)
tree88e5235bbbc1df0dd5d6ce1883203a09f3e07ea3 /host/lib
parent9fb6c2919ad9e7e736c837186861b362ba80cdfa (diff)
downloaduhd-2de96cd57c3f19bfa778ccad280ad19170af0967.tar.gz
uhd-2de96cd57c3f19bfa778ccad280ad19170af0967.tar.bz2
uhd-2de96cd57c3f19bfa778ccad280ad19170af0967.zip
OctoClock: bugfixes/improvements
* Fixed Ethernet initialization problem * Improved external reference detection * Added gratuitous ARP, sent upon power-up * Tweaked host-side timing for initialization and firmware burning * Fixed logic for dealing with firmware incompatibility * Misc efficiency/reliability improvements to firmware's network code
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
index add5d7931..8c207dd9f 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
@@ -75,7 +75,7 @@ device_addrs_t octoclock_find(const device_addr_t &hint){
device_addr_t _hint = hints[0];
device_addrs_t octoclock_addrs;
- //return an empty list of addresses when type is set to non-usrp2
+ //return an empty list of addresses when type is set to non-OctoClock
if (hint.has_key("type") and hint["type"].find("octoclock") == std::string::npos) return octoclock_addrs;
//Return an empty list of addresses when a resource is specified,
@@ -127,11 +127,9 @@ device_addrs_t octoclock_find(const device_addr_t &hint){
const octoclock_packet_t *pkt_in = reinterpret_cast<octoclock_packet_t*>(octoclock_data);
while(true){
- size_t len = udp_transport->recv(asio::buffer(octoclock_data), 2);
+ size_t len = udp_transport->recv(asio::buffer(octoclock_data));
if(UHD_OCTOCLOCK_PACKET_MATCHES(OCTOCLOCK_QUERY_ACK, pkt_out, pkt_in, len)){
device_addr_t new_addr;
- new_addr["type"] = (pkt_in->proto_ver == OCTOCLOCK_FW_COMPAT_NUM) ? "octoclock"
- : "octoclock-bootloader";
new_addr["addr"] = udp_transport->get_recv_addr();
//Attempt direct communication with OctoClock
@@ -143,9 +141,12 @@ device_addrs_t octoclock_find(const device_addr_t &hint){
if(UHD_OCTOCLOCK_PACKET_MATCHES(OCTOCLOCK_QUERY_ACK, pkt_out, pkt_in, len)){
//If the OctoClock is in its bootloader, don't ask for details
if(pkt_in->proto_ver == OCTOCLOCK_BOOTLOADER_PROTO_VER){
+ new_addr["type"] = "octoclock-bootloader";
octoclock_addrs.push_back(new_addr);
}
else{
+ new_addr["type"] = "octoclock";
+
octoclock_eeprom_t oc_eeprom(ctrl_xport);
new_addr["name"] = oc_eeprom["name"];
new_addr["serial"] = oc_eeprom["serial"];