I am trying to establish a connection between the PC and the ARTIQ by executing the code on the manual to light the LED, using the code
artiq_run led.py.

I have the led.py code ready, and when I attempted to run it, I run into an error that says that connection is refused.

The only reason I could think that is causing the problem is that the IP address is not the same as before. When we got the ARTIQ board, we learned that its IP address was 192.168.0.75, and we have established this connection before under this IP address. However, this does not work anymore, meaning the IP address must have changed.

I do not know how to check the IP Address of the ARTIQ, so any input would be greatly appreciated!

P.S. - I have the device_db.py and it looked like that its core address was initially the Kasli core address when purchased from M-Labs 192.168.1.75, and that must be the reason why this ARTIQ board is not establishing any connection with the CPU, I tried changing it to the original IP address. Still, running artiq_run led.py does not work.

You can check the IP address that is currently set for the Kasli by connecting a PC to the USB/serial port and checking the output with a serial monitor program like hterm. You have to restart the crate afterwards, then there should be a message with the m-labs logo and the IP address (among other things) sent via the serial connection.

    is the hterm a program i need to install on the PC? and what is a crate? steine01

    Yes hterm is a program you would need to install (https://www.der-hammer.info/pages/terminal.html). Alternatively you can use any other serial monitor program or the python library pySerial (https://pyserial.readthedocs.io/en/latest/shortintro.html).

    With crate I mean the physical hardware you have installed. If you disconnect the power connector to the Kasli, wait a few seconds and reconnect it, the Kasli will boot up and print a message like this on the serial output:

    As you can see, the IP address of the system is printed there.

      steine01 so once i identify the IP address, is there any need for me to change the IP address back to its original address (192.168.0.75)? If there is, do I follow the steps as shown in the ARTIQ manual?

      or is the first step once i've identified the IP address is to change the IP address in device_db.py to the current IP address?

      Whether you can work with the IP address on the device heavily depends on your surrounding network. For example, if you work at an institution that requires certain static IP addresses to connect devices to the lab network, you need to change the IP address in accordance with this requirement. But you may be able to use the IP address as is just as well and just need to change it in the device_db.py file.

      A good first check is to just ´ping´ the IP address of ARTIQ from the PC you want to use to control the system. If you get a response, everything is ok, otherwise there is some other problem.

      Changing the IP address works as shown in the manual, yes.

        steine01 thanks again very much for your timely response! I'll come back again to this forum if I come across further issues.

        steine01 Hi again, I just installed OpenOCD because I needed it to continue the artiq_flash start reset of the crate, yet when I did it I have a message that says that no device was found.

        I have the Kasli connected to the PC using an Ethernet cable, and have installed the Hterm.

        Also, do I need a config file loaded into Hterm before I attempt to restart the Kasli

        Edit: When you mentioned the power connector, did you mean the physical plug to the Kasli?

        I have the Kasli connected to the PC using an Ethernet cable, and have installed the Hterm.

        You need to connect the Kasli via a USB connection to your PC to access the serial interface via hterm or artiq_flash. The USB port ist just below your power supply cable.

        Also, do I need a config file loaded into Hterm before I attempt to restart the Kasli

        No what you need to do though, is choose the correct port once the Kasli is connected. When you connect it, more options should appear in the list and one of them should print a message once the Kasli starts up.

        When you mentioned the power connector, did you mean the physical plug to the Kasli?

        Yes that is what I meant.

          I connected the PC to the Kasli board and there are now 4 ports

          I tested all 4 ports by unplugging the power supply and reconnecting it after a few seconds but no message had shown up.

          steine01

          Hmm that is weird. I had a similiar issue once and it had something to do with having to replace USB drivers on Windows. But since it looks like you use a Unix system, this should not affect you. I suggest you contact M-Labs directly via the helpdesk (helpdesk@m-labs.hk) and talk to them about the IP address and the serial connection issue, since you bought the system directly from them.

            Hi steine01 , I am following a provided by helpdesk from a few days ago, which is the development shell part. When I enter flterm /dev/ttyUSBX for all values of X I have this output error saying that it does not recognise flterm.

            steine01

            I used cutecom for the serial connection, and I think I obtained the IP Address 192.169.0.75

            Ok I do not know why there was an error with the other serial connections or what you did to fix it, but this looks like the ouput from the Kasli on boot. And your IP address is 192.169.0.75.

              steine01

              This here is a screenshot from the terminal after I attempted to ping the IP address 192.169.0.75 but this is the output I got.

              Now, usually, when you ping the correct IP address, I should get a response, but here that doesn't seem to be the case. My guess is that my local network is configured to be 192.168.0.75. If this isn't the response that I should not be expecting, do let me know.

              Also, I attempted to change the IP address from a suggestion by Helpdesk, using the following commands

              artiq_mkfs flash_storage.img -s ip 192.168.0.75

              artiq_flash -f flash_storage.img storage start

              as referenced from the ARTIQ manual

              The first line seemed to work, but when I inputted the next line, this is my output

              saying that I am missing proxy bitstream bscan_spi_xc7a100t.bit

              In another attempt, I tried the next line of code

              as referenced from the ARTIQ manual

              but the output I got is a TimeoutError

              This here is a screenshot from the terminal after I attempted to ping the IP address 192.169.0.75 but this is the output I got.

              This seems very wrong. I don't see why you need super user access for ping, it should work from a normal user unless I am missing something. Also you do not get any response at all, usually there is a timeout of some sort. As long as you cannot ping the device I think you have to investigate this issue. Can you ping other devices from this PC? What are their IP addresses?

              In another attempt, I tried the next line of code

              This will only work if you already have network access, since it uses the ethernet connection for artiq_coremgmt commands.

              The first line seemed to work, but when I inputted the next line, this is my output

              This sounds like a) you have not connected the PC run this command to the Kasli via USB or b) you did not install openocd as required by the manual.

                steine01 I know I've installed OpenOCD

                And my PC is connected to Kasli via a micro USB connector and an Ethernet connection

                I've been told by my supervisor to sudo ping the IP Address, so I do not know much more than this.

                @steine01 I am attempting another method where I make direct connection with the PC and the Kasli board

                I am not entirely sure what to do here: do I enter the IP address of the Kasli board under "Routes" and fill it in in both the Address and Gateway section?

                My plan is to make a direct connection with two devices manually.

                  Okliam I am not entirely sure what to do here: do I enter the IP address of the Kasli board under "Routes" and fill it in in both the Address and Gateway section?

                  No. You don't need a gateway if it's the same network, and also Linux normally adds by default a route to networks for which you set IP/netmask, so you probably can leave that "Routes" section blank (I'm more familiar with the command line configuration than this GUI though).