Search:

Type: Posts; User: ojaro

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    18,757

    Figured it out. Learn a new thing about C...

    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...
  2. Replies
    7
    Views
    18,757

    pthread and shared variables

    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...
  3. Replies
    5
    Views
    3,867

    I am using 3rd party stty library for setting the...

    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...
  4. Replies
    5
    Views
    3,867

    It is USB port on both. The differences between...

    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
    ...
  5. Replies
    5
    Views
    3,867

    Serial port read/write problem

    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;...
  6. Replies
    10
    Views
    5,448

    Figured it out in the end. Was passing the port...

    Figured it out in the end. Was passing the port the wrong tty settings by accident, hence the bad character encoding.
  7. Replies
    10
    Views
    5,448

    thank you all for your input. It seems like I...

    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...
  8. Replies
    10
    Views
    5,448

    Yeah it should return something like this: ...

    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...
  9. Replies
    10
    Views
    5,448

    My code is as below: char data[160]; int...

    My code is as below:



    char data[160];
    int readbytes;

    readbytes = read(fd,data,160);
    while(readbytes>0)
    {
  10. Replies
    10
    Views
    5,448

    Weird characters after device read

    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:
    ...
Results 1 to 10 of 10