[Kudly] Communication challenge & PCB

Hi everyone,

Yesterday was the day of the communication challenge ! It’s was a great coding day, but stay focus all day long was quite difficult (we should have taken more pauses, but we wanted to go as fast as possible…). I’m glad of what I did, even though my code was note very clean, and I made silly mistakes.

For the TP, I used DHCP to get an IP adress, but in the challenge we needed to use a static given IP. And I lost an 1 hour to configure the DNS… After that, I also lost time on the step 3 (the step where we had to answer question), because I believed that we had only 10 seconds to send the request with the answers, so I use the serial USB for writing on the keyboard the answers, and I spend an hour trying to answer the 5 questions… But there was no time limit to answer the questions, and we could have multiple try for one serie of questions….

Because of all the time lost, I had only 1 hour (at the end of the day, less focused that at the begining…) to configure the SPI and the LCD screen. Finnaly, I achieved to send data with SPI, and print something on the screen, but not the image with the token to achieve the step….

We also see with our own eyes our PCB ! What a great thing !

Have a good WE,

Dimitri

Challenge!

Hello everyone!

Yesterday was challenge day! It was long, it was hard, and… What am I talking about?! :p

Anyway, I started out ok, being able to receive a request and resend one within 2 seconds pretty quickly. But then I got stuck on something very stupid, for hours… Turned out I couldn’t do it two times in a row, the second one wouldn’t work. So, not knowing if it would be important for the next steps or not, I decided to fix the issue.

The problem was with the http_request buffer that got overwritten and contained more info that I wanted at the beginning of the second try. So when I sent it to the server, it wasn’t happy. After some time (meaning 1h) trying to fix my way of doing things, it didn’t work any better, so when Sam said that those who hadn’t yet managed to send two requests in 2 seconds had to implement it using mailboxes, I thought to myself: ok, you’ve been stuck on that for hours, maybe that’s the solution. So I started from scratch and implemented a mailbox. It was probably a cleaner way than what I was doing before, but as it turns out, when it was done and worked, I still had my buffer problem…

The solution was very, very stupid, as it often is: I finally asked Sam how I could fix my buffer problems, he told me that I shouldn’t have one because the buffer should get overwritten at each step with the string I want (ending with a null character) and the rest of it shouldn’t matter because it shouldn’t get sent to the server since it was after the null character. And there you have it: the problem was with a line of code I had copied from an lwip example earlier this week that sends the request to the server, using sizeof(http_request)… instead of strlen(http_request)… I think I don’t have to tell you how angry I was at myself at this point, because changing one word in my code made it work perfectly, instantly, and would have made my previous way of doing things work as well! So to sum up I lost about 4h on 6 f**king characters! \o/

Then I went on to the next steps and got to the LCD screen, but the challenge was over before I could make it work and I’ve since then improved it but I can’t test it (we don’t have the screens any longer).

So this challenge was… interesting! And very, very frustrating! But I should have found my mistake way earlier, or simply asked Sam or Alexis why it wasn’t working properly, I guess my stubbornness got the better of me! I wish I could have made it to the last steps, the maze seemed like a fun thing to implement.

Anyway, now it’s all about HeRos for a month and I think we’re ready to handle it using ChibiOS! 😉

Until next time!

Sorry for the long post, here’s a potato:

Sainte-Patate

[STM32F4] End of the labwork and the challenge

Hello,

This week, we have to finish the stm32 labwork and what a mess! I was not early. However, I got a really good experience. I’m now able to drive leds with pwm, handle buttons and trim, and even create a tcp client.
The most difficult part was the tcp client, we had to modify the lwipthread.c file and a lot of functions came from “nowhere”. When I have understood how it works, I see how it is powerful. Now, I still have some troubles : the connection is not very fast and many connections in a loop don’t work perfectly.

For the challenge, I have succeed two steps and have reached the third too late. It was around 18h45 and it stopped earlier this year : 19h30. Maybe, it was possible but I feel tired… During the morning, something strange is appeared. I have implemented a function which was called in my tcp client. But in fact, it was never called and even in gdb. In gdb, it was missing! I will find the commit and try again at home. If the problem is still present, I really want help from the teachers in order to discover the mistake. In the afternoon, I have changed and have implemented an other technique. I have learned how to use MailBox in chibios aka queue.

Today, I solve a strange behavior from my board at home. I have implemented a thread which toggles a led every time something on the serial is received. At the beginning of each program, the led was toggling ten times and I got back this : “AT?PORT”. Other students have had problem today with the serial and it was owing to the modem manager. Thus, when I came back home I discovered that modem manager was in my fedora too. Like I expected, after removing it, it worked so well!

Until now, let’s go back to the project!

Eric

[challenge] What a day !

I had imagined many scenarios for this day, but certainly not this one. To answer your question Drix, yes the progress animation was there. It was funny, but also very destabilizing. Could you imagine that in the preparatory exams for the Grandes Ecoles ? Every one becomes crazy ! On the one hand it is very stimulating and emulates the competition. On the other hand, it reassures you. I was not the only one to be stuck at step one in the afternoon.

In fact, my code was not robust enough and I spent many hours on debugging it. Then, I had a revelation around 5pm, which gave me only a few hours to progress on the challenge. I can still remember Sam’s eyes saying “Another one who haven’t listen…”, when he was checking my work… And he was right. After cleaning all this, the coding was more fluid. It brings me out of my grumpy mood and my bad faith.

Above all, the challenge really was a good experience. I understood a lot about debugging, and errors management in particular. I must correct the code of the practical work and make it clearer now. The more I use ChibiOS, the more I enjoy it. There is a big step to understand it in the beginning. But it turns out to be very powerful and easy to use.

At present, we have to focus on the code of our project… but not tonight.

challenge