tinnymodbus icon indicating copy to clipboard operation
tinnymodbus copied to clipboard

Idea to improvement

Open storfusker opened this issue 4 years ago • 1 comments

Hi Christian Great project. Thanks for sharing

I don't know if this project is dead or frozen, but it can be very useful to get an modbus error code when something illegal is requested. After spending a lot of time trying to figure out why I could get the number of attached DS18B20 sensors, but every time I tried to read an ID or a value the reply timed out. Anyway, I now can get a DS18B20 ID or a temp reading, but I need to figure out the format I get on my modbus master emulator, because it's completely different from what I see on my logic analyzer from the 1-wire bus Some sample readings etc could be nice in the documentation Br Steen

storfusker avatar Oct 26 '20 20:10 storfusker

@storfusker

Hi Steen,

Hi Christian Great project. Thanks for sharing

First, thank you for your time and review you make !

I don't know if this project is dead or frozen, but it can be very useful to get an modbus error code when something illegal is requested.

Not much time is allocated anymore. I used as-is now for my personal purposes on some IoT (industrial requirements).

There are many MCU's gaining popularity (having WiFi/BLE) nowdays, i did this project for robustness and the extreme low cost.

After spending a lot of time trying to figure out why I could get the number of attached DS18B20 sensors, but every time I tried to read an ID or a value the reply timed out.

  • Yes you can read the amount of 1wire sensors
  • Timeouts are usually due to parasitics on the line, check and make sure C1, C2 are properly placed.

In my experience, with that PCB exposed on this site, since >4 years now I can tell there are < 1e-3 read error rates (continuous one minute interval readings) over almost one hundred sensors ever installed. Parasitic filtering (C1,C2) make a big difference, i had problems with early versions.

Anyway, I now can get a DS18B20 ID or a temp reading, but I need to figure out the format I get on my modbus master emulator, because it's completely different from what I see on my logic analyzer from the 1-wire bus

  • Ah see. It is a 64bit field consisting as of 8 x uint8 array where each uint8 is a single number of the serial.

  • I can confirm serials are fine, checked with raspi linux kernel mode 1wire readings.

  • On analyser the 1w is much wierd and one can be lost/confused in the very detection phase (complements of bits are tested out to poke out the complete/individual serial number)

Some sample readings etc could be nice in the documentation

  • Uhh, that would be time tedious.
  • I assume that using sigrok/pulseview excellent opensource debuggers anyone can trace for themselves
  • I myself followed rigurous vendor documentations and digital analyser but never thought to publish samples.

That would transform the project into a educational one (yes i love such projects) but this would become quite time consuming for me.

Thank You again !

~Cristian.

Br Steen

cbalint13 avatar Aug 19 '21 11:08 cbalint13