Categories

BreathUp: a lot of minor things take a lot of time!

Hi!

I feel as I didn’t do so much during the start of the week, even if I spent a lot of time on the project. I’m guessing that this is because I’ve not dedicated my time to one task, but I’ve done different tasks such as:

  • Cleaning the code for LoRa.
  • Testing ACK and OTAA, but without success. As we are moving from TTN network to Obgenious’. Then I will work on this when we will have received the IDs we need.
  • Cleaning a bit our git repository.
  • Configuring a systemd service for our server.
  • Creating a method to get the battery voltage and characterizing its discharge.
  • Spending some time to understand how AES128 works and how it is implemented in LMIC. But I’m not done with this, and will therefore still work on it during the end of the week.
  • Discussing with Alexandre about how we should interface the STM32, the BT module, the android app and the server… That was really exhausting, but we managed to find an agreement.

Eventually for the end of the week, I might take over from Benjamin on the qualification of the signals and I will work on the cryptographic part until we have a secure way to exchange datas between the devices and the server.

Have a nice end of the week,

Xavier Chapron

BreathUp : PCB and LoRa on the way!

Hi!

Here is what I did during the beginning of the week:

  • I worked on the BOM, because the library is quite outdated and therefore I needed to find real reference for each one of the 166 components of our PCB.  That was a really boring task and as we can’t afford any error, I had to ask Benjamin for a check, then check again… And we found errors…
  • I worked on the server, eventually, we are hosted by Scaleway because Heroku was too restrictfull for our project. As I changed the server from Heroku to Scaleway, Samuel tested it, and discovered some unexpected comportment that weren’t happening on my computer… But I fixed them! Damned JS…
  • I worked a lot on LoRa, and still have an unresolved issue. The main chip register seems to change by itself, without any reason and obviously that’s not expected… As even with the help of Alexis and Samuel we didn’t find any solution, I will from now on work on an other module based on a real sx1272 and not on a Chinese one… I hope to obtain better results!

Eventually, for the end of the week, I really want to be able to send as many messages I want with LoRa. And If I have some time remaining, I will characterize the discharge of our battery.

Have a nice end of the week,

Xavier Chapron

BreathUp: some progress on the LoRa part

Hi,

My main tasks of the week are LoRa and the webapp.

I started the week on the webapp. I added some Ajax, Jquery and Jinja2 technologies to improve our website. It used to has an API. It now also has some web pages, with forms and buttons.

I added some HTML with Jinja renderer but they are horrible… I will need to put some Bootstrap on it, but clearly that’s not our top priority…

On the LoRa part, I made some test, and that didn’t work at the first try. I spend the whole Tuesday trying to find why the MISO signal was not responding anything. Finally Alexis gave me the answer that was in the datasheet (I really need to start reading them). In fact I was releasing the SPI bus by raising the NSS signal between each frame of 8 bits. And in the datasheet it’s clearly said that the NSS signal is used as an interrupt by the chip, and between each interrupt we need one frame of address and one frame of data.

Today, I made new tests, the chip tells me that is trying to joined the network, but never send me the confirmation that he has. I’ve some ideas about what might be the issue and I will therefore investigate on it during the end of the week.

I also found the snaps to connect our cable to the electrodes. I will then test how we can use them as connectors. We need to know if they don’t introduce to much noise and if we can solder them to the coaxial cable in a resistant way.

Have a nice end of the week,
Xavier Chapron

BreathUp : schematics, LoRa and webapp

Hi!

During the end of the week I worked on many topics:

  • We spent some time with E-respi to show them our progress, and I hope that they are happy with it.
  • I worked on the PCB:
    • I switched the pins connection of the LoRa and the ADC on the MCU. That looks like nothing, but it was important for Benjamin to create a better placement of our PCB. And that wasn’t so easy because both the ADC and the LoRa need a lot of pins with requirements : SPI, IRQ…
    • I double checked the routing table of the MCU because we can’t afford any error in it.
  • I also spent some time on the webapp :
    • Improving the tests.
    • Refactoring some views.
    • Reading some documentation on Ajax and Jinja2, because I will probably need them in order to use the wep API from a web browser.
  • I’ve spent hours on porting LMIC for ChibiOs on STM32. That’s more difficult than I thought… This is still on progress but I think that I’m getting closer!

Eventually, I will still work on the webapp and on LoRa this week, and I hope to obtain some results!

Have a nice week,

Xavier Chapron

BreathUp : first full version of deploy webApp with unit tests

Hi!

The plan for the end of the week was to add a database and a way to authenticate the users and here is what I managed to do :

  • Add a PostGreSQL database to store the users credentials and authorizations and to store the devices status and configurations.
  • Try to add OAuth2 with Google as a provider : didn’t succeed because Google doesn’t want raw IP as callback uri.
  • Deploy on heroku: I spend like 3hours, 25 “WIP trying to deploy” commits, and 20 deployment versions (thanks Heroku for the count) before I found a great documentation explaining precisely what I was needing…
  • Add OAuth with another 20 WIP commits and deployments as I wasn’t able to test it on my computer. And I can confirm that Heroku is quite fast, but when you have to deploy 40 times in a day, it’s clearly not fast enough…
  • Make some correction to have something clean: and here we are with 53 deployments in 3 days 🙂
  • Add a lot of unit tests to obtain a decent coverage ratio. Sadly, 100% is impossible as I can’t test Google authentication… But If I remove this part, we are at 95% on the view file and 100% in the others. And I’m thinking about considering that this is fine…

Ok, but what are we still missing to say that the webApp is finished?

  • Some page rendering, because there are horrible.
  • Adding a new table to the database to store old reports from devices.
  • Implementing some thing to return at the next ping from a device it’s configuration if it has been modified.
  • Finding a way to receive, store and send  large files with the ADS and IMU datas.

And that will be my job for the next week, with maybe some more test on a LoRa module. It could be great if I managed to send back a message to it.

Have a nice week,

Xavier Chapron

BreathUp: LoRa and Webapp

Hi!

Once again, first to post as I won’t work this afternoon and evening.

I  gave myself the objective of creating a first version of a secure web API and to make some test on LoRa for this week. And I’m on my way to do that because I have already got a good part of the web API:

  • Thanks to Samuel help, I managed to send some messages from a LoRa chip connected to an arduino module. Those messages are sent to The Things Network for the moment.
  • I created a Python script that retrieves the LoRa messages from The Things Network MQTT mailbox. This script then converts those messages in web request to abstract the LoRa part from the server.
  • The server currently answers on different routes: you can add a device, get the device status, send some device updates if you have the encryption key…

Eventually, the web app still needs authentication for web users (we will use OAuth2 with Google as a provider) and a database, but I’m confident in realizing this before Sunday.

Have a nice end of the week.

Xavier Chapron

A big BreathUp of fresh air

Hi!

Quite soon to post for the second part of the week but I will be in the mountains for two days without Internet. A great opportunity to disconnect a bit and to breath fresh air!

I didn’t work a lot, I just read articles, readme, tutorials and wiki on different authentication tools but I need to talk about it to Samuel to define what we are going to build.

For next week, I want to have a first version of a secure web API and as Samuel is also going to give me a LoRa module I want to work on the protocol, the network, the integration to our product…

Have a great week-end,

Xavier Chapron

Web server, Python scripts and schematics

Hi!

Last Sunday I was saying that I had finished the scheme for the LoRa chip. In fact, after some talks with Alexis, we decided to finally use the exact scheme they are using in one of the reference designs. Indeed I had taken the closest capacitor and coil I had found in Alexis database of component, but that didn’t seems safe enough as design antenna is quite difficult. So Alexis added the exact components and I changed them in the scheme.

I’ve also worked again on the Python script used to plot curves after the filters because they were using MatLab and this is pretty heavy and unnecessary. It’s currently using matplotlib, and that’s a great improvement for Alexandre that have to check if each one of his data acquisition are relevant!

I’ve started to design the web architecture but I still need to work on the authentication and on the LoRa connexion because we want to build something secure and that is not something we can make up.

Eventually, as time is flying, we need to work on the next step of the PCB design: the placement of the components. I’ve therefore start with some drawing so that we agree on the global position of each part as some of them are quite sensitive such as the ADC that need a really clean power supply, the Bluetooth and LoRa antenna that also need to be isolated…

For the end of the week, I will not work a lot. I think of using this long week-end at my parent’s home, as holidays because as I don’t have an Athens week, I need to be prepared to work a lot next week!

Next news on Sunday, but that might not be a revolution.

Xavier Chapron