Hello,
I am using a Kasli V2.0.1 with an IP address of 192.168.1.75 (confirmed by pinging as follows)
bladerunner@BladeRunner:~/Desktop/artiqenv1$ ping 192.168.1.75
PING 192.168.1.75 (192.168.1.75) 56(84) bytes of data.
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=1 ttl=64 time=0.055 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=2 ttl=64 time=0.057 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=3 ttl=64 time=0.057 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=4 ttl=64 time=0.057 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=5 ttl=64 time=0.059 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=6 ttl=64 time=0.058 ms
64 bytes from 192.168.1.75 [192.168.1.75]: icmp_seq=7 ttl=64 time=0.057 ms
C
--- 192.168.1.75 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6152ms
rtt min/avg/max/mdev = 0.055/0.057/0.059/0.001 ms
The communication over the micro USB works fine for restarting the Kasli:
bladerunner@BladeRunner:~/Desktop/artiqenv1$ artiq_flash start
Open On-Chip Debugger 0.11.0+dev-snapshot (2022-09-15-18:23)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html [openocd.org]
Info : ftdi: if you experience problems at higher adapter clocks, try the command "ftdi tdo_sample_edge falling"
Info : clock speed 25000 kHz
Info : JTAG tap: xc7.tap tap/device found: 0x13631093 (mfg: 0x049 (Xilinx), part: 0x3631, ver: 0x1)
TEMP 74.33 C
VCCINT 0.976 V
VCCAUX 1.777 V
VCCBRAM 0.984 V
VPVN 0.000 V
VREFP 0.000 V
VREFN 0.000 V
VCCPINT 0.000 V
VCCPAUX 0.000 V
VCCODDR 0.000 V
But when I attempt to run the led.py script (modified for my device_db.py and to confirm the build process ran smoothly)
led.py
from artiq.experiment import *
class LED(EnvExperiment):
def build(self):
self.setattr_device("core")
self.setattr_device("led1")
print('built')
@kernel
def run(self):
self.core.reset()
self.led1.on()
flake.nix (for context on my artiq environment
{
inputs.artiq.url = "git+https://github.com/m-labs/artiq.git?ref=release-7";
inputs.extrapkg.url = "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git?ref=release-7";
inputs.extrapkg.inputs.artiq.follows = "artiq";
outputs = { self, artiq, extrapkg }:
let
pkgs = artiq.inputs.nixpkgs.legacyPackages.x86_64-linux;
aqmain = artiq.packages.x86_64-linux;
aqextra = extrapkg.packages.x86_64-linux;
in {
defaultPackage.x86_64-linux = pkgs.buildEnv {
name = "artiq-env";
paths = [
========================================
EDIT BELOW
========================================
(pkgs.python3.withPackages(ps: [
List desired Python packages here.
aqmain.artiq
#ps.paramiko # needed if and only if flashing boards remotely (artiq_flash -H)
#aqextra.flake8-artiq
The NixOS package collection contains many other packages that you may find
interesting. Here are some examples:
ps.pandas
ps.numpy
ps.scipy
#ps.numba
ps.matplotlib
aqextra.dax
or if you need Qt (will recompile):
#(ps.matplotlib.override { enableQt = true; })
#ps.bokeh
#ps.cirq
#ps.qiskit
]))
#aqextra.korad_ka3005p
#aqextra.novatech409b
List desired non-Python packages here
aqmain.openocd-bscanspi # needed if and only if flashing boards
Other potentially interesting packages from the NixOS package collection:
pkgs.gtkwave
#pkgs.spyder
#pkgs.R
#pkgs.julia
========================================
EDIT ABOVE
========================================
];
};
};
}
nix.conf (note that I get 'warning: ignoring untrusted substituter 'https://nixbld.m-labs.hk [nixbld.m-labs.hk]'
' when I run nix shell)
substituters = https://nixbld.m-labs.hk https://cache.nixos.org https://cache.nixos.org/
trusted-public-keys = nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
experimental-features = nix-command flakes
I then get this when attempting to run the led.py
bladerunner@BladeRunner:~/Desktop/artiqenv1$ artiq_run led.py
built
Traceback (most recent call last):
File "/nix/store/2w4h6z0k128aa52r1law0zysi68arp34-python3.9-artiq-7.8123.3038639/bin/.artiq_run-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 224, in main
return run(with_file=True)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 210, in run
raise exn
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 203, in run
exp_inst.run()
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/language/core.py", line 54, in run_on_core
return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 140, in run
self._run_compiled(kernel_library, embedding_map, symbolizer, demangler)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/core.py", line 126, in run_compiled
self.comm.check_system_info()
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 351, in check_system_info
self.write_empty(Request.SystemInfo)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 319, in write_empty
self.write_header(ty)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 311, in _write_header
self.open()
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/artiq/coredevice/comm_kernel.py", line 197, in open
self.socket = create_connection(self.host, self.port)
File "/nix/store/wdqwg91z2yicjjn3fpp2jbc1rds469zh-python3-3.9.13-env/lib/python3.9/site-packages/sipyco/keepalive.py", line 103, in create_connection
sock = socket.create_connection((host, port), *args, **kwargs)
File "/nix/store/65h1mb8604dbw077762j702q6b8i0mpw-python3-3.9.13/lib/python3.9/socket.py", line 844, in create_connection
raise err
File "/nix/store/65h1mb8604dbw077762j702q6b8i0mpw-python3-3.9.13/lib/python3.9/socket.py", line 832, in create_connection
sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused
This is the device for UW using the device_db.py file that came with it.
So nearest I can tell, the Kasli and the artiq environment are not effectively communicating, but they are interacting. I wonder if this is a version mismatch issue as the kasli and corresponding components were purchased before artiq version 7 went live. In which case, is there a line I can use in the flake.nix file to run this with artiq v.6 instead and test that theory? Otherwise, am I barking up the wrong tree?
Any help would be appreciated
-Brant