Saturday, January 8, 2022
Unit testing
Test everytime before you push to git even though the changes may be simple changes.This is a great tip to be a good programmer
Best practices while coding in 'C' language.
1. how do you optimize 'c' code? Ans: 1. Reduce large 'if' or 'else'blocks.If you return anyway from 'if' condition, don't use 'else'. 2. don't use 'static' variables in embedded code.because they occupy ram for whole life time of system. 3.use 'switch' 'case' instead of if else whenever possible. I cannot give exact explanation.But it reduces unforeseen erros in implementation. 2.Some best practices in 'c' Ans: 1. Always implement proper error handling mechanisms.It will make program fail-safe. 2. Make sure to assign deallocated pointer to NULL after free. 3. put debug logs in failure conditions with error code logging. 4. don't use too many 'if','else' conditions. switch statements are better when handling multiple condition checks. 5. make sure to free allocated memory. 6. don't use magic numbers. use MACROS instead. All the Best.
IoT - The next big thing in technology
Probably you may never heard or heard very little about the next big wave in Technology. The technology is called M2M(Machine-To-Machine) Communications/IoT. The CEOs named it as Internet of Every thing or Internet of Things to be short. So what is M2M? How does it work? M2M means your machines can communicate with each other while you can focus on your core work. Eg: Your car can communicate with the server of your insurance provider to give update about the health of your car and even your driving habits! Your refrigerator can detect if items are depleting in the fridge and order online to your supermarket to refill the food items. The lights in your home switches on automatically the moment you enter your home and not only that in case you forget to switch them off, you can switch off your lights from your mobile phone! So that means M2M has applications in wide ranging fields. Its uses are envisioned from Industrial automation to Home automation,transportation,Health to name a few. There are lot of interesting forums to know about latest in M2M applications.Join Linked in forums to see what is happening almost live about M2M/IoT. Go!Get your visa to fly on IoT applications.
Bluetooth interview questions - part2
Bluetooth interview questions(Reference Bluetooth spec)
1. Explain Bluetooth stack
Ans:
From lower layers:
Controller part:BR/EDR controller - Software
Baseband controller -Hardware
HCI - Firmware
Link Manager - Firmware
Controller part - AMP Controller
AMP MAC & PHY - Hardware
AMP PAL - Firmware
HCI - Firmware
Host:
Hardware to connect with Controller
Physical Bus Firmware(USB,SDIO,Other)
Physical Bus Driver
HCI Controller driver
Other High Level Driver
L2CAP
Host --> Controller
From lower layer
Physical Bus Firmware -over physical bus->Physical Bus Firmware
HCI Driver-over HCI->HCI Firmware
Host can control both BR/EDR controller and several AMP Controllers
High level driver-Host1-->userdata-->Higher level driver- Host2
2.What is ACL in Bluetooth?
http://en.wikipedia.org/wiki/Asynchronous_Connection-Less
3.Explain RS-232
http://en.wikipedia.org/wiki/RS-232
4.What is sniff?
http://developer.nokia.com/community/wiki/Bluetooth_Protocol#Sniff_Mode
5.What is a slot?
6.What is an event?
7.What is Frequency hopping?(AFH)
8.What is Baseband controller?
9.What is paging?
10.What is RFCOMM?
The Village-Part V
Whenever he is in a dilemma,he calls his college classmate for a solution.This time he decided he would not call anyone for help,since it is his own doing.Normally he is an emotionally dependent person something he came to know when he attended a personality workshop.
One thing he has learnt the hardway is that it takes courage to take responsibility for your actions.
Bluetooth interview questions
1. what is BR and EDR? what is the difference?
Ans: BR is basic rate - 1 Mbps
EDR is:Enhanced DataRate-2-3 Mbps
2. Sequence of operations for HFP profile
Ans:HF sends AT+BRSF? to indicate supported features
AG sends +BRSF and OK
AG can support more indications.
So HF sends AT+CIND? to query supported indicators by AG
AG sends +CIND and OK
Finally it queries for Call Handling and multi party features
by sending AT+CHLD?
AG sends +CIND and OK if supports or sends OK if not supported.
3. bluetooth layer hierarchy
from bottom:
Baseband
LMP/L2CAP
RFCOMM/SDP
OBEX/profile(PBAP)
application
4. how many devices can be in piconet?
Ans:7 active slaves and 255 parked slaves.Any of 255 slaves can be activated.
Only one master and all slaves synchronize to clock of Master.
5. what are the codecs used in A2DP?
Ans: SBC is Mandatory
MPEG-1.2 Audio is optional.
There are 2 more optional codecs.
6.what is the frequency modulation method?
Ans:OFDM,adaptive frequencymodulation for interoprability with other wifi networks in ISM band,
Frequency hopping spread spectrum.
7.what is AVDTP Signalling sequence?
IDLE state
CONFIGURED state
OPEN state
STREAMING state
CLOSING state
Endpoint discovery to Stream Release procedure
1.Stream Endpoint Discovery
2.Get capabilities
3.Stream configuration
4.Stream establishment
5. Stream start
6.Stream suspend
7.Stream reconfigure
8. Stream Release
8.what are HCI commands?
1.HCI_CreateConnection
2.HCI_Disconnect
3.HCI_CreateConnectionCancel
4.HCI_AcceptConnection
5.HCI_CreatePhysicalLink
6.HCI_AcceptPhysicalLink.
9.What are bluetooth frequencies?
A. 2400-2480
f=2402+k k=0..75
2 Mhz lower guard frequency
3 Mhz upper guard frequency
LearningNewProgrammingLanguages
1.What is the structure of the language?
2.What is the syntax?
3.How to build?
4.How to resolve build errors?
5.How to add debug statements?
6.How to view your newly added debug statement?
7.What is the output file format?
8.How to add a new module/feature?
9..How to run/execute?
10.How to debug?
11.Learn about Simulator.
12.syntax of loops
13.syntax of conditional statements
Subscribe to:
Posts (Atom)
-
Ramu is naturally an easy-going person.But he lost some of his originality during his stay in hostel.He was looking to regain his original-s...
-
It was a pleasant spring day.Ramu is enjoying the serenity of nature.
-
After screwing up my old blogs by deleting them,I have lost all my old blogs.So I restarted blogging.