La voix d'Absimiliard

To content | To menu | To search

Tag - raspberryPI

Entries feed - Comments feed

Monday 15 June 2015

A Terminal

Now i found how to make two RaspberryPi communicate together using RFCOMM Bluetooth protocol, I have to see how to implement the terminal part.

On server side i will have to execute a login shell and send all its output to the remote device, and read all its input from the client side.

So i have to fin d a way to fork the execution of bash --login and redirect STDIN and STDOUT ... and some all the small issue that make the terminal usable like :

  • reading each keyboard key without waiting a "return"
  • removing ECHO on STDIN
  • removing ICANON on STDIN
  • handling signal to proper ends terminal SIGCHLD
  • handling signal to adjust tty side : SIGWINCH
  • using pselect to manage FD event
  • using forkpid to create the pty

The sample code is available on my github repository

Friday 12 June 2015

Raspberry in bluez

I wake a morning and water to try to play a bit with bluetooth. So first i decide to see how to make communicate two raspberry PI using RFCOMM socket.

Then i find a really good book that describe how to start with bluez the linux API for bluetooth : An Introduction to Bluetooth Programming

The book contains great sample code to start my tests ... but it was not so easy to make them work.

I give here the main solution I have found to make the RFCOMM sample works.

Continue reading...