0

i use the Raspberry Pi 2 Model B and want use the Raspberry as a Man-in-the-middle.

description what i want to do: I have to catch the incoming data (9-bit protocol 4800 baud) transform them to hexadecimal and set a timestamp for every databyte. Then i want to send the data as stream over USB to my Laptop. on my laptop i must see the datasteam in realtime.

I have experimenting with the Pigio library but i didn´t find an opportunity to catch the datasteam after the incoming bit´s were transformed into bytes is that possible? Is it possible to convert the byte´s into hexadecimal not decimal? And is it possible to set a timestemp to every byte in microseconds at the beginn of the recording? So that i finally send a datastream e.g. timestamp hexbyte timestamp hexbyte... over the USB to the laptop.

I hope someone can help me and i say thanks ahead

0

You will have to write your own code to meet those requirements.

pigpio will read the serial data and place it into a buffer. It does not time-stamp each data byte.

Apart from that requirement the rest you can do with pigpio and is just a standard programming exercise (with the possible exception of USB to laptop as it is not clear what you mean by that).

  • Ok thanks then i write my own software Uart for my projekt. – sniffi May 12 '16 at 5:11
  • @sniffi To work it will probably have to be based upon pigpio. If I were you I'd just modify pigpio's bit bang serial receive routine to save a time-stamp for each 9-bit byte. – joan May 12 '16 at 8:16
  • Ok i will try it. I already have wrote now my own Software Uart which set a timestamp im microseconds per byte. I synchronize the datasteam at every startbyte(zero) i hope that works. Now i must lock how can i take the incoming datasteam an give them over a data inputstream into my Uart. When that works i must look how can i steam the datasteam into my laptop over USB or ethernet. – sniffi May 12 '16 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.