Author Topic: Needed Arduino Programmer for Small, One Time Job  (Read 8820 times)

0 Members and 1 Guest are viewing this topic.

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Needed Arduino Programmer for Small, One Time Job
« on: January 16, 2023, 06:41:39 am »
My brother has a "gadget" that interfaces a piece of new equipment to a logging device via RS232.  The new equipment is like the old equipment that the project was designed to use, spitting out lines of sensor data.  But the new equipment omits the header information (a fixed set of text strings).  The "gadget" is called a translator.  It receives the data from the new sensor and every 20 lines, adds the the header. 

The data rate is 9,600 bps, with strings about 50 characters long.  From the files I've seen, the sensor is sending DOS type line terminators, with /r/n. 

Looking at the code, it simply counts the characters received until a /r, copying them into a buffer.  There is no checking of the character count to prevent a buffer overflow.  So that needs to be fixed. 

I think the end of line check should be /n instead of /r, but that doesn't seem to be part of the immediate problem.

The immediate problem is that the output of some translators will go wonky.  From the files I was sent, it's hard to define just what "wonky" means, but the output file log is pretty messed up.  I'm thinking the Arduino has gone off the deep end.

I am not experienced with Arduinos.  The code looks enough like C so I can tell what it's doing, mostly, but not the fine details.  I also think I'm looking at the code with debugging mods, but I can't tell for sure, since I don't really speak "Arduino". 

So... my brother is looking for someone to take this over, and make the units work reliably.  It may not be a software problem at all, since it tracks with certain units, and others work 100%.  But I'm thinking a combination of the two, such as a corrupted /r character causing an undetected buffer overflow and a subsequent crash. 

Anyway, if you'd like to get involved, I will pass your contact info on to my brother, after you and I have some conversation. 

Feel free to ask questions here, or we can talk more privately with messages. 
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline cantata.tech

  • Regular Contributor
  • *
  • Posts: 75
  • Country: au
Re: Needed Arduino Programmer for Small, One Time Job
« Reply #1 on: January 18, 2023, 05:31:00 pm »
Actually that sounds like a Flow-Control issue.

Is there any "Flow Control" being used ?
 

Online artag

  • Super Contributor
  • ***
  • Posts: 1069
  • Country: gb
Re: Needed Arduino Programmer for Small, One Time Job
« Reply #2 on: January 18, 2023, 06:14:58 pm »
If the output contains more characters than the input (the headers) then there'd better be either flowcontrol or gaps in the input. Otherwise the buffering will always fail eventually.
 

Offline gnuarmTopic starter

  • Super Contributor
  • ***
  • Posts: 2218
  • Country: pr
Re: Needed Arduino Programmer for Small, One Time Job
« Reply #3 on: January 19, 2023, 09:04:32 am »
Actually that sounds like a Flow-Control issue.

Is there any "Flow Control" being used ?

Nope.
Rick C.  --  Puerto Rico is not a country... It's part of the USA
  - Get 1,000 miles of free Supercharging
  - Tesla referral code - https://ts.la/richard11209
 

Offline Vincenzo

  • Regular Contributor
  • *
  • Posts: 73
  • Country: us
Re: Needed Arduino Programmer for Small, One Time Job
« Reply #4 on: July 16, 2023, 03:29:15 am »
Does your brother share both parents with you or only one?
« Last Edit: July 22, 2023, 09:09:17 am by Vincenzo »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf