Figured it out. Learn a new thing about C programming again. I don't actually need to pass the variables in as function parameters since everything in visible to the threads anyway :)
So I can...
Type: Posts; User: ojaro
Figured it out. Learn a new thing about C programming again. I don't actually need to pass the variables in as function parameters since everything in visible to the threads anyway :)
So I can...
Hi all,
I am trying to share a character array as shared data container between a pthread and the main program. Not really that experienced in C programming so not able to find out what is wrong...
I am using 3rd party stty library for setting the port. That should be ok since it works on my laptop.
Not sure what is the answer to your host/slave question, but this is what dmesg show on start...
It is USB port on both. The differences between the systems are:
- Laptop runs intel processor with Ubuntu while embedded controller has AMD with Midge/OpenWrt.
- Laptop has a lot more memory
...
Hi all,
I use the following code in order to read from a serial port based on the command I write there first.
write(*dev_fd,pwise_command,PWISE_COMMAND_SIZE);
int p_devbytes = 1;...
Figured it out in the end. Was passing the port the wrong tty settings by accident, hence the bad character encoding.
thank you all for your input.
It seems like I get a different result back everytime(when converting characters to d or x), so starting to think that either there is something wrong with the...
Yeah it should return something like this:
Plugwise protocol unleashed part 1: introduction | Maartendamen's blog
So the data has "\r\n\0" as terminator. If I convert all characters to int one...
My code is as below:
char data[160];
int readbytes;
readbytes = read(fd,data,160);
while(readbytes>0)
{
Hi all. I am writing a simple program that reads from the serial port. I have got the communications working file, but get weird characters after using the read command such as below:
...