Click here to Skip to main content
14,699,405 members
Home » Discussions » Linux Programming
   

Linux Programming

 
GeneralRe: OT Pin
Richard MacCutchan25-Jan-20 6:55
mveRichard MacCutchan25-Jan-20 6:55 
GeneralRe: OT Pin
k505425-Jan-20 7:29
mvek505425-Jan-20 7:29 
AnswerRe: Cross compiling for Raspberry PI from windows host using GTK2.0 library Pin
Vaclav_4-Mar-20 6:29
MemberVaclav_4-Mar-20 6:29 
QuestionHow add LD_LIBRARY_PATH before PostgreSQL 10.6 service start Pin
Ngoc tuan nguyen18-Dec-19 18:29
MemberNgoc tuan nguyen18-Dec-19 18:29 
AnswerRe: How add LD_LIBRARY_PATH before PostgreSQL 10.6 service start Pin
Richard MacCutchan18-Dec-19 22:33
mveRichard MacCutchan18-Dec-19 22:33 
AnswerRe: How add LD_LIBRARY_PATH before PostgreSQL 10.6 service start Pin
k505419-Dec-19 5:43
mvek505419-Dec-19 5:43 
SuggestionAn interactive cheatsheet tool for the command-line Pin
denisidoro14-Dec-19 5:08
Memberdenisidoro14-Dec-19 5:08 
Questionbluetooth hci function fails to execute hci_read_class_of_dev Pin
Vaclav_2-Dec-19 9:27
MemberVaclav_2-Dec-19 9:27 
I need a small help finding my bluetooth hci problem.
The attached snippet fails to execute when all passed parameters are correct.

Execution stops at function like wrong parameters are being passed.
But it compiles / links.

For troubleshooting purposes I added 1 to device descriptor parameter and the function run and returns an error as expected.

I am not sure what is the purpose of "to" - time-out parameter?

Here is function prototype

int hci_read_class_of_dev(int dd, uint8_t *cls, int to);


What is odd - to write class I need uint32_t, but read wants only uint8_t.



<pre>#ifdef DEBUG

// verify default hci0 
			system("hciconfig hci0 class");
			cout << "device descriptor " << dev_descriptor << endl;
#endif
			uint8_t *device_class = {0};
			int timeout = 0;
			if (hci_read_class_of_dev(dev_descriptor+1, device_class, timeout)) {
				perror("FAILURE");

			} else {
#ifdef DEBUG
				perror("SUCCESS");
				cout << "@line " << __LINE__ << endl;
#endif
			}



Thanks
Cheers
AnswerRe: bluetooth hci function fails to execute hci_read_class_of_dev Pin
Richard MacCutchan4-Dec-19 0:25
mveRichard MacCutchan4-Dec-19 0:25 
QuestionGit pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
arnold_w8-Nov-19 6:26
Memberarnold_w8-Nov-19 6:26 
AnswerRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
Afzaal Ahmad Zeeshan8-Nov-19 13:24
mvaAfzaal Ahmad Zeeshan8-Nov-19 13:24 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
arnold_w8-Nov-19 22:56
Memberarnold_w8-Nov-19 22:56 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
arnold_w9-Nov-19 4:23
Memberarnold_w9-Nov-19 4:23 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
Richard MacCutchan9-Nov-19 4:38
mveRichard MacCutchan9-Nov-19 4:38 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
arnold_w9-Nov-19 5:13
Memberarnold_w9-Nov-19 5:13 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
Richard MacCutchan9-Nov-19 5:33
mveRichard MacCutchan9-Nov-19 5:33 
GeneralRe: Git pre-commit hook in #!/bin/sh programming language that requires a file to part of all commits? Pin
arnold_w9-Nov-19 6:06
Memberarnold_w9-Nov-19 6:06 
QuestionBest languages for Linux Admins to learn? Pin
StampedePress24-Oct-19 7:12
MemberStampedePress24-Oct-19 7:12 
AnswerRe: Best languages for Linux Admins to learn? Pin
k505424-Oct-19 8:45
mvek505424-Oct-19 8:45 
GeneralRe: Best languages for Linux Admins to learn? Pin
StampedePress24-Oct-19 10:29
MemberStampedePress24-Oct-19 10:29 
Generalwho is on first ? - programming GUI in Linux Pin
Vaclav_27-Sep-19 5:14
MemberVaclav_27-Sep-19 5:14 
GeneralRe: who is on first ? - programming GUI in Linux Pin
k505427-Sep-19 6:48
mvek505427-Sep-19 6:48 
QuestionHow to find all assignments the values to variables,by '=' or by func or as ref value Pin
mamali1289-Aug-19 8:18
Membermamali1289-Aug-19 8:18 
GeneralRe: How to find all assignments the values to variables,by '=' or by func or as ref value Pin
Richard MacCutchan9-Aug-19 22:44
mveRichard MacCutchan9-Aug-19 22:44 
GeneralText Based Game in Bash - Help Wanted Pin
Lucas Whitaker7-Aug-19 7:08
MemberLucas Whitaker7-Aug-19 7:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.