bluez how to

合集下载

初中英语作文如何解决蓝色的案子

初中英语作文如何解决蓝色的案子

初中英语作文如何解决蓝色的案子全文共10篇示例,供读者参考篇1Once upon a time, there was a big problem at our school. It was called the "Blue Case." The students in the junior high department were freaking out because someone kept turning everything blue - the classroom walls, the teachers' desks, even the school mascot!We, the clever little primary school students, decided to take matters into our own hands and solve this mysterious case. We put on our detective hats (which were actually just our colorful caps) and started investigating.First, we gathered clues from the scene of the crime. We found blue paint cans hidden in the janitor's closet and blue footprints leading to the cafeteria. Then, we interviewed witnesses like the school janitor, the lunch lady, and the school mascot. We even interrogated the school pets - Fluffy the hamster and Sparky the goldfish.After hours of searching and questioning, we finally cracked the case. It turned out that the culprit was none other thanTommy, the mischievous fifth-grader who loved playing pranks. He confessed to the crime and apologized for his actions.To prevent any more incidents like the Blue Case, we came up with a plan. We created a school rule that prohibited students from bringing paint cans to school without permission. We also started a school beautification project to repaint the walls and desks back to their original colors.In the end, the Blue Case was closed, thanks to the hard work and determination of us little detectives. We learned that teamwork, perseverance, and a little bit of creativity can solve even the bluest of problems. And most importantly, we learned that it's always important to follow the rules and be responsible for our actions.篇2Once upon a time, there was a big problem in our school - the blue pen mystery! Students in the middle school found that their blue pens were always missing. They couldn't figure out who was taking them and where they were going.So, we decided to come up with a plan to solve the case. We formed a detective group with some of the smartest students in the school. We called ourselves the Blue Pen Detectives. Our firststep was to gather evidence. We asked the students who had lost their blue pens to tell us when and where they last saw them.After collecting all the information, we started investigating. We checked every corner of the school, from the classrooms to the library to the gym. We followed clues and interviewed suspects. We even set up a trap with a fake blue pen to catch the thief in action.Finally, after days of hard work, we cracked the case. It turned out that the blue pens were being taken by a group of mischievous fourth graders who thought it would be funny to play a prank on the middle school students.We confronted the fourth graders and they confessed to their crime. They apologized and promised to return all the blue pens they had taken. We also came up with a solution to prevent this from happening again - we decided to organize a pen sharing program to make sure everyone had access to pens of all colors.In the end, we were proud of ourselves for solving the blue pen mystery and bringing peace back to our school. The Blue Pen Detectives had done it again!篇3Hey guys, have you ever heard of the Blue Case in middle school English class? It's a tricky situation where you have to solve a mystery using your English skills. But don't worry, I'm here to help you out!First of all, let's talk about how to approach the Blue Case. The most important thing is to pay attention to details. Listen carefully to the clues given in the case and write them down in your notebook. This way, you won't miss any important information.Next, you should brainstorm some ideas with your classmates. Two heads are better than one, right? Discuss the case together and try to come up with different theories. Don't be afraid to think outside the box!After that, it's time to put your English skills to the test. Use your grammar and vocabulary knowledge to analyze the clues and draw conclusions. Remember to use proper sentence structure and clear explanations to support your ideas.Finally, don't forget to review your work before submitting it. Check for any spelling or grammar mistakes, and make sure your writing is well-organized and easy to understand.So there you have it, guys! By following these steps, you'll be able to solve the Blue Case in no time. Just remember to stay calm, think critically, and use your English skills to crack the case. Good luck!篇4How to Solve the Blue CaseHey guys, have you heard about the blue case in our school? It's such a mystery! The blue case is about the mysterious disappearance of the school's mascot, a cute blue teddy bear named Bluey. Everyone in the school is talking about it and trying to solve the case.First of all, we need to gather all the clues and evidence to find out who took Bluey. We can search the school grounds and ask our classmates if they saw anything suspicious. Maybe someone saw the culprit or knows something about the disappearance.Next, we should work together as a team to brainstorm ideas and come up with possible suspects. Maybe it was the jealous rival school trying to sabotage us, or maybe it was a prank gone wrong. We need to think outside the box and consider all possibilities.After that, we can set up a detective club and take turns investigating the case. We can search the classrooms, lockers, and even the teacher's lounge for any sign of Bluey. We need to be thorough and diligent in our search.Finally, we should organize a school assembly and present our findings to the whole school. We can share our theories and ask for help from our classmates. Maybe someone will come forward with valuable information that will help us solve the case.In the end, we must remember to stay positive and never give up. With perseverance and teamwork, I'm sure we can crack the case and find Bluey. Let's put our detective hats on and solve the blue case together!篇5How to Solve the Blue Case in Middle SchoolHi everyone! Today I want to talk to you about a blue case that happened in our school recently. It's super important to solve this case because we want our school to be a safe and happy place for everyone. So, let's brainstorm some ideas on how we can solve the blue case together!First, we should all remember to be kind to each other. If we see someone feeling sad or left out, we should try to cheer them up and be a good friend. Being kind can help prevent bad things from happening in the first place.Second, we should talk to a teacher or an adult if we see something suspicious or if someone is being mean to others. Speaking up can help prevent the blue case from getting worse and can help us find out who is responsible.Third, we should work together as a team to gather clues and information about the blue case. Maybe we can create a detective club or hold a secret meeting to share what we know. By working together, we can solve the case faster and make our school a better place.Finally, we should never give up hope. Even if the blue case seems difficult to solve, we should continue to brainstorm ideas and work together to find a solution. With teamwork and determination, we can crack the case and make our school safe and happy again.In conclusion, solving the blue case is a big challenge, but if we work together and never give up, we can make our school a better place for everyone. Let's all do our part to solve the caseand spread kindness and positivity in our school. Thank you for listening!篇6How to Solve the Mystery of the Blue CaseHey everyone! Today I’m gonna tell you about this super cool mystery we had to solve in our English class. It all started when our teacher, Mrs. Smith, gave us this blue case to investigate. Inside the case, there were clues and puzzles that we had to figure out in order to solve the mystery.First, we found a mysterious note that said, “Follow the blue path to find the key.” We were like, “What blue path?” So we went outside and saw a trail of blue ribbons leading into the woods behind our school. We followed the ribbons and found a locked box at the end of the path. Luckily, we found the key hidden under a rock nearby and unlocked the box.Inside the box, there were more clues that led us to different places around the school. We had to solve riddles and puzzles to move on to the next clue. It was so much fun working together with my friends to crack the codes and find the next clue.Finally, after hours of searching and solving puzzles, we found the culprit who had stolen the blue case. It was our school janitor, Mr. Johnson! He had taken the case because he wanted to play a prank on Mrs. Smith. We were all shocked, but also relieved that we had solved the mystery.In the end, Mrs. Smith thanked us for our hard work and teamwork in solving the mystery. We all felt like real detectives and had so much fun solving the blue case. It was definitely a mystery to remember!That’s it for today, guys. Remember, teamwork and problem-solving skills are super important when it comes to solving mysteries. Until next time, stay curious and keep exploring! Bye!篇7Title: How to Solve the Blue Case in Junior High School English EssayHello everyone! Today, I want to talk about how to solve the blue case. It's a mystery that needs to be solved using our Junior High School English skills. Are you ready? Let's dive into it!First, we need to gather clues. Clues are pieces of information that can help us solve the case. We can find clues in the text we read, the conversations we have, and the actions of the people involved in the case. Pay attention to details and write down all the important information you find.Next, we need to analyze the clues. This means we need to think about what each clue tells us and how it fits into the big picture. Ask questions like who, what, when, where, why, and how. Look for patterns and connections between the clues to help you make sense of the case.After analyzing the clues, it's time to make a hypothesis. A hypothesis is a possible explanation for the case based on the clues you have gathered. It's like making an educated guess about what might have happened. Remember to support your hypothesis with evidence from the clues.Once you have a hypothesis, it's time to test it. Look for more clues or information that can either confirm or refute your hypothesis. If new evidence contradicts your hypothesis, be open to revising your ideas and coming up with a new one.Finally, when you have gathered enough evidence and tested your hypothesis, it's time to solve the case. Write a conclusion that explains what happened and how you reachedyour solution. Make sure to use your Junior High School English skills to present your findings clearly and convincingly.In conclusion, solving the blue case in Junior High School English requires critical thinking, analysis, and communication skills. By following these steps, you can effectively solve any mystery and become a master detective in English class. Good luck!篇8Once upon a time, there was a blue case in our school. Everyone was talking about it and trying to figure out how to solve it. It was a real mystery! The teachers couldn't solve it, the principal couldn't solve it, even the police couldn't solve it.But then, the students of our school decided to take matters into their own hands. We formed a detective club and started investigating the case. We looked for clues, interviewed witnesses, and tried to piece everything together. It was like we were in a real-life detective movie!After days of hard work and lots of brainstorming, we finally cracked the case. It turns out, the blue case was actually a prank played by some naughty students. They thought it would befunny to leave the case in the middle of the schoolyard and watch everyone freak out about it.But thanks to our detective skills and teamwork, we were able to solve the case and bring the pranksters to justice. The whole school was impressed by our determination and intelligence. We even received a special award from the principal for our hard work.In the end, the blue case turned out to be just a silly prank, but it taught us an important lesson about working together and using our brains to solve problems. We may be young, but we can do anything if we put our minds to it. Who knows, maybe we'll become real detectives one day!And that's how we solved the mystery of the blue case. Thank you for reading our story!篇9Oh! Hi everyone! Do you know what to do if you have a blue mood? Today I want to tell you how to solve the blue case!First, when you feel blue, you can try to talk to your friends or family. They can give you some warm words to comfort you. And you will feel better after chatting with them.Second, you can also try to do some exercise, like running, jumping, or dancing. Exercise can make you feel relaxed and release your stress. So you can forget about the blue mood.Third, you can listen to your favorite music or watch a funny movie. Music and movies can make you feel happy and forget the sad things. So just turn on your favorite song and dance along!Fourth, you can write a diary or draw a picture to express your feelings. Writing and drawing can help you release your emotions and make you feel better. You can write down what makes you sad and find a way to solve it.Remember, it's important to talk to someone when you have a blue mood. Don't keep it to yourself. And always remember that there are always ways to solve the blue case. Stay positive and keep smiling!篇10Title: How to Solve the Blue Case in Junior High School English CompositionHey guys, today let's talk about how to solve the blue case in junior high school English composition. Have you ever felt stuckwhen you see a blue theme for your writing assignment? Don't worry, I'll share some tips with you to make it easier!First of all, when you see a blue case, don't panic! Take a deep breath and think about what the color blue represents to you. Is it calm and peaceful like the sky or the ocean? Or maybe it reminds you of sadness or loneliness? Once you have a clear idea of how you feel about the color blue, you can start brainstorming ideas for your composition.Next, try to come up with a story or a scenario that is related to the color blue. For example, you could write about a character who is feeling blue because they lost their favorite blue toy. Or you could write about a magical blue creature that helps people with their problems. The key is to be creative and think outside the box!After you have a solid idea for your composition, start writing! Remember to use descriptive language to paint a vivid picture in your reader's mind. Use adjectives to describe the shade of blue, the texture, and the mood it evokes. Also, don't forget to include dialogue between characters to make your story more engaging.Finally, don't forget to edit and revise your composition before turning it in. Check for spelling and grammar errors, andmake sure your ideas flow smoothly from paragraph to paragraph. Ask a friend or a teacher to read your composition and give you feedback so you can make improvements.So there you have it, guys! With these tips, you'll be able to solve the blue case in your junior high school English composition like a pro. Stay creative and have fun with your writing! Good luck!。

海南省临高中学2024学年高三第四次模拟考试英语试卷(含解析)

海南省临高中学2024学年高三第四次模拟考试英语试卷(含解析)

海南省临高中学2024学年高三第四次模拟考试英语试卷注意事项:1.答题前,考生先将自己的姓名、准考证号填写清楚,将条形码准确粘贴在考生信息条形码粘贴区。

2.选择题必须使用2B铅笔填涂;非选择题必须使用0.5毫米黑色字迹的签字笔书写,字体工整、笔迹清楚。

3.请按照题号顺序在各题目的答题区域内作答,超出答题区域书写的答案无效;在草稿纸、试题卷上答题无效。

4.保持卡面清洁,不要折叠,不要弄破、弄皱,不准使用涂改液、修正带、刮纸刀。

第一部分(共20小题,每小题1.5分,满分30分)1.In th e past few years, we’ve seen works by Chinese sci-fi writers winning international ______.A.conclusion B.standardC.potential D.recognition2.—Why can’t you give me another chance?—________, but I don’t think you are good at management.A.No offence B.No worries C.No need D.No wonder3.The man ________ the fake news that 18 firefighters lost their lives in the explosion was arrested.A.having circulating B.to circulateC.circulating D.to have circulated4.—Hi, Mary. I’m coming, but it’s snowing and traffic is moving slowly.—________, Jack. We’ll wait for you. Then we can have dinner together.A.Take your time B.Don’t be seriousC.What a day D.You are kidding5.Most graduates in big cities are suffering form connected to soaring house prices and job hunting. A.curiosity B.eagerness C.thirst D.anxiety6.Hot the night air was,we slept deeply because we were so tired after the long journey.A.although B.while C.as D.however7.Why do many students stick to private tutoring _____ they could easily master such knowledge at school? A.unless B.before C.after D.when8.Agatha didn’t tell me ______ she would pick up her son from school.A.which B.whenC.where D.what9.Up till now, there has been no scientific evidence about ________ caused the death of dinosaurs.A.what is it that B.what it was that C.it was what D.what is it10.---Do you think Peter is a good partner?--- Not really! There are some things that are not easy to ________ , and his laziness is one.A.put aside B.put up withC.think of D.get along with11.NASA has made a ________ that our earth has no threat associated with the film 2012 which is based on pure myths.A.clarification B.classification C.identification D.presentation12.People tend to love agricultural products ________ without the use of fertilizers, pesticides or chemical additives. A.growing B.grownC.being grown D.having been grown13.The books on the desk, covers are shiny, are prizes for us.A.which B.what C.whose D.that14.The cost of living in big cities ________ steadily for many years,and it has led some youths to drop out of the big city race.A.is climbing B.is being climbedC.has been climbing D.has been climbed15.-I hear Iron Man III is on recently. Let’s set off for the cinema to a ppreciate it now.-________ It’s about 10 PM. I’m so tired that I must go to bed.A.Let’s find some of the action. B.How do you find it?C.It’s entirely up to you. D.You can’t be serious.16.In the students’ eyes, Mrs Smith is a mother more than a t eacher. she treats the students just like her own children.A.As a result B.In other words C.What is more D.First of all17.______in painting, John didn’t notice evening approaching.A.To absorb B.To be absorbedC.Absorbed D.Absorbing18.John, ________ money was now no problem, started a new company with his friends.A.for whose B.of whoseC.of whom D.for whom19.It came as a great ________ to the parents that their son finally came back safe and sound.A.relief B.senseC.relaxion D.favor20.Zhouqu, Gansu was attacked by such a terrible mud-rock flow few residents had ever experienced before.A.as B.which C.where D.that第二部分阅读理解(满分40分)阅读下列短文,从每题所给的A、B、C、D四个选项中,选出最佳选项。

Bluez的编译过程与方法

Bluez的编译过程与方法

编译前的目录位置说明
• • • • 1、指定安装位置 /home/hdl/autobuild/hdl/Bluetooth/lib 2、Linux-2.6.28内核之include /home/hdl/autobuild/hdl/test/kernel/Linux2.6.28/include
编译过程与方法
• 解决办法: • bluez-4.48\network\Makefile中去掉`-fvisibility=hidden'
编译过程遇到问题及解决办法
• • • • • • • • • • • • • • • 编译bluez-4.48 CC main.lo CC manager.lo CC server.lo CC bridge.lo CC connection.lo CC common.lo CCLD Making all in serial CC main.lo cc1: error: unrecognized option `-fvisibility=hidden' make[2]: *** [main.lo] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 [hdl@vsserver1 bluez-4.48]$
编译前说明及注意事项
• 1、四种方案均可,所选库根据编译器及库 之间的兼容性而定,库版本并不唯一 • 2、所选各库版本尽量偏低,避免带来意想 不到的错误,导致无法编译通过 • 3、dbus库可依赖expat或libxml,默认是 expat,建议用expat • 4、glib库版本过高,可能会用到zlib库 • 5、bluez-4.x以上版本,编译时需要用到 linux内核中的/include/linux/sockios.h

蓝莓之夜中的经典台词对白

蓝莓之夜中的经典台词对白

蓝莓之夜中的经典台词对白蓝莓之夜主要讲述诺拉·琼斯扮演的爱吃蓝莓派的年轻女孩子,她在一段横越美国的旅程中遇到许多不同的人,试图寻找生命与爱情的真谛,并在不知不觉中和裘德·洛扮演的杂货店老板陷入了爱河,今天小编带给大家的是蓝莓之夜的经典台词,希望你能喜欢。

蓝莓之夜的经典台词欣赏1、你要去哪里?其实我也不知道我要去哪儿只是去我该去的地方。

2、但是,有时即使你有钥匙也不可能打开某些门,难道不是吗?3、分开不代表说再见,或许是更好地去面对未来。

4、在过去的几天里,我一直都在学着不要去相信别人。

我很高兴我失败了。

有时我们把别人当作一面镜子去定义自己去告诉自己“我们是谁”。

5、那几乎花费了我一年的时间到达那。

其实,穿越一条街根本就不难。

那取决于街的那一头谁在等你。

6、一个人总要走陌生的路,看陌生的风景,听陌生的歌,然后在某个不经意的瞬间,你会发现,原本是费尽心机想要忘记的事情真的就那么忘记了。

7、我猜我只是想去找到一个理由我看来…有些时候不知道也许会更好还有些时候根本就没有理由。

8、甚至那些门打开着,我找的人也不一定在那。

9、你为什么不去找她她曾经说过如果有一天我走丢了就在原地等着她会来找我。

10、几乎用了一年的时间让自己来到这里最后才发现其实穿越这条马路并不是那么的难只需要看街道的对面你在等着的是谁。

11、你还保存着那些钥匙么?12、我曾经希望他死掉,我认为那是唯一可以让我清醒的方法。

但是现在他真的死了,这却比世界上任何事情都让我心痛。

13、当你离开之后所有记忆中留下的事情只是组成了另一个人的生活。

14、是的,我依旧记得你说的那些话,我没有把它们丢弃,关于永远不要关闭那些门的话。

15、或许是其中一个人跟随其他人走开了或许是感觉走开了。

16、如果我把这些钥匙丢掉那些门将永远都不会打开。

17、我抬起头看看那扇窗子我明白原来我站在了错误的一侧。

18、我总觉得有许多话想对你说,随信附赠上我为你制作的账单,为了我们共同的记忆。

蓝牙编程经典程序!

蓝牙编程经典程序!
4.3.1. Maximum Transmission Unit
Occasionally, an application may need to adjust the maximum transmission unit (MTU) for an L2CAP connection and set it to something other than the default of 672 bytes. In BlueZ, this is done with the getsockopt and setsockopt functions.
// allocate socket
s = socket(AF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
// bind socket to port 0x1001 of the first available
// bluetooth adapter
loc_addr.l2_family = AF_BLUETOOTH;
int main(int argc, char **argv)
{
struct sockaddr_l2 loc_addr = { 0 }, rem_addr = { 0 };
char buf[1024] = { 0 };
int s, client, bytes_read;
socklen_t opt = sizeof(rem_addr);
}
// close connection
close(client);
close(s);
}
Example 4-5. l2cap-client.c
#include <stdio.h>

blue whale 初一英语作文

blue whale 初一英语作文

Blue Whale: Gentle Giants of the OceanEnglish Version:The blue whale, known as the largest animal to have ever lived on Earth, holds a captivating fascination for both scientists and nature lovers alike. Roaming the depths of the vast oceans, these gentle giants evoke a sense of awe and wonder in all who encounter them.Measuring up to 30 meters in length and weighing as much as 200 tonnes, the blue whale is a true marvel of nature. Its sleek, streamlined body is designed for swift and efficient swimming, allowing it to traverse the ocean with ease. The dark blue-gray hue of its skin, which blends seamlessly into the depths of the sea, serves as a perfect camouflage against predators.Despite their imposing size, blue whales are surprisingly gentle creatures. They feed primarily on tiny krill, filtering vast quantities of seawater through their baleen plates to extract their nutritious prey. This peaceful feeding behavior contrasts sharply with their colossal stature, emphasizing their gentle nature.One of the most captivating aspects of the blue whale is its song. Males emit a series of complex, low-frequency vocalizations that can travel for hundreds of miles underwater. These haunting melodies, which have been compared to the sounds of a distant organ or chorus, have captivated researchers and inspired countless myths and legends.However, the future of the blue whale is uncertain. Threatened by habitat destruction, pollution, and collisions with ships, these majestic creatures are now classified as endangered. Efforts to protect and conserve them, including establishing marine protected areas and reducing human impacts on their habitat, are crucial if we hope to ensure their survival for generations to come.In conclusion, the blue whale stands as a testament to the wonder and diversity of our planet's oceans. With its colossal size, gentle nature, and enchanting songs, it serves as a reminder of the importance of preserving and respecting the delicate balance of our natural world.Chinese Translation:蓝鲸:海洋中的温柔巨人蓝鲸,作为地球上曾经存在过的最大动物,对科学家和自然爱好者来说都充满了迷人的魅力。

小学上册第十三次英语第5单元综合卷

小学上册英语第5单元综合卷英语试题一、综合题(本题有100小题,每小题1分,共100分.每小题不选、错误,均不给分)1.I call my dad “.”2.The __________ (历史的遗产) is a shared treasure.3.I want to _______ (学习) how to cook.4.What do you wear on your feet?A. HatB. ShoesC. GlovesD. ScarfB5.What is the name of the fairy who helps Peter Pan?A. TinkerbellB. CinderellaC. Snow WhiteD. ArielA6.We will _______ (decorating) the tree for Christmas.7.I like to ___ with my family. (spend time)8.Which one is not a fruit?A. AppleB. CarrotC. BananaD. OrangeB9.What do you call the warm-blooded animals that give birth to live young?A. ReptilesB. AmphibiansC. MammalsD. Birds10.What is the capital of the Solomon Islands?A. HoniaraB. GizoC. AukiD. TulagiA11.What is the capital of the Maldives?A. MaleB. Addu CityC. FuvahmulahD. Laamu AtollA Male12.What is the color of a traditional school bus?A. BlueB. YellowC. GreenD. RedB13.What is the term for a baby cat?A. KittenB. PupC. CalfD. CubA14.How many vowels are in the English alphabet?A. FiveB. SixC. SevenD. Four15.The __________ (种植时间) is important for success.16.The weather is _____ today. (nice)17. A weasel is very ________________ (灵活).18.I love to _____ (harvest) fresh herbs from my garden.19.How many colors are in a rainbow?A. 5B. 6C. 7D. 820.The ________ (海洋研究) unveils mysteries of the deep.21.My aunt loves __________ (缝纫).22.The __________ (历史的教训) should not be forgotten.23.I write with a _____ (钢笔).24.What is the opposite of 'happy'?A. SadB. AngryC. ExcitedD. Tired25.Acids feel sour, while bases feel _____.26.I love to explore with my toy ____ by my side. (玩具名称)27.I like to watch ______ (cartoons) on weekends.28. A mouse can squeeze through tiny ______ (缝隙).29.The chemical symbol for zinc is __________.30.I love to ___ in the rain. (dance)31.What do you call the place where we go to exercise?A. GymB. StoreC. SchoolD. Office32.My brother’s birthday is in __________. (月份)33.An atom’s ma ss is concentrated in its ______.34.The __________ (隧道) allows cars to pass through the mountain.35.Which day comes after Friday?A. SaturdayB. SundayC. MondayD. Tuesday36.What is 10 4?A. 5B. 6C. 7D. 8B37.I can have fun exploring with my ________ (玩具).38.The rabbit can be a good _________. (宠物)39. A cockroach can survive without ______ (食物) for weeks.40.What is the capital of Australia?A. SydneyB. MelbourneC. CanberraD. Brisbane41.选词填空,将词语写在四线三格内。

蓝线PTZ摄像头说明书

High Quality PTZ Camera Lights Up For Any BudgetBlue Line■ Gold-Standard Advantages■ Quality and Operation - No Compromises ■ Standard Workflow Integration■ ProAV, UC and light broadcast application ■ Feature Key Words • FHD/4K60• HDMI, SDI, USB, IP • Precision and Fine Control • AI Featured Capability • Compatibility and Integration ■ Economical SolutionBlue Line PTZ CameraBolin Blue-Line PTZ Camera FocusBolin's newly created Blue-Line PTZ cameras, now offer gold-standard features at an affordable price. Part of Bolin's PTZ camera manufacturing principle is to never compromise on image quality, industrial video standards, and end user experience on PTZ control operation.Bolin Blue-Line PTZ camera focuses on delivering essential pro features to clients looking to outfit a lightweight AV system. High quality video from Full HD to 4K 60p resolution and standard control protocols essential in ProAV, UC, and light broadcast applications.Bolin’s commitment to the quality of the Blue-Line series cameras, includes the integration of cutting-edge technologies, such as an AI-powered engine - enabling precise Face Centric Smart Focus and Auto-Exposure. In addition, the fitting of Sony’s 1-inch sensor image block from our best-seller flagship product to selected blue-line camera offers to deliver pro-quality Sony DNA brilliant images to the mega-screen.Bolin Blue-Line PTZ camera is just the beginning, and we're planning to bringmany more pro-AV products to the market tobridge the gap between value and cost.High Quality Imaging - Full HDBolin’s Bolin’s Blue Line PTZ cameras are equipped with Sony senor to provide brilliant, high-quality images in 1080p60 and 4K(2160) resolutions with 10 to 20x optical zoom.Video OutputAll Blue Line PTZ cameras deliver IP streaming video to network with local HDMI video and USB streaming to PC software for conventional video production and cloud based video conferencing applications. Cameras with 20X zoom range and 4K60 cameras also provides 3G-SDI, lossless baseband video for live production and light broadcast use.Video SettingsImage parameter adjustments include exposure, focus, iris, shutter speed, white balance, gamma, wide dynamic range, E-flip/mirror and more with configurable video settings.AI Featured Smart Focus and ExposureBuilt with Bolin’s latest AI-powered face analytical engine which enables precisesmart focus and smart exposure to bring customer a greater level of user experience and effective image quality improvement in a complex user invironment.AudioHDMI/SDI/USB and IP video streaming signal has high–quality audio streaming embedded B2-210/B2-220FHD 10X/20XB7-220FHD 20XFEATURE OVERVIEWBlue Line PTZ Camera Models B6-220/B6-420FHD 20X/4K60 20XB9-4124K30 12XKEY FEATURESPTZ MovementExtremely quiet and smooth operation for Pan/Tilt movements combined with enhanced adaptive, variable, and super slow speed control provides accurate and effective opera-tion experiences. Picture Profile Preset: Image parameter settings restored with presets and quick access operation.Remote Control and Setup PTZ CameraBolin’s Blue Line PTZ cameras support serial RS232/RS422 control, Visca over IP con-trol over network. Remotely control pan, tilt, zoom movements with full access to cam-era’s image parameter settings via keyboard controller or IR controller.Ease of Installation and UseUse Bolin mounting accessories and simply connect one network cable with POEenabled ethernet network/POE device, or RJ45 port cable connection for serial control wiring makes the installation easy.Always Up to DateFree and easy firmware update via IP interface to keep camera features and perfor-mance up to date and even for customized function upgrades.B2-210B2-220B6-220/B6-420B7-22010X20X20XORDER INFORMATION• B2-210 (FHD, 10X Zoom, Black) • B2-220 (FHD, 20X Zoom, Black)• B2-210W (FHD, 10X Zoom, White) • B2-220W (FHD, 20X Zoom, White)• B6-220 (FHD, 20X Zoom, Gray) • B6-420 (4K60, 20X Zoom, Gray)DIMENSIONSACCESSORIESVCC-RC-2IR Remote Controller VCC-P12-212VDC 2A Power AdapterVCC-CC45RSRJ45 To RS232/RS422/485 AdapterVCC-WMWall Mount Bracket-Optional VCC-CMCeiling Mount Bracket-OptionalUnit: mmB2-210/B2-220B6-220/B6-420B7-220。

我为蓝鸟代言英文作文

我为蓝鸟代言英文作文英文回答:As the entrancing azure blue of skies above, Bluebird stands as a beacon of hope and inspiration, its presence evoking an innate connection with our aspirations and dreams. Its effortless grace and captivating symphony of melody have captured the hearts of countless souls around the globe, captivating imaginations and stirring emotions.Through its mesmerizing performances, Bluebird has become an embodiment of artistry and authenticity, its ability to transcend cultural boundaries and connect with diverse audiences a testament to its universal appeal. Each note, each chord, and each lyric is imbued with an unyielding passion and unwavering dedication to the art of music.Bluebird's commitment to excellence is evident in every aspect of its performances, from the meticulous attentionto detail in its music to the vibrant stage presence that captivates audiences. It is through this unyielding pursuit of perfection that Bluebird has established itself as a symbol of quality and innovation, inspiring countless others to strive for greatness.Beyond its musical prowess, Bluebird is a champion of human connection and understanding. Through its music, it fosters a sense of community and belonging, reminding us that we are all interconnected and part of something larger than ourselves. Bluebird's message of hope and unity resonates within us, inspiring us to embrace our differences and celebrate the beauty of diversity.It is with great honor and unwavering enthusiasm that I align myself with Bluebird, recognizing the immense power and influence it holds in our world. As its ambassador, I am committed to spreading its message of artistry, authenticity, excellence, and human connection to every corner of the globe.Together, we shall embrace the limitless possibilitiesthat lie ahead, soaring above obstacles and reaching new heights of inspiration. Bluebird's legacy will continue to inspire generations to come, and I am honored to play arole in this extraordinary journey.中文回答:作为蓝天之上迷人的蔚蓝色,Bluebird 作为希望和灵感的灯塔屹立着,它的存在唤起了我们与抱负和梦想的内在联系。

[BlueZ]2、使用bluetoothctl搜索、连接、配对、读写、使能notify蓝牙。。。

[BlueZ]2、使⽤bluetoothctl搜索、连接、配对、读写、使能notify蓝⽛。

星期三, 05. 九⽉ 2018 02:03上午 - beautifulzzzz⽬录1、前⾔上⼀篇讲了如何编译安装BlueZ-5,本篇主要在于玩BlueZ,⽤命令⾏去操作BLE设备:2、gatttool —— ⽼⼯具趟坑刚开始跟着操作gatttool,发现坑太多(主要原因是⼯具⽼了):采⽤sudo gatttool -b 4D:69:98:0E:91:5E -I 去连接发现会报错:Error: connect error: Connection refused (111)最终参考LINK-11发现需要加random选项():➜ ~ sudo gatttool -b 4D:69:98:0E:91:5E -I[4D:69:98:0E:91:5E][LE]> connectAttempting to connect to 4D:69:98:0E:91:5EError: connect error: Connection refused (111)[4D:69:98:0E:91:5E][LE]> exit➜ ~ sudo gatttool -t random -b 4D:69:98:0E:91:5E -I[4D:69:98:0E:91:5E][LE]> connectAttempting to connect to 4D:69:98:0E:91:5EConnection successful[4D:69:98:0E:91:5E][LE]>(gatttool:3104): GLib-WARNING **: Invalid file descriptor.过⼀回会10S⾃动断开,⽹上说这个⼯具⽼了,不建议⽤了():There are new tools to use with GATT, bluetoothctl/bluetoothd is the preferred since with that you have GAP, etc, but if want to use a stand alone tool then I suggest you use btgatt-client.3、bluetoothctl——NB的新⼯具命令⾏进⼊bluetoothctl操作环境():bluetoothctl我在⼿机上⽤lightblue模拟⼀个BLE设备ty_prod,之后对其service进⾏修改,调⽤scan on进⾏搜索还是⽼的,最终发现要先⽤remove移除之前的设备,之后再scan就会出现[NEW] Device 72:3B:E1:81:4E:4F ty_prod设备注:⽤lightblue模拟的设备的MAC不是固定的注:我发现在lightblue中⽆论怎么模拟BLE设备,⼀旦被连上搜索到的service都是IPone的[bluetooth]# devicesDevice 28:ED:6A:A0:26:B7 ty_prodDevice 58:71:33:00:00:24 Bluetooth KeyboardDevice 00:1A:7D:DA:71:0A SHEN-PCDevice 94:87:E0:B3:AC:6F Mi Phone[bluetooth]# remove 28:ED:6A:A0:26:B7...[bluetooth]# scan onDiscovery started[NEW] Device 72:3B:E1:81:4E:4F ty_prod[bluetooth]# scan off...Discovery stopped[bluetooth]# connect 72:3B:E1:81:4E:4FAttempting to connect to 72:3B:E1:81:4E:4F[CHG] Device 72:3B:E1:81:4E:4F Connected: yesConnection successful[ty_prod]索性就⽤IPhone⾃带的服务做测试了~[ty_prod]# infoDevice 28:ED:6A:A0:26:B7 (public)Name: tuya_mdev_testAlias: tuya_mdev_testAppearance: 0x0040Icon: phonePaired: yesTrusted: noBlocked: noConnected: yesLegacyPairing: noUUID: Fax (00001111-0000-1000-8000-00805f9b34fb)UUID: Generic Access Profile (00001800-0000-1000-8000-00805f9b34fb)UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)UUID: Current Time Service (00001805-0000-1000-8000-00805f9b34fb)UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)UUID: Battery Service (0000180f-0000-1000-8000-00805f9b34fb)UUID: Vendor specific (7905f431-b5ce-4e99-a40f-4b1e122d00d0)UUID: Vendor specific (89d3502b-0f36-433a-8ef4-c502ad55f8dc)UUID: Vendor specific (9fa480e0-4967-4542-9390-d343dc5d04ae)UUID: Vendor specific (d0611e78-bbb4-4591-a5f8-487910ae4366)[CHG] Device 28:ED:6A:A0:26:B7 ServicesResolved: no[CHG] Device 28:ED:6A:A0:26:B7 Connected: no我们⽤Current Time Service,列出所有attributes操作如下:[tuya_mdev_test]# menu gatt[tuya_mdev_test]# list-attributes 28:ED:6A:A0:26:B7...Primary Service/org/bluez/hci0/dev_47_B1_26_C1_81_18/service004100001805-0000-1000-8000-00805f9b34fbCurrent Time ServiceCharacteristic/org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char004500002a0f-0000-1000-8000-00805f9b34fbLocal Time InformationCharacteristic/org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char004200002a2b-0000-1000-8000-00805f9b34fbCurrent TimeDescriptor/org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char0042/desc004400002902-0000-1000-8000-00805f9b34fbClient Characteristic Configuration...上⾯Current Time Service对应的服务如下图:我们选择Current Time进⾏操作UUID:0x2A2B[ty_prod]# select-attribute /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char0042[tuya_mdev_test:/service0041/char0042]# readAttempting to read /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char0042[CHG] Attribute /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041/char0042 Value:e2 07 09 05 01 24 11 03 f1 02 .....$....e2 07 09 05 01 24 11 03 f1 02 .....$....[tuya_mdev_test:/service0041/char0042]# attribute-infoCharacteristic - Current TimeUUID: 00002a2b-0000-1000-8000-00805f9b34fbService: /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0041Value:e2 07 09 05 01 2e 01 03 f5 02 ..........Notifying: yesFlags: readFlags: notify读出结果⼤致意思应该是:2018-9/5-1:36:17 周三读取⼀下0x180A的Device Information:[tuya_mdev_test:/service0006/char0007]# select-attribute /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0047/char004a [tuya_mdev_test:/service0047/char004a]# attribute-infoCharacteristic - Model Number StringUUID: 00002a24-0000-1000-8000-00805f9b34fbService: /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0047Flags: read[tuya_mdev_test:/service0047/char004a]# readAttempting to read /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0047/char004a[CHG] Attribute /org/bluez/hci0/dev_47_B1_26_C1_81_18/service0047/char004a Value:69 50 68 6f 6e 65 36 2c 32 iPhone6,269 50 68 6f 6e 65 36 2c 32 iPhone6,2当然写、使能notify也很简单,看help即可。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Linux BlueZ HowtoBluetooth protocol stack for LinuxJan Beutel j.beutel@,Maksim Krasnyanskiy maxk@14th November20011IntroductionBlueZ is the official Linux Bluetooth stack.It provides support for core Bluetooth layers and protocols. Bluez has many interesting features:Flexible,efficient and modular architectureSupport for multiple Bluetooth devicesMultithreaded data processingHardware abstractionStandard socket interface to all layersCurrently BlueZ consists of(see alsofigure1):HCI CoreHCI UART,USB and Virtual HCI device driversL2CAP protocol moduleConfiguration and testing utilities2Setting up BlueZ2.1Obtaining BlueZY ou can download the BlueZ source from .There is also an up to date CVS tree available there.Figure1:BlueZ Overview Diagram2.2RequirementsIn order to use BlueZ,you need to have at least a2.4.4Linux kernel.The2.4.6kernel has BlueZ built-in. In case,if you want to use the latest version of BlueZ(see section2.1for download instructions),you should disable native BlueZ support.BlueZ can be used with USB or Serial interface based Bluetooth devices.Additionally,Bluez provides Virtual HCI device(vhci)which can be used to test your Bluetooth applications.This is very useful if you do not have any real Bluetooth devices.2.3Compilation and InstallationT o configure BlueZ run./configureto configure BlueZ for your kernel.The configure command automatically searches for all the required components and packages.Optionally,the configure support the following options:--enable-debug enable BlueZ debugging--with-kernel=<path>kernel source path(default is/usr/src/linux)Once the Configure ran successfully,to compile and install run BlueZ,run:make installThat’s it!.Now,follow the next section to use BlueZ.See the README and configure.help for further compilation instructions including instructions for cross-compilation.As usually it is good to check/var/log/messages for any output messages.If you want to update your Linux kernel tree with the up to date CVS version run make update and recompile your kernel.If you want the latest stuff don’t enable Bluetooth support in the kernel and use BlueZ-1.2or the latest CVS code instead.Be sure to have control of which modules you are loading.2.4Loading BlueZ ModulesThe following lines need to be present in your/etc/modules.conf always in order for BlueZ to work correctly:alias net-pf-31bluezalias bt-proto-0l2capIf you want to use UART based Bluetooth devices,add the following line to your/etc/modules.conf in addition to the above:alias tty-ldisc-15hci_uartIf you want to use the Virtual HCI device,add the following line to your/etc/modules.conf:alias char-major-10-250hci_vhciAfter making any of the above changes,you can run”depmod-a”to enable auto-loading of BlueZ modules.Manual loading of the modules can be done by:modprobe bluezmodprobe hci_uart UART support.Optionalmodprobe hci_usb USB support.Optionalmodprobe l2capY ou should see the BlueZ modules if you run lsmod.If there are any errors,check your /var/log/messagesfile.2.5Device IntitializationUART DevicesMake sure that your/etc/hcid.conf is correct(tty,speed,flow,etc).See the example provided with the package(daemons/hcid.conf).Start hcid.T o configure the UART devices you need to use the tool hciattach.It can be called either manually or from the PCMCIA cardmgr scripts.The syntax is given in section3.##HCI daemon configuration file.##$Id:bluezhowto.tex,v 1.5.1.22001/11/1412:03:10beutel Exp$##HCId optionsoptions{#Automaticaly initialize new devicesautoinit yes;}#Default settings for HCI devicesdefault{#Local device namename BlueZ;#Local device classclass0x100;#Default packet typepkt_type DH1,DM1;}#HCI devices with UART interface configured without the use of hciattach#uart{#/dev/ttyS057600flow ericsson;#/dev/ttyS157600flow ericsson;#}USB DeviceBe sure to have USB support properly installed on your system.Plug in your USB device,check that the USB stack is loaded(usb-core and uhci or usb-uhci or ohci)and do:modprobe hci_usbDevices get initialized when they are plugged in(USB)or on the startup of the deamon(UART).Whenconfigured correctly they should be brought up automatically.Check your kernel and system logs for error messages.Y ou can manually bring device up by using the hciconfig command:hciconfig hci0up2.6Debugging the BlueZ DriverIf things go wrong don’t panic but follow these guidelines.Checkthe system log/var/log/messagesthe debug output from the BlueZ driverfor dead processes,like hcidif you are loading the right modules compiled for your current kernel from the right location.Also please try this:cvs update get the very latest CVS codemake distclean clean any changes in the code./configure--enable-debug enable debug output in the BlueZ drivermake update will make sure that Bluetooth headers in the kernel-tree are uptodate makemake install install the newly comiled modules and toolsDoes it still hang?If it does:rebootunplug all Bluetooth USB devices(maybe even unplug all data and power connections for a while if you are using developer hardware)comment out all uart devices in/etc/hcid.confkill hcid(if it was running)start emulator hciemud localhost:10start hcidIf you decide to call for help please include the following information in addition to you system logs: What bluetooth device are you using(Ericsson,Digi,etc.)?GCC version?What do you do and when exactly does it hang?cat/etc/hcid.conf3Toolshciconfig-HCI device configuration utilityhciconfig hciX[up Open and initialize HCI device|down Close HCI device|reset Reset HCI device|rstat]Reset stat conters|auth Enable Authentication|noauth Disable Authentication|encrypt Enable Encryption|noencrypt Disable Encryption|piscan Set page scan and inquiry scan mode|noscan Disable scan modes|iscan Set inquiry scan mode only|pscan Set page scan mode only|inq[length]Inquiry of devices|ptype[type]Set packet type|lm[mode]Get/Set default link mode|lp[policy]Get/Set default link policy|conn Show active connections|features Show features|name[name]Get/Set local name|class[class]Get/Set class of device|version Display version informationT o query the current default packet type:hciconfig hci0ptypeT o set the new packet type:hciconfig hci0ptype<types list separated by comma>hciattach-HCI UART driver initialization utilityhciattach<tty><type|id>[speed][flow]A simple utility that initializes a given serial port.It can be called either manually or from the PCMCIA cardmgr scripts.It is also working hot-plug for UART based PCMCIA ing this tool you can add/delete UART devices without restarting HCId.hciattach ttyS0xircom115200flowhciattach ttyS1ericsson115200flowhciattach ttyS2any57600The PCMCIA cardmgr calls it like:hciattach ttyS10x0123,0x4567l2ping-L2CAP pingl2ping[-S source addr][-s size][-c count][-f]<bd_addr>l2test-L2CAP testingl2test<mode>[-b bytes][-P psm][-I imtu][-O omtu][bd_addr]Modes:-d Dump(server)-c Reconnect(client)-m Multiple connects(client)-r Receive(server)-s Send(client)Options:-I Incoming MTU that we accept-O Minimum outgoing MTU that we need-b Size of the data chunks in kb-P Use this PSMIf you have several devices on one box this may be useful:-S<Source BD address>A simple throughput test using l2test:Server:l2test-I2000-rClient:l2test-O2000-s<bd_addr>scotest-SCO testingscotest<mode>[-b bytes][bd_addr]Modes:-d Dump(server)-c Reconnect(client)-m Multiple connects(client)-r Receive(server)-s Send(client)3.1Additional Toolshcidump-HCI packet analyzerhcidump<-i hciX>[-h]hcitool-Generic writing and monitoring to the HCI interfacehcitool[-i hciX]OGF OCF param...where OGF Is the OpCode Group Field(00-3F),OCF is the OpCode Command Field(0000-03FF),param...are parameters.Each parameter is a sequence of bytes.Bytes are entered in hexadecimal form without spaces,most significant bytefirst.The size of each parameter is determined based on the number of bytes entered. An example to do an inquiry using LAP0x9E8B33for10 1.28sec and unlimited responses is:hcitool-i hci0010001338b9e1000and to stop the inquiry:hcitool-i hci0010002hciemud-HCI Emulation daemonhciemud[-n]local_address3.2Tools ExamplesTrace1:DualPPro SMP machine.2Bluetooth devices(Ericsson AppTK)connected via UART. bluetooth11:/>uname-aLinux 2.4.4#4SMP Mon Apr3018:55:18PDT2001 bluetooth11:/>cat/etc/modules.confalias eth0tlanalias char-major-108ppp_asyncalias char-major-10-200tun#BlueZalias net-pf-31bluezalias bt-proto-0l2capalias tty-ldisc-14hci_uartbluetooth11:/>cat/etc/hcid.conf##HCI daemon configuration file.##$Id:bluezhowto.tex,v 1.5.1.22001/11/1412:03:10beutel Exp$##HCI devices with UART interfaceuart{/dev/ttyS0115200flow ericsson;/dev/ttyS1115200flow ericsson;#/dev/ttyS057600flow;}bluetooth11:/>lsmodModule Size Used bytlan250561(autoclean)bluetooth11:/>hcidbluetooth11:/>hciconfighci0:Type:UARTBD Address:00:D0:B7:03:4B:F0ACL MTU:672:10SCO:MTU0:0UP RUNNING NORMAL PSCAN ISCANRX bytes:62acl:0sco:0events:7errors:0TX bytes:36acl:0sco:0commands:7errors:0hci1:Type:UARTBD Address:00:D0:B7:03:4B:85ACL MTU:800:10SCO:MTU0:0UP RUNNING NORMAL PSCAN ISCANRX bytes:62acl:0sco:0events:7errors:0TX bytes:36acl:0sco:0commands:7errors:0bluetooth11:/>lsmodModule Size Used byhci_uart46562(autoclean)bluez225443(autoclean)[hci_uart]bluetooth11:/>l2ping00:D0:B7:03:4B:85Ping:00:D0:B7:03:4B:85from00:D0:B7:03:4B:F0(data size20)...20bytes from00:D0:B7:03:4B:85id200time48.91ms20bytes from00:D0:B7:03:4B:85id201time50.02ms2sent,2received,0%lossbluetooth11:/usr/src/bluez/tools>./l2test-r-b10-I2000&[1]22761l2test[22761]:Waiting for connection on psm10...bluetooth11:/usr/src/bluez/tools>./l2test-s00:D0:B7:03:4B:85l2test[22763]:Connected[imtu672,omtu2000,flush_to65535]l2test[22763]:Sending...l2test[22764]:Connect from00:D0:B7:03:4B:F0[imtu2000,omtu672,flush_to65535] l2test[22764]:Receiving...l2test[22764]:10240bytes in0.01m speed11.12kbl2test[22764]:10240bytes in0.01m speed11.12kbl2test[22764]:10240bytes in0.02m speed11.00kbl2test[22764]:10240bytes in0.01m speed11.12kbl2test[22764]:10240bytes in0.01m speed11.12kbl2test[22764]:10240bytes in0.01m speed11.12kb<ctrl-c>l2test[22764]:Read failed.Connection reset by peer(104)l2test[22764]:Disconnectbluetooth11:/>lsmodModule Size Used byl2cap175200(autoclean)hci_uart46562(autoclean)bluez225443(autoclean)[l2cap hci_uart]tlan250561(autoclean)Trace2:Notebook(Compaq PIII).1Bluetooth device(Ericsson AppTK)connected via USB. btdemo1:˜>lsmodModule Size Used byuhci230400(unused)eepro100159841(autoclean)usbcore487841[uhci]btdemo1:˜>modprobe l2capbtdemo1:˜>lsmodModule Size Used byl2cap155520(unused)bluez206240[l2cap]uhci230400(unused)eepro100159841(autoclean)usbcore487841[uhci]btdemo1:˜>modprobe hci_usbbtdemo1:˜>hciconfighci0:Type:USBBD Address:00:00:00:00:00:00ACL MTU:0:0SCO:MTU0:0DOWN NORMALRX bytes:0acl:0sco:0events:0errors:0TX bytes:0acl:0sco:0commands:0errors:0btdemo1:˜>hciconfig hci0upbtdemo1:˜>hciconfighci0:Type:USBBD Address:00:D0:B7:03:4B:3B ACL MTU:672:10SCO:MTU255:255UP RUNNING NORMAL PSCAN ISCANRX bytes:61acl:0sco:0events:8errors:0TX bytes:33acl:0sco:0commands:8errors:0btdemo1:˜>l2ping aa:aa:aa:aa:aa:aaCan’t connect.:Host is downTrace3:Setting packet types on Ericsson AppTKbluez:/usr/src>hciconfig hci0hci0:Type:USBBD Address:00:D0:B7:03:4B:3D ACL MTU:672:10SCO:MTU255:255UP RUNNING NORMAL PSCAN ISCANRX bytes:55acl:0sco:0events:7errors:0TX bytes:29acl:0sco:0commands:7errors:0bluez:/usr/src>hciconfig hci0ptypehci0:Type:USBDefault packet type:DM1DM3DM5DH1DH3DH5bluez:/usr/src>hciconfig hci0ptype DH1,DH5bluez:/usr/src>hciconfig hci0ptypehci0:Type:USBDefault packet type:DH1DH53.3PerformanceThis will give you a rough guideline at what you can expect to see on a Point to Point connection.USB Operation Datarates as reported by l2test are given in kiloBytes per second.Packet Type DatarateDH120kBpsDH350kBpsDH565-80kBpsUART Operation The UART HCI T ransport Layer will be the limiting factor to any connection. Baudrate Packet Type Datarate57600any5kBps112500any5kBpsModifications to the MTU or packet sizes did not make any significant difference.4Setting up RFCOMMd and PPP on Top of BlueZY ou will need a kernel with ppp support enabled.T o configure and install RFCOMMd run:./configuremake installServer:rfcommd<-s>[-f file][-P port]Client:rfcommd[-f file][-P port][-L local address][-p][-t timeout]<host><server adress>Using the-n option RFCOMMd won’t detach from the terminal and you should see information and error messages there.4.1Setting up a PPP LinkHere is an example of the rfcommd.conffiles for client and server.Server side:options{psm3;#Listen on this psm.ppp/usr/sbin/pppd;ifconfig/sbin/ifconfig;route/sbin/route;firewall/sbin/ipchains;}#Network Accessna{channel1;up{ppp"noauth10.0.0.1:10.0.0.2";};}Start the server using ip10.0.0.1with:rfcommd-s naClient side:options{psm3;#Listen on this psm.ppp/usr/sbin/pppd;ifconfig/sbin/ifconfig;route/sbin/route;firewall/sbin/ipchains;}#Network Accessna{channel1;up{ppp"noauth";};}Start the client using ip10.0.0.2with:rfcommd na server_bd_addrThis will give you a ppp link between10.0.0.1(ppp server)and10.0.0.2(ppp client).T ry ping.T o debug you may want to add the options debug and record/tmp/pppd.log.T o see the PPP exchange,run pppdump/tmp/pppd.log.4.2Setting up an Internet GatewayNow you will want to be able to route packets to and from your regular internet connection.This will make your linux box into a Bluetooth access point.We assume this is available on eth0on the ppp server.Y ou will need a kernel configured with Netfilters for this operation.On the server side check your routes and iptables:[beutel@tec-pc-jg]#ifconfigeth0Link encap:Ethernet HWaddr00:50:DA:46:E3:20inet addr:129.132.119.47Bcast:129.132.119.63Mask:255.255.255.192UP BROADCAST RUNNING MULTICAST MTU:1500Metric:1RX packets:20370errors:0dropped:0overruns:0frame:0TX packets:10303errors:0dropped:0overruns:0carrier:0collisions:0txqueuelen:100Interrupt:10Base address:0xb800lo Link encap:Local Loopbackinet addr:127.0.0.1Mask:255.0.0.0UP LOOPBACK RUNNING MTU:16436Metric:1RX packets:6errors:0dropped:0overruns:0frame:0TX packets:6errors:0dropped:0overruns:0carrier:0collisions:0txqueuelen:0ppp0Link encap:Point-to-Point Protocolinet addr:10.0.0.1P-t-P:10.0.0.2Mask:255.255.255.255UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500Metric:1RX packets:20errors:0dropped:0overruns:0frame:0TX packets:14errors:0dropped:0overruns:0carrier:0collisions:0txqueuelen:3[beutel@tec-pc-jg]#routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.20.0.0.0255.255.255.255UH000ppp0 129.132.119.0*255.255.255.192U000eth0 127.0.0.0*255.0.0.0U000lo default rou-etx-1-tik-t0.0.0.0UG000eth0 [beutel@tec-pc-jg]#iptables-t nat-LChain PREROUTING(policy ACCEPT)target prot opt source destinationChain POSTROUTING(policy ACCEPT)target prot opt source destinationChain OUTPUT(policy ACCEPT)target prot opt source destinationNow we will set up Network Address T ranslation(NA T)for all packets leaving eth0:iptables-t nat-A POSTROUTING-o eth0-j MASQUERADEand enable ip forwarding:echo1>/proc/sys/net/ipv4/ip_forwardnow your NA T table will have the following entry:[beutel@tec-pc-jg]#iptables-t nat-LChain PREROUTING(policy ACCEPT)target prot opt source destinationChain POSTROUTING(policy ACCEPT)target prot opt source destinationMASQUERADE all--anywhere anywhereChain OUTPUT(policy ACCEPT)target prot opt source destinationOn the client side you will need to define your default route as follows:route add default gw10.0.0.1Delete all other routes that might still be present on the client.[beutel@tec-pc-jb]#routeKernel IP routing tableDestination Gateway Genmask Flags Metric Ref Use Iface 10.0.0.1*255.255.255.255UH000ppp0 127.0.0.0*255.0.0.0U000lo default10.0.0.10.0.0.0UG000ppp0 5Piconet Role SwitchFor using the Role Switch function you will need hardware that supports this feature.Be sure to have the right hardware before continuing in this section.Devices have a default link_mode setting(In BlueZ this is called link_mode because it is somewhat different from link_policy).The default LM can be changed via hciconfig hciX lm<flags> Valid LMflags are:ACCEPT Accept an incoming connection event if upper layers(L2CAP,SCO)didn’t accept it.If thisflag is not set and L2CAP/SCO don’t have listening sockets we reject connection. MASTER Always be the MASTER i.e.do the role switch on incoming connections and don’t accept Role Switch on outgoing connections.If thisflag is not set we accept RoleSwitch on outgoing connections and don’t do the Role Switch on incoming connec-tions.NONE Just clears allflags.Examples of Role Switch:champ:/tmp#hciconfig hci0lm accept,masterchamp:/tmp#hciconfig hci0lmhci0:Type:USBBD Address:00:80:37:14:42:45ACL MTU:672:10SCO:MTU255:255Default link mode:ACCEPT MASTERchamp:/tmp#hciconfig hci0lm nonechamp:/tmp#hciconfig hci0lmhci0:Type:USBBD Address:00:80:37:14:42:45ACL MTU:672:10SCO:MTU255:255Default link mode:Y ou can also set the default LM in hcid.conf using the same syntax.Also LM can be set per application(currently on servers only)Applications can set LM_MASTERflags on the listening socket.On incoming connections we check if listeners need a Role Switch and if they do we request it.l2test also has an option-M which sets the LM_MASTERflag.5.1Point to Multipoint ConnectionsIn order to set up a point-to-multipoint connection you will need to use the following syntax in the rfcommd.conffile:session_X{channel X;}session_Y{channel Y;}and then start a server for each session:rfcommd session_X serverrfcommd session_Y server6Service Discovery ProtocolIn general I think it should look like DNS Unix implementation e.g:SDPd-SDP server(like BIND) SDPclient-SDP client library(like Resolver library)Things we need:-SDPlib-Generic library for building/parsing SDP packets.This be used internally by the server daemon and client library to construct/parse SDP messages.-SDPd-SDP server Daemon that listens on L2CAP and Unix sockets.This guy should respond on incoming SDP queries,maintain SDP database,allow record registration via unix socket,etc Also it needs nice configfile where you can specify predefined services(if you think rfcommd config is ok you can easily reuse that code).Daemon will use SDPlib.-SDPclient-SDP client library This thing should provide nice high level client API.It will use L2CAP socket and SDPlib.I was thinking about creating’sdp’module in BlueZ CVS.I guess the SDP server side will be implemented as a TCP/IP server,i.e.accepting connections on the SDP port of the L2CAP layer(instead of a TCP port over IP).The SDP will run in user mode.Right?Y es.I’d recommend to read early archives of bluez-users mailing list.We discussed SDP design with Gordon there.In short SDP implementation is somewhat similar to DNS implementation e.g.SDP server -named,SDP lib-resolver.7Programming Using BlueZBlueZ provides standard socket interface to all its layers(hci,l2cap..).Have a look at bluez-1.2/tools/l2test.c bluez-1.2/tools/l2ping.c.Adding Bluez support to any existing socket based programs is very easy.For eg.Y ou would use AF_BLUETOOTH instead of AF_INET(ip)when you make”socket”call.Y ou would use sockaddr_l2 instead of sockaddr_in.SOCK_SEQ_PACKET instead of SOCK_STREAM and so on.Only few new data structures and constants.setsockopt and getsockopt take new data structure and constants.The BlueZ protocol stack is interfacing to the Linux socket layer,providing a new address family.Through the raw HCI socket interface and hcilib one has a function sendcmd.An application can thus send any HCI command to a device and receive events in return.There is no point of implementing ioctls for every HCI command.So,we’ll have only important set of ioctls like DEVUP,DOWN,etc.Everything else should be done via the raw sockets.Operations like initializing a local_name and class_of_device is supposed to go into hcid.7.1HCI Packet FiltersFilter allows you to specify packet types and events your HCI application is interested in.It’s also an optimization feature in HCI core that makes sure that we don’t send junk to the apps and therefore don’t waste memory and don’t wake up processes unnecessary.For example in case of a simple HCI app that sends one command and expects one event back.Without socketfilter we would send a copy of every single packet that is sent/received on this device.Filter API:struct hci_filter{__u32type_mask;//Packet type mask__u32event_mask[2];//Event mask}flt;/*Set filter*/flt.type_mask=((1<<HCI_ACLDATA_PKT)|(1<<HCI_EVENT_PKT));//Event and ACL data packetsflt.event_mask[0]=˜0L;//All eventsflt.event_mask[1]=˜0L;setsockopt(s,SOL_HCI,HCI_FILTER,&flt,sizeof(flt));/*Get filter*/len=sizeof(flt);getsockopt(s,SOL_HCI,HCI_FILTER,&flt,&len);Defaultfilter is set to”event packets only/all events”,which is what most HCI apps want.So,if you need SCO data or something else don’t forget to set a newfilter8Setting up VTun on top of BlueZVT un is the easiest way to create Virtual T unnels over TCP/IP networks with traffic shaping,compres-sion,and encryption.It supports IP,Ethernet,PPP and other tunnel types.VT un is easily and highly configurable.It can be used for various networks tasks:VPNMobile IPShapingand othersStarting from version2.4,VT un supports Virtual T unnels over L2CAP.This can be used to run almost all IP-based programs such as Apache web server.8.1Compilation and InstallationT o setup VT un over L2CAP,obtain a copy of VT un from the BlueZ source . Y ou can also obtain it from .The compilation instructions can be found in the vtun/READMEfile.Before installing VT un,make sure that you have enabled the following kernel option:CONFIG_TUNIf you don’t have this option enabled,you need to either re-compiler your kernel with this option as a mod-ule or alternatively,you can obtain Universal TUN/T AP from h ttp:///tun/index.html. Add the folllowing line to your/etc/modules.conf#VTunalias char-major-10-200tunCreate a tun device as follows:mknod/dev/tun c10200if you are using2.4.2or belowmknod/dev/net/tun c10200if you are using kernel version2.4.4or greaterNow,load the tun module as bellow:modprobe tunMake sure,you see the tun module when you run lsmod command.8.2ConfigurationVT un can be configured for a complex network setup.This section will show how to setup a simple host and client network over L2CAP.For various other configuration options,read the Readme.Setupfile from VT un.Date Section ChangesAug.2,20011,2,3Initial VersionAug.7,20015,6Addedfilters,checked tool sectionAug.9,20013,4,5Added rfcommd and ppp,added packet type,started programming section,l2test new,trying to get sdp setup goingAug.21,20012Changed module loading and compiling instructionsT able1:Revision History。

相关文档
最新文档