How to Write data to PCI Device Address from GUI?
-
Hi everyone,
I want to communicate with my PCI device using Linux commands in GUI.
In Linux Terminal, I can able to Read & Write the PCI address.
I created LineEdit & Button to read the address in GUI.My code:
void MainWindow::on_pushButton_clicked()
{QProcess proc; proc.start("setpci -s 00:1c.0 10.L"); //command to read the address of 00:0c.0 at location 10 proc.waitForFinished(); QString output = proc.readAllStandardOutput(); ui->lineEdit->setText(output);
}
Here I am able to get the data from the address location 10.
In this same way I want to write at the same address location using another Linux Command setpci -s 00:1c.0 10.L=”1210ffff”, here my data in 1210ffff which I will write in LineEdit and this has to be store in address location also. let me know how to execute this function..!
Thanks in advance.
-
Hi everyone,
I want to communicate with my PCI device using Linux commands in GUI.
In Linux Terminal, I can able to Read & Write the PCI address.
I created LineEdit & Button to read the address in GUI.My code:
void MainWindow::on_pushButton_clicked()
{QProcess proc; proc.start("setpci -s 00:1c.0 10.L"); //command to read the address of 00:0c.0 at location 10 proc.waitForFinished(); QString output = proc.readAllStandardOutput(); ui->lineEdit->setText(output);
}
Here I am able to get the data from the address location 10.
In this same way I want to write at the same address location using another Linux Command setpci -s 00:1c.0 10.L=”1210ffff”, here my data in 1210ffff which I will write in LineEdit and this has to be store in address location also. let me know how to execute this function..!
Thanks in advance.
@PraviN3738 said in How to Write data to PCI Device Address from GUI?:
let me know how to execute this function
Can you please explain what the problem is? If you can execute the first command then you should be able to execute the second one.
-
Can you please explain what the problem is? If you can execute the first command then you should be able to execute the second one.
In first function i am doing Read operation & that was working fine, In second function when i was writing to the same address location, it is not working.
-
Can you please explain what the problem is? If you can execute the first command then you should be able to execute the second one.
In first function i am doing Read operation & that was working fine, In second function when i was writing to the same address location, it is not working.
@PraviN3738 said in How to Write data to PCI Device Address from GUI?:
it is not working
Does it work if you try it in a terminal directly?
Please show your code where you're writing.
Also the way you're calling the command is not good: you should pass the parameters for setpci as a string list as shown in the documentation. -
Hi
if it works from commandline directly then try the correct way with parameters.
QString program = "setpci"; QStringList arguments; arguments << "-s" << "00:1c.0" << "10.l=" << "1210ffff"; proc->start(command,arguments );
-
@PraviN3738 said in How to Write data to PCI Device Address from GUI?:
it is not working
Does it work if you try it in a terminal directly?
Please show your code where you're writing.
Also the way you're calling the command is not good: you should pass the parameters for setpci as a string list as shown in the documentation.@jsulm said in How to Write data to PCI Device Address from GUI?:
@PraviN3738 said in How to Write data to PCI Device Address from GUI?:
Does it work if you try it in a terminal directly?
yes, in Linux terminal it is working fine -
Hi
if it works from commandline directly then try the correct way with parameters.
QString program = "setpci"; QStringList arguments; arguments << "-s" << "00:1c.0" << "10.l=" << "1210ffff"; proc->start(command,arguments );
@mrjj sure