This week has started to a meeting with Laurent in order to make acquisitions and understand why we did not have EMG with our own PCB. After some tests and different configurations, we had acquisitions with EMG. But, the signal was not able to brand it.
After that, I left my team-mates explore several ways to make different tasks. Indeed, I made another test to know how batteries unloads. I changed the getter of the battery’s level. I also fixed errors on the Android application. I made tests about our first integrated version in order to find bugs on the application and on our device too. I made few modifications on the casing.
I discovered a new tool: Indent. It is very interesting and easy to use. Intend allow us to decide a standard thanks to commands which are put on the .indent.pro. When Indent is used, it corrects and puts the configuration which are decided with the commands. Because of that, we can have the same C style in every files easily.
So, my next task will be to clean up and help my team-mates on their tasks.
Have a nice week!
Benoît for BreathUp
Since Wednesday, I have continued to work on the application and after some tests I found an error about the way I used to handle the thread of the service. So, after to speak with Sam, I decided to change how I made it and used a conditionVariable. I also split the application to put on a new app the part about the Bluetooth Server, I used that to make tests. I also modified a little bit the design of the application.
Friday, with my team-mates, we made some checks about our progress and we decided to do some changes. Indeed, now, it is the application which will send the time to the device,thanks to the Bluetooth connection, instead of the Lora chip. So, the application could receive different kind of requests sent by the device. The device could send a report, ask the parameters’ setup, and ask the time. To do that I modified a little bit the structure of the application. I need to make tests to valid that. At the same time, I changed the error codes which are sent to the device in order to have a response which have always the same length.
Eventually, the next week, I will finish with the treatment of the time requests and the other kind of requests. It is implemented but not tested. I need to implement a remote device which send different requests. I will use the work of Alexandre to do that on the Olimex E407 or on own PCB if the Bluetooth module works on. After, I will work to handle the time in order to have signals which match with a time to file them.
Have a nice week!
Like I wrote in my last post, I worked on the integration of the new requests in the app. Indeed, thanks to the Bluetooth connection, the remote could send bytes instead of chars. To do that I created a class PostRequest with OkHttp package. The main difficulty was to understand how make the request because I would like sending only bytes in the body and I did not know which content-type was the good. Moreover, there was a mistake on the server because it wanted 19 bytes instead of 18. So, I did not understand why my request was bad with the error 400 and I spoke with Xavier to be agree with him on the post request. Now, that is ok. I also modified a little the structure of the app to be able to handle bytes.
Now, the application seems to be ok, I just need to clean up and I could work on the IMU.
During this end of the week, I spent my time to interface the Bluetooth Application with the code which made by Alexandre in order to connect the smartphone to the Bluetooth unit and do long exchanges. After some problems and tests, the two devices are interfacing.
Since yesterday, Xavier has changed the encryption’s algorithm and the server request. I have began to switch the two Get requests to Put requests, but I will finish that next week.
Before the interfacing of the Bluetooth, I spent few times on the IMU driver to understand how the I2C communication works .
Have a nice week,
Since Monday, I have added a detection to know if the user switches off the Bluetooth of his smartphone when exchanges with the Bluetooth module were launched. I also fixed errors.
Today, BreathUp received the PCB. However, there were some problems. Indeed, when we have connected the battery on the PCB. There were components which became warm. After investigations, we found errors with the imprints of the LoRa component and the regulator of tension. For the second error, it seem to be not very difficult to correct it with a patch. But about the first, it will be more difficult 🙁 .
Now, I will begin to work on the IMU driver.
Happy New Year!
I hope you spent good times for Christmas and the New Year’s celebrations!
During holidays, I carried on the application. Indeed,
- I put the Bluetooth connection in a service to do that in background.
- I modified the Bluetooth Server to be able to simulate a remote device.
- I handle it to start and stop the service’s thread.
- like the server’s API has been modified, I had to changed how I made requests.
- I made tests to find bug and correct them.
- I changed a little bit the UI.
- I reviewed and cleaned the code.
Now, about the application, I will work with Alexandre to make tests and modified some parameters which will be modified with the new encrypt program. Indeed, encrypted messages will not have the same length. And to split the key and the message, I need to know their length.
Benoît for BreathUp
During this end of week, I worked again with Alexandre on the Bluetooth interface and made tests. Now, thanks to the apps, the Bluetooth module can send a request to the server and receive its answer. I will handle that, thanks to a service, to do that in background. About the requests to the server, I decided to make Get requests with the OkHttp class which is easier to use.
I also work on the continued integration. But for that, on the server which makes tests, I need an Android SDK.Therefore, Sam will install it his server.
As you know, it is Christmas holidays. I don’t know when I could post. So, during the holidays I think I will do several short posts.
Have a happy Christmas Holidays,
Monday with Alexandre, we worked together to test our works and know if the app could exchange data with the Bluetooth module. That was conclusive. After that, the steps was the thought about the communication between the device and the server. There were debates with Alexandre and Xavier about that and its security. Thanks to that, we have established a “protocol” between the different elements. Therefore, I have begun its implementation for the app. Therefore, I will continue to work on during the end of the week.
Simultaneously, I also worked on sending http requests to the server and giving back the answer. To do that, Xavier explained me how generate valid encrypt messages with a python script. I also continued to develop the Bluetooth server to be able to do tests and work alone. I took some times in order to clean the code, remove bugs and add commentaries.
This week, PaulGWF organized “Rose Events”. He put forward us to do a secret Santa and a dinner together. Those were good moments together and cool. So, thank you PaulGWF and others.
Benoît for BreathUp.
During this last days, I finished implimenting the Bluetooth server to test an connexion between two devices and it has worked. Indeed, the application can send and receive data.
As I said in the last post, I worked to make a http request. The application can do a GET and receive the answer.
Therefore, the next step, it is to interface the application and hardware Bluetooth unit with Alexandre. I have begun to think about that. But I will have to talk with Alexandre to choose the best solution.
Benoît for BreathUp
Since Sunday, I have made some progresses about the Android Application. Indeed, after spent lots of time to understand why the application could not discover remote devices with smartphones which used Marshmallow version and later. The problem was, in addition to the permissions about Bluetooth, to use Bluetooth connexion, I had to add the “Access Coarse Location” permission.
After that issue was solved, I progressed step by step to make a connexion between two devices. I began to set up a communication between a client which used the Android application and another device which used native Bluetooth Service.
However, that not allow me to manage data which was exchanged by the devices. Therefore, I implemented a Bluetooth server in order to watch if the client received data from the server and if it could send data. Now, the server accepts a connexion but my implementation to send and receive data does not work. I need to review how Inputstream and OutputStrean work. ( I am going to do this evening).
I think, during the next part of the week, I could finish with the Bluetooth and begin to send request to the server which made by Xavier. (If I will not be blocked by an other problem 🙂 ).
Have a good week.
Benoît for BreathUp.