Pine Line
0360250 邱聖倫
0360241 吳嘉彬
National Chiao Tung University
1
A simple tool to connect with your friends
System architecture
• PXA
– 7-segment: commnication time
– lcd screen: communication text
– Microphone: voice record
– Keypad: patterns and voice recording
2
System architecture
• Kernal functions
– Pthread: server, recever, keypad
– Timer: 7-segment counting
– Socket: communication
– Mutex: lock socket, users’ data
3
System architecture
4
4
User 1 User 2
send
send receive
Internet
LCD
LCDkeyboard
keyboard
audio output
audio output
receive
microphone
microphone
keypad
keypad
7 segment 7 segment
User BUser A
Socket problem
• Socket
– Peer-to-peer communication
– Client and server have the same port number
– Can not be used for multi-user communication
without central server
5
server
client
server
client
User BUser A
Socket problem
• Solution
– Sever -> receive and server, client -> send
– Sever uses static port number N but receiver and
sender use dynamic port number
6
server
sender
receiver
server
sender
receiver
User A turn off his server and his sender uses port number N to
send a request with his receiver port number to user B. User B
askes his group that user A can join or not.
If yes, user B sends ‘OK’ as ACK to user A; if not, user B sends ‘No’
as ACK to user A.
User BUser CUser DUser A
Socket problem
• Solution
– Sever -> receive and server, client -> send
– Sever uses static port number N but receiver and
sender use dynamic port number
7
server
sender
receiver
server
sender
receiver
User B sends group information to user A through user A’s
receiver port number.
User A sends his information to every member of the group; then,
user A joins the group.
User BUser A
Socket problem
• Solution
server
sender
receiver
server
sender
receiver
User D
server senderreceiver
User C
server senderreceiver
Codec problem
• Codec
– Codec_record
• Recod 4 seconds voice to an inner buffer
• Need to give 4*sample rate
– Codec_play
• Display the inner buffer
– Can read the inner buffer
– Can not write the inner buffer
9
Codec problem
• Codec
– Codec_record
• Recod 4 seconds voice to an inner buffer
• Need to give 4*sample rate
– Codec_play
• Display the inner buffer
– Can read the inner buffer
– Can not write the inner buffer
10

EOS_2015_Fall Team4 - Pine Line

  • 1.
    Pine Line 0360250 邱聖倫 0360241吳嘉彬 National Chiao Tung University 1 A simple tool to connect with your friends
  • 2.
    System architecture • PXA –7-segment: commnication time – lcd screen: communication text – Microphone: voice record – Keypad: patterns and voice recording 2
  • 3.
    System architecture • Kernalfunctions – Pthread: server, recever, keypad – Timer: 7-segment counting – Socket: communication – Mutex: lock socket, users’ data 3
  • 4.
    System architecture 4 4 User 1User 2 send send receive Internet LCD LCDkeyboard keyboard audio output audio output receive microphone microphone keypad keypad 7 segment 7 segment
  • 5.
    User BUser A Socketproblem • Socket – Peer-to-peer communication – Client and server have the same port number – Can not be used for multi-user communication without central server 5 server client server client
  • 6.
    User BUser A Socketproblem • Solution – Sever -> receive and server, client -> send – Sever uses static port number N but receiver and sender use dynamic port number 6 server sender receiver server sender receiver User A turn off his server and his sender uses port number N to send a request with his receiver port number to user B. User B askes his group that user A can join or not. If yes, user B sends ‘OK’ as ACK to user A; if not, user B sends ‘No’ as ACK to user A.
  • 7.
    User BUser CUserDUser A Socket problem • Solution – Sever -> receive and server, client -> send – Sever uses static port number N but receiver and sender use dynamic port number 7 server sender receiver server sender receiver User B sends group information to user A through user A’s receiver port number. User A sends his information to every member of the group; then, user A joins the group.
  • 8.
    User BUser A Socketproblem • Solution server sender receiver server sender receiver User D server senderreceiver User C server senderreceiver
  • 9.
    Codec problem • Codec –Codec_record • Recod 4 seconds voice to an inner buffer • Need to give 4*sample rate – Codec_play • Display the inner buffer – Can read the inner buffer – Can not write the inner buffer 9
  • 10.
    Codec problem • Codec –Codec_record • Recod 4 seconds voice to an inner buffer • Need to give 4*sample rate – Codec_play • Display the inner buffer – Can read the inner buffer – Can not write the inner buffer 10