Giter Site home page Giter Site logo

orgua / onewirehub Goto Github PK

View Code? Open in Web Editor NEW
340.0 35.0 84.0 15.39 MB

OneWire slave device emulator

License: GNU General Public License v3.0

C++ 99.63% CMake 0.37%
onewire-slaves 1-wire overdrive teensy esp8266 raspberry-pi arduino sensor temperature voltage

onewirehub's People

Contributors

chasm-git avatar georgeioak avatar giermann avatar hrushka avatar j-langlois avatar orgua avatar raintonr avatar rikka0w0 avatar sabas1080 avatar shagrat2 avatar siarhei-hanchuk avatar vytautassurvila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onewirehub's Issues

Building the project

Is there any documentation anywhere on how to build the project?
I tried opening the directory with the current Arduino IDE, but it
didn't recognise any files, and I couldn't find a Makefile alternative.

Thanks - Will

DellAC & DS2502 Dell Power Supply [Help]

Hello,
I'm trying to somehow figure out how to write or emulate the DS2502, i got 5 brandnew chips on hands but i dont have the onewire writer. Can you explain please how the DS2502 Emulators works? Should i just run the code and connect the Data Pin from PSU into Arduino Digital9 port? Just to say I'm very very noob at this, i know some arduino stuff but nothing like this.

Ah just explaining what i need:
I got an Alienware M17xR2 with NO PSU
I got a 330W PSU from Alienware M18x R2, but dont work on M17x R2 because it's reconize max of 220w PSU.
I want to emulate or write in to DS2502 anything bellow 220W, i mean i dont mind to write 130w on a 330W PSU, i just want to power up my old Alienware M17xR2.

So could you link me any tutorial or what should i do to make it work?

Master unable to read emulated DS2438

I tested the DS2438 from M-o-a-T [1] to find that this is actually a fork of the code here. So I also tested this [2] and have the same issue that I cannot read from the sensor.

[1] https://github.com/M-o-a-T/OneWireHub/blob/master/examples/DS2438_battMon/DS2438_battMon.ino
[2] https://github.com/orgua/OneWireHub/blob/master/examples/DS2438_battMon/DS2438_battMon.ino

Details:

  • code used was the DS2438_battMon on an Arduino Uno board (R3)
  • master is a LinkHubE (iButtonLink) [3] emulating a DS2480B/9097U interface
  • software used was owfs v3.1p0 on a raspberry pi

Issue:

  • owfs does recognize the sensor and lists it but cannot read from it (listed in owdir, error in owread)
    "ServerRead: Data error on 26.00003824DA00/temperature"

[3] https://cdn.shopify.com/s/files/1/0164/3524/files/The_LINK_Family_Manual_1.7.pdf?7145028656254187831 e.g. pages 10 and 11

DS2433 slave not visible to master on parasite power

I'm running an Arduino Mega ADK as a DS2433 and when the I wire up the Arduino with a 4.7k resistor and connect it to a Maxim BlueDot reader attached to a DS9490R USB port adapter, everything works fine. However, when I attach leads to the unidentified-model reader built into a third-party linux device that I'm trying to interact with, the DS2443 is not shown.

I'm seeing READ_TIMESLOT_TIMEOUT errors when I enable serial debugging and using a logic analyzer to analyze 1Wire protocol I see the reset signal as being slightly too short (~475usec vs 480; not sure if that matters). If I have the BlueDot master wired in as well, the BlueDot can interact with the device but the unidentified-model reader cannot.

I suspect the issue is related to the linux device being in parasitic power mode. A DS1822 thermometer IC elsewhere on the bus registers on the device, so I know the bus is functional. Are there special steps required to enable compatibility with parasitic power mode or are there parameters that should focus on adjusting? Thank you!

Force overdrive from the start.

Sorry to bothering.
No sure this is the right place, anyway I try to ask while apologizing for the maybe crazy question.
In order to do some tests on a hardware device called Bus Pirate (http://dangerousprototypes.com/docs/Bus_Pirate) I am using this great and useful library with an Arduino MEGA 2560.
I came across the need to verify the operation of the 1-WIRE protocol in overdrive mode (BusPirate/Bus_Pirate#23) so here it is the point, it would be possible to set up library and skecth to force overdrive operation?
I mean modify things so that Arduino work out of the box as slave 1-WIRE device initialized and ready for overdrive communications, so that it is possible to query it at overdrive speed with no need to before switch parameters from standard to overdrive speed.
A native, ready to use 1-WIRE environment would be a great help in debugging.
By changing in OneWireHub_config.h

#define OVERDRIVE_ENABLE 0

to

#define OVERDRIVE_ENABLE 1

it is possible to enable overdrive, but how to force it as native? (of course if it is possible).
Thanks.

Be seeing you.

U.Sb

CRC problems with SparkFun Pro Micro

Hi
I am trying to use a SparkFun Pro Micro @16 MHz with the OneWireHub 2.0.
I am using the DS18B20 example with only one sensor to test. The problem I have is CRC8 errors when reading temperature, about 5-15% failure rate.
I have tried various things to try to understand the problem and its cause:

  • I have made a calibration giving VALUE_IPL=13. Result text as below:
    DEBUG TIMINGS for the HUB (measured in loops):
    (be sure to update VALUE_IPL in src/OneWireHub_config.h first!)
    value : 875 nanoseconds per loop
    reset min : 491
    reset max : 1097
    reset tout : 5714
    presence min : 22
    presence low : 182
    pres low max : 548
    msg hi timeout : 17142
    slot max : 154
    read1low : 68
    read std : 22
    write zero : 34

  • Checked other VALUE_IPL as well, <12 not working at all. 12 and 13 about the same, and 14 is worse, but still working.

  • At CRC error it seems like my master (Windows with DS9490R) is reading all 0xff.

  • Most testing done with out serial debug but when on I get "Error: first bit of byte timeout" when CRC exemption

  • Tested a program a pure loop using micros() for the delay. With 9995 us between toggle a readout 50.0 Hz with my multi meter (not sure about its accuracy).

  • I have no oscilloscope and can not check the 1-wire waveforms.

  • Using 1.6.11 of Arduino.

  • I have tested with a real DS18B20 and it worked perfekt. No errors when running ~5000 temperature readings

Would be fine with some hints on how to continue debugging. The possibilities with this SW seems great. But it must be more reliable.

Regards Jan

DS2408 example pin 7 assignment collides with GPIO_DEBUG_PIN

The DS2408 example assigns PIO pin 7 to Arduino pin 7; however, GPIO_DEBUG_PIN is also assigned to Arduino pin 7. It's a good set of mnemonic pin assignments in the example (10, 11, 2โ€“7 for P0โ€“P7) so perhaps it would be best to reassign the GPIO_DEBUG_PIN in OneWireHub_config.h

My version OneWireHub on IRQ

I made a version that does not require constant polling of the port, and works completely inside the interrupt.
This frees up resources for other tasks.
I have this option is used for data collection (also inside the interrupt) with several wireless temperature sensors and presenting their data as a garland DS18B20.
The object is made static, since it does not represent multiple similar objects in memory simultaneously, but it requires a static function handling the interrupt.
Not much changed the logic OneWireItem - now he does not refer to OneWireHub.
https://yadi.sk/d/dcJgSFr53HPEfC

The Serial debug does not affect performance and can be enabled always, since the output does not affect the delay
With all this I get some I do not understand the error, and asking for help in removing them.
In the screen shot.
I simply ignore, but I want to completely remove

Emulate 2 DS18b20

Hi, I when I try to emulate 2 ds18b20 my master couldn't read anything but when I emulate 1 ds18b20 with 1 ds18s20 my master can read the reading.

Is there any way to emulate 2 ds18b20 as there is always a 0.7 difference between ds18b20 and ds18s20?
Thank you.
Regards,
Nick

rename time_t

bad habit, naming things like seen in the unix-world. teensy has already time_t defined, so we have to rename it.

DS2430 support

Hello. What is about DS2430 support? Is it hard to implement this?
We tried to do it by coping DS2431 and modify in accordance with specs.

We achieved correct work with arduino EPROM reader(https://github.com/pceric/DallasEPROM), but our real device doesn't work with emulator, it is only able to read serial number.

crc16 of the ds2431

hi @j-langlois

could you give me hint where you got the start-value of the crc. the datasheet is missing some information. and does not mention anything else than flush/reset the crc16-input. i have extended the device and everythings works, except the eprom-mode.
i had trouble using your start-value and more luck with just 0.
ds2433 is very similar but doesn't mention any information either.

USE_GPIO_DEBUG

Hi!

Please consider patching sources to read:

#if USE_GPIO_DEBUG

instead of

#ifdef USE_GPIO_DEBUG

or debug pin is not switchable out at all.

TIA,
--Vladimir

Atmel Studio 7 - atmega328PB - compiling errors

I got same errors as this post here with AtmelStudio 7 and ATMEGA328PB. By adding thoses flags, most errors got solved, but im still getting

invalid conversion from 'unsigned char' to 'unsigned char*' [-fpermissive]

in:

T1 * portInputRegister(const T1 port) { return port; };

My pin declaration:

constexpr uint8_t pin_onewire   { 4 };

auto hub     = OneWireHub(pin_onewire);

Error: Invalid argument in OWFS

I am using an ATtiny85 to emulate DS2502.
It works fine with OWFS on Raspberry Pi

ds2502_pi

When using OWFS on Synology DS115 (Same compiled version as on Pi), I get an error: "Invalid argument"

ds2502_synology

I think it is a timing issue, but can I fix it?

PH and ORP Probs

Hi,

I was looking for a way to interface my Ardruino uno with my Raspberry pi. I used the Ardruino to connect my PH,ORP Probs. And what to send the data to a webserver on my Raspberry pi that support the 1wire devices. My 2 prob are connect via Phidgets adapter 1130_0
pin A0 for ph and A5 for ORP.
Device info:
PH Electrode
Model:PC2121-5M/BNC

ORP Electrode
Model: ASRA2801-5M-BNC

2xPhidgets adapter
Model: ORP/PH Adapter 1130_0

Can I used the OneWireHub code with my 2 Probs (Probably need some development) to connect via the usb to my Raspberry Pi? Can this be done?
Thanks
Pierre

Master unable to read emulated DS2431

This library seems perfect for what I'm trying to do, I have an actual DS2431 EEPROM chip and a master that can read everything off of the chip. For testing purposes I want to be able to emulate the chip and send data straight from my Arduino Uno for my master to read.

However even though the master works with a real chip I'm not seeing any sort of data with the DS 2431 example program. I tried it with both pins 8 and 2 (Interrupt pin for the Arduino Uno) but nothing! The libraries appear to be in order and the program compiles but looking at the data line all I see are 0xFF...

hub.attach(ds2408) fails if OneWire master is live and USE_GPIO_DEBUG

Again in the ds2408 example. The slave (OneWireHub) is connected to a master (OneWire) that is looping over a search for ds2408s. After a reset, the slave fails to initialize unless the OneWire pin is disconnected for a moment. The workaround was to turn off USE_GPIO_DEBUG in OneWireHub_config.h

The offending piece of code seems to be waitLoops1ms().

ATtiny85

Hi - very nice work!

Has ATtiny85 been tested?

I have changed LED-pin to 3 and OW-pin to 2.
Using ATtiny85 8 MHz
Compile with Arduino IDE 1.6.7 - compile ok.
Upload using Arduino Nano. - upload ok

Led is blinking, but device is not recognized. on OW master (using Raspberry Pi with I2C for OneWire and OWFS).

I have another implementation that works.
Details and code here http://palsbo.com/arduino/OneWireSlave.html

Port to Arduino NANO

Hello,

I try Example-Code that emulates a DS18B20 on Arduino MEGA and itยดs works great.

But on Arduino NANO, it stops on hub.attach(ds18b20); ...

Please do you have some ideas where is problem?

Many thanks,

Jan

CRC failure in DS2408

Hi @orgua

I have been able to work the example of the DS18b20 in a SAMD21 with the following modifications
#59

but I get the following error when trying the example of DS2408

CRC failure in DS2408 at 2900000824DA008A

Raspberry Pi... again

Hi

i'm trying to develop a python script that uses onewire (ds18b20), but i want to have a platform where i can test without the hardware

are there any guides on how to use this emulator on the pi? i have googled and no luck so far

Alarm Search ROM example

Hi!

Please consider provide some. A generic one just showing how to properly respond would suffice.

TIA,
--Vladimir

issues with Wemos D1 Mini

Hey Guys,
I was trying to use this library with Wemos W1 D1 Mini (Basically its ESP8266)

But I got Tons of error. I am new to Arduino and cant understand the error.
Can anyone help me to out to find they problem. Here is the error s

Arduino: 1.8.1 (Linux), Board: "WeMos D1 R2 & mini, 80 MHz, 115200, 4M (3M SPIFFS)"

/home/uptopoint/Software/arduino-1.8.1/arduino-builder -dump-prefs -logger=machine -hardware /home/uptopoint/Software/arduino-1.8.1/hardware -tools /home/uptopoint/Software/arduino-1.8.1/tools-builder -tools /home/uptopoint/Software/arduino-1.8.1/hardware/tools/avr -built-in-libraries /home/uptopoint/Software/arduino-1.8.1/libraries -libraries /home/uptopoint/Arduino/libraries -fqbn=esp8266com:esp8266:d1_mini:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M -ide-version=10801 -build-path /tmp/arduino_build_13235 -warnings=none -prefs=build.warn_data_percentage=75 -verbose /home/uptopoint/Workspace/OneWireHub/examples/DS2431_EEPROM/DS2431_EEPROM.ino
/home/uptopoint/Software/arduino-1.8.1/arduino-builder -compile -logger=machine -hardware /home/uptopoint/Software/arduino-1.8.1/hardware -tools /home/uptopoint/Software/arduino-1.8.1/tools-builder -tools /home/uptopoint/Software/arduino-1.8.1/hardware/tools/avr -built-in-libraries /home/uptopoint/Software/arduino-1.8.1/libraries -libraries /home/uptopoint/Arduino/libraries -fqbn=esp8266com:esp8266:d1_mini:CpuFrequency=80,UploadSpeed=115200,FlashSize=4M3M -ide-version=10801 -build-path /tmp/arduino_build_13235 -warnings=none -prefs=build.warn_data_percentage=75 -verbose /home/uptopoint/Workspace/OneWireHub/examples/DS2431_EEPROM/DS2431_EEPROM.ino
Using board 'd1_mini' from platform in folder: /home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266
Using core 'esp8266' from platform in folder: /home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266
WARNING: Spurious .settings folder in 'OneWireHub' library
Detecting libraries used...
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "/tmp/arduino_build_13235/sketch/DS2431_EEPROM.ino.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/tmp/arduino_build_13235/sketch/DS2431_EEPROM.ino.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/BAE910.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS18B20.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2401.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2405.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2408.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2413.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2423.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2431.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2433.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2438.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2450.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2502.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2506.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/DS2890.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.cpp" -o "/dev/null"
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireItem.cpp" -o "/dev/null"
Generating function prototypes...
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -ffunction-sections -fdata-sections -w -x c++ -E -CC -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/tmp/arduino_build_13235/sketch/DS2431_EEPROM.ino.cpp" -o "/tmp/arduino_build_13235/preproc/ctags_target_for_gcc_minus_e.cpp"
"/home/uptopoint/Software/arduino-1.8.1/tools-builder/ctags/5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_13235/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++" -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/lwip/include" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/tools/sdk/libc/xtensa-lx106-elf/include" "-I/tmp/arduino_build_13235/core" -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10801 -DARDUINO_ESP8266_WEMOS_D1MINI -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_WEMOS_D1MINI" -DESP8266 "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/cores/esp8266" "-I/home/uptopoint/Software/arduino-1.8.1/hardware/esp8266com/esp8266/variants/d1_mini" "-I/home/uptopoint/Arduino/libraries/OneWireHub/src" "/tmp/arduino_build_13235/sketch/DS2431_EEPROM.ino.cpp" -o "/tmp/arduino_build_13235/sketch/DS2431_EEPROM.ino.cpp.o"
In file included from /home/uptopoint/Workspace/OneWireHub/examples/DS2431_EEPROM/DS2431_EEPROM.ino:9:0:
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.h: In function 'constexpr uint32_t operator"" _us(long long unsigned int)':
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.h:15:1: error: division by zero is not a constant-expression
};
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.h: In function 'constexpr timeOW_t timeUsToLoops(uint16_t)':
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.h:20:1: error: division by zero is not a constant-expression
};
^
In file included from /home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub.h:22:0,
from /home/uptopoint/Workspace/OneWireHub/examples/DS2431_EEPROM/DS2431_EEPROM.ino:9:
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h: At global scope:
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:23:57: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_TIMEOUT = 5000_us; // for not hanging to long in reset-detection, lower value is better for more responsive applications, but can miss resets
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:24:58: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MIN[2] = { 430_us, 48_us }; // should be 480
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:24:66: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MIN[2] = { 430_us, 48_us }; // should be 480
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:25:58: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 960_us, 80_us }; // from ds2413
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:25:66: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_RESET_MAX[2] = { 960_us, 80_us }; // from ds2413
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:28:59: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_TIMEOUT = 20_us; // probe measures 25us, duration of high state between reset and presence
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:29:58: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MIN[2] = { 160_us, 8_us }; // was 125
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:29:67: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MIN[2] = { 160_us, 8_us }; // was 125
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:30:58: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MAX[2] = { 480_us, 32_us }; // should be 280, was 480
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:30:66: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_PRESENCE_MAX[2] = { 480_us, 32_us }; // should be 280, was 480
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:33:56: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_MSG_HIGH_TIMEOUT = 15000_us; // there can be these inactive / high timeperiods after reset / presence, this value defines the timeout for these
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:34:58: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_SLOT_MAX[2] = { 135_us, 30_us }; // should be 120, measured from falling edge to next falling edge
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:34:66: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_SLOT_MAX[2] = { 135_us, 30_us }; // should be 120, measured from falling edge to next falling edge
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:37:59: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 20_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:37:67: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MIN[2] = { 20_us, 4_us }; // should be 15, was 30, says when it is safe to read a valid bit
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:38:59: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MAX[2] = { 60_us, 10_us }; // low states (zeros) of a master should not exceed this time in a slot
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:38:66: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_READ_MAX[2] = { 60_us, 10_us }; // low states (zeros) of a master should not exceed this time in a slot
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:39:59: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_WRITE_ZERO[2] = { 30_us, 8_us }; // the hub holds a zero for this long
^
/home/uptopoint/Arduino/libraries/OneWireHub/src/OneWireHub_config.h:39:67: error: 'constexpr uint32_t operator"" _us(long long unsigned int)' called in a constant expression
constexpr timeOW_t ONEWIRE_TIME_WRITE_ZERO[2] = { 30_us, 8_us }; // the hub holds a zero for this long
^
Using library OneWireHub at version 2.0.0 in folder: /home/uptopoint/Arduino/libraries/OneWireHub
exit status 1
Error compiling for board WeMos D1 R2 & mini.

Master Unable To Read DS18b20 After Firmware Ugrade

Hi,
I'm using Arduino Pro Mini 5V/16MHz to emulate 2 DS18b20 temperature sensor.
My one wire master is a GPS device which can read any one wire device. Previously, I modified the timing of .h file until the master can read my emulated DS18b20 properly.

But recently, the GPS company publish a new firmware. And this new firmware cannot read the temperature reading, But by reading the GPS log using terminal, 2 DS18b20 were detected and ID were shown in the terminal but readings are not showing in the server. But when I try to downgrade GPS to old firmware, readings show on server immediately.

New firmware is able to show the readings of real DS18b20 on server. So I suspect it is write or read timing issue. But I have tried to adjust the timing by comparing the real DS18b20 timing and emulated timing using USBee AX PRO logic analyser but 2 seems like the same.

So hope I get get some help from you. Thank you.

DS2423 support

Hi, as far as I can see there are some initial support for DS2423 in the sourcecode. But there are currently no way to set the counters to a value. https://github.com/orgua/OneWireHub/blob/master/src/DS2423.h

As a newbee OneWire user and C++ developer it's hard for me to tell what have been done and what's left. No memory seems to be reserved for the 16 pages of 256 bit memory that the device should have.

I'm looking for the simple external counter support of the DS2423, does anyone out there have time to do a first implementation then I would gladly test it for you. Thank!

How to set all data pages to non protected mode in DS2431 EEPROM Simulator

Got the DS2431 EEPROM Simulator code(in examples and without change) running on the Arduino UNO.

Tested it by reading the data from it using Arduino Mega.
It Read the following data:

  1. Data before writing anything to it

ADDR= 2D 0 0 31 24 DA 0 A5
Reading from EEPROM as bits:

0                                  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
2  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
3  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
4  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
5  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
6  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
7  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
8  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
9  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
21 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
27 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 

  1. Data when I write some data in it:

ADDR= 2D 0 0 31 24 DA 0 A5
Reading from EEPROM as bits

0    1 1         1   1 1       1   1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
1  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
2  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
3  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
4  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
5  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
6  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
7  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
8  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
9  1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
11 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
12 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
13 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
15 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
16 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
17 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
19 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
21 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
22 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
23 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
24 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
25 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
26 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
27 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
28 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
29 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
30 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 
31 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Notice that only first 16 bits can be written rest all have '1'.
I think they must be in protected mode.
My question is how can I write to the rest pages by removing the protected mode.

What do the following line work in the code?
auto ds2431 = DS2431(DS2431::family_code, 0x00, 0x00, 0x31, 0x24, 0xDA, 0x00);

Raspberry Pi compatbility

Using GPIO4 that is.
Has someone managed to read emulated senors with Raspberry Pi via GPIO?

Hardware 18B20 on either side of a level shifter work as expected, the emulated sensors are a no-go. (Arduino nano, Arduino pro mirco 3.3V, ESP8266)
Reading the emulated sensors via various software bus masters works.

Switch to DS2482 / DS2484 as physical bus master. - Or find the mistake?

Master LinkUSB problem.

Hi.

In first, thank you very much for this library!

On master DS9490R all work fine, without problem.
But today I change my master to LinkUSB... And unfortunately all arduino devices disappeared from network (real 1wire devices still present without problem).

Where may be problem??

ESP8266 compatiility

Did anybody tried to run this lib on esp8266?
I can compile but i t cannot run, Im always getting this error (tried several examples with pio 5 as onewire pin):
` ets Jan 8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
`

RaspberryPi doesn't recognize OneWireHub

I have a OneWireHub running on Arduino Pro Mini, emulating two ds2408 and one ds18b20. I can see it from another Pro Mini; however, RaspberryPi doesn't recognize it.

DS18B20 sends wrong family code and wrong ROM

Hi,

I used a atmega1284 to create a DS18B20 thermometer. The thermometer is working fine but when the search command(0x0F) is send my familiy code and ROM is totally different as when the match command (0x55) is send. Does someone know what the problem is here?

match
search

I used the example to emulate the DS18B20.

/*

#include "OneWireHub.h"
#include "DS18B20.h" // Digital Thermometer, 12bit

#include <SoftwareSerial.h>

constexpr uint8_t pin_led { 5 };
constexpr uint8_t pin_onewire { 3 };

auto hub = OneWireHub(pin_onewire);

auto ds18b20 = DS18B20(DS18B20::family_code, 0x00, 0x00, 0xB2, 0x18, 0xDA, 0x00); // DS18B20: 9-12bit, -55 - +85 degC
//auto ds18s20 = DS18B20(0x10, 0x00, 0x00, 0xA2, 0x18, 0xDA, 0x00); // DS18S20: 9 bit, -55 - +85 degC
//auto ds1822 = DS18B20(0x22, 0x00, 0x00, 0x22, 0x18, 0xDA, 0x00); // DS1822: 9-12bit, -55 - +125 degC

bool blinking(void);

SoftwareSerial mySerial(2, 4); // RX, TX

void setup()
{
mySerial.begin(9600);
mySerial.println("OneWire-Hub DS18B20 Temperature-Sensor");
mySerial.flush();

pinMode(pin_led, OUTPUT);

// Setup OneWire
hub.attach(ds18b20);

}

void loop()
{
ds18b20.scratchpad[2] = 0x96;
ds18b20.scratchpad[3] = 0x81;
// following function must be called periodically
hub.poll();
// this part is just for debugging (USE_mySerial_DEBUG in OneWire.h must be enabled for output)
if (hub.hasError()) hub.printError();

// Blink triggers the state-change
if (blinking())
{
    // Set temp
    static float temperature = 20.0;
    temperature += 0.1;
    if (temperature > 30.0) temperature = 20.0;
    ds18b20.setTemperature(temperature);       
}

}

bool blinking(void)
{
constexpr uint32_t interval = 1000; // interval at which to blink (milliseconds)
static uint32_t nextMillis = millis(); // will store next time LED will updated

if (millis() > nextMillis)
{
    nextMillis += interval;             // save the next time you blinked the LED
    static uint8_t ledState = LOW;      // ledState used to set the LED
    if (ledState == LOW)    ledState = HIGH;
    else                    ledState = LOW;
    digitalWrite(pin_led, ledState);
    return 1;
}
return 0;

}

Onewirehub devices crashes all onewirenet after some time

I have noticed that after a few hours/days uptime on my emulated devices (and all my "real" devices) are lost in OWFS. They simply are no longer listed, and a power toggle of the master RPI is needed to get back up again. Could this be timing related? In my net I have DS2890 and some of DS2405/08/13 connected.

Running on attiny85 and DS2482-800 as master on an RPI.

DS2405 on attiny85 with Domoticz

Hi,

trying to make DS2405 work with Domoticz. Problem is that it ds2405 example (modified) changes state on positive flanks (in order to set a digital 1 and then 0 on led pin requires putting PIO to 1-0-1. Probably this is correct according to DS2405 datasheet but it does not work well with Domoticz implementation. Any suggestions on how to solve this?

My modified DS2405 example:

#include "OneWireHub.h"
#include "DS2405.h"  // switch
constexpr uint8_t pin_led       { 1 };
constexpr uint8_t pin_onewire   { 0 };
constexpr uint8_t addr[6]= {0x01, 0x00, 0x00, 0x00, 0x00, 0x00};

auto hub    = OneWireHub(pin_onewire);
auto ds2405 = DS2405( DS2405::family_code, addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);    


void setup()
{
    uint8_t i;
    pinMode(pin_led, OUTPUT);
    hub.attach(ds2405);
    ds2405.setPinState(0);
}

void loop()
{
    // following function must be called periodically
    hub.poll();
	//Keep busy doing nothing
    doSomething(); 
    digitalWrite(pin_led, ds2405.getPinState());
}

bool doSomething(void)
{
    const  uint32_t interval    = 1000;          
    static uint32_t nextMillis  = millis();     

    if (millis() > nextMillis)
    {
        nextMillis += interval;             
        return 1;
    }
    return 0;
}

OneWireHub Issues - Trouble getting started

I have read the documentation and library code and I first have tot thank you for putting this project together! My ultimate goal is to get your DS2433 example working.

The master I am using is the DS9490R USB/1-wire interface from Maxim from their iButton starter kit. I am using Maxim's OneWireViewer to view information on connected slave devices, working without issue for authentic iButton tags and another public, but more limited Arduino sketch. The OneWireViewer does seem to always have one DS2401 virtual slave connected which I didn't think would cause a problem with this library which supports so many 1-wire devices on one bus.

The basics of my issue is when I run any example (even the simple DS2401 example) the master never sees my emulated slave. I have placed print statements throughout the library to determine it is able to see the bus but it never recognizes any data and never responds to ROM search and never send it's serial number. I have enabled serial and GPIO debugging and see the GPIO representing the presence reply has been executed successfully. As you can see below, the show_presence() timing seems to be good.

gpio_presence

I have tried the examples with and Arduino Uno, Arduino Pro Mini, and a Teensy 3.2 (@72Mhz and 96Mhz overclocked) without any luck.

The example code works on an emulated master (serial number is returned). With an emulated master I cannot get a the DS2433 example to respond to a 0xF0 0x00 0x00 coomand to read memory. So I figured it was a bus timing issue with the master and ran the calibrate_by_bus_timing example and received the following output using my Teensy 3.2:

OneWire-Hub calibration by observing the OW-Bus
7 instructions per loop
DEBUG TIMINGS for the HUB (measured in loops):
(be sure to update VALUE_IPL in src/OneWireHub_config.h first!)
value : 83 nanoseconds per loop
reset min : 5160
reset max : 11520
reset tout : 60000
presence min : 240
presence low : 1920
pres low max : 5760
msg hi timeout : 180000
slot max : 1620
read1low : 720
read std : 240
write zero : 360

I'm not entirely sure how to implement these values yet but figured posting them here might spark and idea. I have not modified the values in platform.h thus far. Any pointers are greatly appreciated!

valid4kread
validreset_presence
validromsearch

DS2431 support

dear friend,
thanks for the great work! definitely the best codebase I've seen to simulate 1-wire slaves. I've been playing around with the library for the last few days, and have successfully implemented all the operations for the DS2431 1kb EEPROM, tested on mega 328p using DS9490 and the bus pirate. However, I have found out that for a particular master, the slave will have timing issues, throwing WRITE_TIMESLOT_TIMEOUT errors. I've been playing around adjusting the delays from the manufacturer's datasheet without any success. Any hint would be greatly appreciated. I intend on cleaning my code and submitting a pull request later on.
Thanks
Joel

Arduino NANO, CRC not ok, and no DS18x temperatures transmitted.

Hello,

I am currently testing the Arduino Nano as a slave in the following setup, two Nanos connected to each other:

  • one using #include <OneWire.h> as a master with a 4,7k pull-up on the dataline, non-parasitic setup
  • a second one using #include "OneWireHub.h" v2.2.1 as a slave (emulating 8 sensors), IDE 1.8.5
  • a hardware DS18B20 is added on the same bus, acting as a control mechanism

Here is what the master sees when polling (COM port output slightly edited for your viewing pleasure):

ms ;   ROM                  ;Chip;Address;    CRC                   ;  C  ;  F
 14;10  4 55 44 33 22 11 27 ;DS18S20;1;FF FF FF FF FF FF FF FF FF C9;-0.50;31.10;
 50;10  5 55 44 33 22 11 10 ;DS18S20;1;FF FF FF FF FF FF FF FF FF C9;-0.50;31.10;
 84;28  0 55 44 33 22 11 1E ;DS18B20;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89;
120;28  2 55 44 33 22 11 70 ;DS18B20;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89;
156;28  1 55 44 33 22 11 29 ;DS18B20;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89;
191;28  3 55 44 33 22 11 47 ;DS18B20;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89;
227;28 8B  D 43 98  4  0 BE ;DS18B20;1;89  1 64  5 7F  0  0 FF  C  C;24.56;76.21;
262;22  6 55 44 33 22 11 27 ;DS1822 ;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89;
297;22  7 55 44 33 22 11 10 ;DS1822 ;1;FF FF FF FF FF FF FF FF FF C9;-0.06;31.89; 

Obviously, there seems to be an issue with the emulated sensors, the hardware one (at 227ms) is fine!

What I did so far:

The calibration was run, and usually spits out the value 12:

OneWire-Hub calibration by observing the OW-Bus
12 instructions per loop
13 instructions per loop
12 instructions per loop
12 instructions per loop

This value has been updated in the AVR section of the \libraries\OneWireHub\src\platform.h file (I found out that this section is used when the compiler runs):

#if defined(__AVR__) /* arduino (all with atmega, atiny) */

#define PIN_TO_BASEREG(pin)             (portInputRegister(digitalPinToPort(pin)))
#define PIN_TO_BITMASK(pin)             (digitalPinToBitMask(pin))
#define DIRECT_READ(base, mask)         (((*(base)) & (mask)) ? 1 : 0)
#define DIRECT_MODE_INPUT(base, mask)   ((*((base)+1)) &= ~(mask))
#define DIRECT_MODE_OUTPUT(base, mask)  ((*((base)+1)) |= (mask))
#define DIRECT_WRITE_LOW(base, mask)    ((*((base)+2)) &= ~(mask))
#define DIRECT_WRITE_HIGH(base, mask)   ((*((base)+2)) |= (mask))
using io_reg_t = uint8_t; // define special datatype for register-access
constexpr uint8_t VALUE_IPL {12}; // instructions per loop, compare 0 takes 11, compare 1 takes 13 cycles

Since the different addresses are transmitted without any issue, my guess is that the bus is working fine.
Maybe there is something with the variables (int8, int16, float and so on); here is the code on the slave side, where I tested different ways to set the virtual DS18 temperature values :

/*
 *    Example-Code that emulates a bunch of DS18B20 and puts values in it
 */

constexpr bool enable_debug = 1;

#include "OneWireHub.h"
#include "DS18B20.h"
#include <Wire.h>
      
constexpr uint8_t pin_onewire   { 2 };

auto hub    = OneWireHub(pin_onewire);
                    
//               chip 0x10: DS 18 S 20
//                    0x22: DS 18   22
//                    0x28: DS 18 B 20
auto ds18b0 = DS18B20(0x28, 0x00, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b1 = DS18B20(0x28, 0x01, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b2 = DS18B20(0x28, 0x02, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b3 = DS18B20(0x28, 0x03, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b4 = DS18B20(0x10, 0x04, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b5 = DS18B20(0x10, 0x05, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b6 = DS18B20(0x22, 0x06, 0x55, 0x44, 0x33, 0x22, 0x11); 
auto ds18b7 = DS18B20(0x22, 0x07, 0x55, 0x44, 0x33, 0x22, 0x11); 

void setup()
{
    if (enable_debug)
    {
        Serial.begin(115200);
        Serial.println("OneWire-Hub DS18B20 Temperature-Sensor");
        Serial.flush();    
    }

    // Setup OneWire
    hub.attach(ds18b0);
    hub.attach(ds18b1);
    hub.attach(ds18b2);
    hub.attach(ds18b3);
    hub.attach(ds18b4);
    hub.attach(ds18b5);
    hub.attach(ds18b6);
    hub.attach(ds18b7);
}

void loop()
{
    const int8_t temperature_degC = 75;   // tried to declare vars in different manners, 
    static float _temperature = 20.0;     // thinking it was linked to that. Didn't work ;)
           float _temperature2 = 42.0f;

    // following function must be called periodically
    hub.poll();
    ds18b0.setTemperatureRaw(0);
    ds18b1.setTemperatureRaw(_temperature);
    ds18b2.setTemperature(_temperature2);
    ds18b3.setTemperature(_temperature2);
    ds18b4.setTemperatureRaw(40);
    ds18b5.setTemperature(int8_t(-50));
    ds18b6.setTemperatureRaw(temperature_degC);
    ds18b7.setTemperature(temperature_degC);
}

Or maybe it's in the OneWireHub library itself ?

findstr /s crc libraries\OneWireHub\src*

shows that the CRC for exemple, is handled in different files:

DS18B20.cpp: scratchpad[8] = crc8(scratchpad, 8);
DS18B20.cpp: hub->recv(&scratchpad[2], 3); // dont return here, so crc gets updated even if write not complete
...
OneWireHub.cpp
OneWireHub.h
OneWireItem.cpp
OneWireItem.h

A last thing I tested, was using another slave library OneWireArduinoSlave with the DallasTemperature/Multiple master from Arduino IDE example sketches.
The results are baffling: again, the hardware DS18 is ok, whereas the virtual ones have a CRC value equal 00 (instead of all FF for OneWireHub sensors), and no way to set the temperature values on the virtual DS18 either. I guess there is a common code-base somewhere :)

So, basically that's where I am stuck:
The two Nanos communicate through the 1-Wire bus, but somehow I can't get the virtual temperature values transmitted.

DigiSpark Attiny85 fix for compiling errors due to missing gnu++11 flag

Compiling can fail with all sorts of errors, due to a missing -std=gnu++11 flag in:

"C:\Users%username%\AppData\Local\Arduino15\packages\digispark\hardware\avr\1.0.0\platform.txt"

I got it working modifying compiler.cpp.flags= by adding the missing flag at the end of the list, like so:

compiler.cpp.flags=-c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -std=gnu++11

After this, everything is fine !

Sketch uses 5910 bytes (98%) of program storage space. Maximum is 6012 bytes.
Global variables use 181 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)

By the way, I am running the Attiny85 slave on pin 0 (contrary to the suggested pin 2, because I needed all the A0-A3):

/*   4CH ADC over 1-Wire  
          +-DigiSpark-----------------+
          |  __                       |
          | /  \               A0 [o] |1 P5
          | \__/               A2 [o]~|3 P4 USB-
         ++-----+              A3 [o] |2 P3 USB+
         | uUSB |  i0 SCK  SCL A1 [o]~|7 P2 USCK
         ++--__-+     MISO        [ ]~|6 P1
          | /  \      MOSI SDA    [o]~|5 P0 AREF
          | \__/  [o][o][ ]           | 
          +------------------Attiny85-+          
                  5V GND Vin(6-16V)
*/

constexpr uint8_t pin_onewire   { 0 }; //0 is P0, 1 is P1

and it worked well, 4x DS18B20 are received on the master which is a NANO running orgua's OneWire.h (but I still can't get the DS2450 to work without a CRC error, neither on the NANO as slave nor the Attiny85 as slave, and I am not sure if it's due to the CRC calculation itself or a bus timing issue - logic analyser should arrive soon ๐Ÿพ ).

In summary, I fixed my compiling issues by adding the above mentioned flag.
Oh, and OneWireHub is an awesome library!

No presence after an aborted Search ROM

Hi,
I am trying to develop a DS1990A emulator that is supposed to work with some generic access control systems and I've stumbled upon two issues which original 1990-s do not exhibit.

The first one is, the library does not generate a presence pulse when the slave device is first connected to the bus (i mean, physically). Obviously, master (that does not have to continuously poll the line) does not know that a device has been connected and therefore does not start communication. Of course this issue can be solved pretty easily by monitoring the bus "manually" prior to calling hub.poll(), but as an essential part of any ds2401-like slave's functionality it really should be a part of the lib. Also very long low pulses should be probably considered a disconnect from the bus... And a large pulldown resistor (I am using 100k) has to be present to avoid floating. Not sure how to implement it though, use RESET_TOO_LONG maybe.

As for the second one... I've come across a master device that issues only two timeslots after sending 0xF0 (Search ROM) command and then aborts the transaction issuing a reset (see attachment). Of course, the master expects a presence pulse to follow that reset, but OneWireHub does not generate it (at all, with out-of-the-box timings). Consequently, master restarts communication process again and again thinking that the device is disconnected every time. I've created a clone of that master using Arduino Nano and I've been able to reproduce the issue right away (and perform some tests).
While I was searching for a solution I found out that I was using an old version of the library (2.0.0) and I upgraded it to the latest, however it didn't help.
Using v 2.0.0 I've been able to make presence pulse appear occasionally (almost 50/50 probability ratio) by playing with timings (i reckon I mostly reduced timeslot length and increased write zero time, tweaked reset/presence length just a little bit), but when I updated the lib config was overwritten and I never managed to get presence again.
In 2.0.0 the problem was somehow dependent on previous transactions. My particular master sends three commands in the following order: 0x33, 0x03, 0xF0. The problem disappeared when I changed the order to 0x03, 0x33, 0xF0. Yes, 0x03 is a non-standard one and my slave is not supposed to answer it at all, its purpose is to identify rewritable (and non-finalized) devices such as RW1990 (for them 0x03 and 0x33 are identical). Once again, for latest version order makes no difference - the issue just persists, no matter what.

I've looked through the library code and found no obvious flaws: the workflow seems completely legit. SearchIDTree exits with RESET_IN_PROGRESS error when comes across a reset pulse instead of a timeslot, then poll starts again from the beginning, i.e. from reset detection. But I can't understand why reset detection fails. Is time consumed somewhere and the pulse becomes too short to be identified as reset? My code basically calls only hub.poll() inside loop() and performs a single direct pin reading, so delays between polls are almost as short as possible. Only one DS2401 is attached to the hub. No serial or debug whatsoever. Calibration seems to be spot-on, ONEWIRE_TIME_WRITE_ZERO remains within 1uS tolerance according to logic analyzer.
I'm running Arduino Uno @ 16MHz, arduino IDE v1.8.5.
Here is some logic analyzer data related to the second issue. Green is genuine, blue is emulated. Look at the last pulse (and its absence).
image
Overall communication structure remains the same.
image

DS18B20 thermometer example?

Please excuse me if I'm missing something, but shouldn't the example for the DS18B20 thermometer have code that starts the read cycle and then reads the temperature from the thermometer? All that file seems to contain is test code and no "real" reading of the thermometer.

Thanks.

ATtiny85 one wire issue

I want to emulate a DS18B20 sensor from an ATTiny85. I have followed your instructions the best I can but fail to get it to work. Using an Uno, I can try to read the OW temperatures. The device number (ROM) is ok, but the temperature data is erratic and coming through as mostly FF's.

  1. Latest master repository from git

  2. 1.8.1 version of Arduino IDE

  3. Use serial debug and use gpio debug both set to 0 in onewirehub_config

  4. A real DA18B20 sensor works properly with my OW master Uno

  5. Your "calibrate_by_bus_timing" sketch does not seem to run on either my ATtiny85 or Uno, unless I am not using it correctly. It just shows report the "OneWire-Hub calibration by observing the OW-Bus" via serial. nothing more, and the led pin doesn't blink

  6. The attiny85-4slaves.ino debug example fails to compile due to an ambiguious error

  7. I can see that the ds18b20 sensor is receiving and reporting the correct number via the below lines in the test sketch, but the digital value via OW is not correct.

    mySerial.print("Test - set Temperatures to 0 degC: ");
    ds18b20.setTemperature(int8_t(0));
    mySerial.print(ds18b20.getTemperature());

I have a scope and can look at the one wire signal, but I do not know what feature to monitor or which of the timing values to change.

DS2501 and DS2502

Those chips are DS2433 with an extra CRC instruction. Maybe they can be implemented based on DS2433 code?

Those devices are used in Dell laptop power supplies however they fry too often. This is where emulating them comes in handy.

Unpowered device breaks bus...

First, thank you for this superb library ๐Ÿ‘

Currently we are building a soil-moisture sensor which will be released as open-source. It emulates the DS2438 and reads the temperature from an attached (real) DS18B20 as well as "borrowing" the serial number from it to get a unique device id. We ware also using the DS2438's memory to store configuration data. Additionally we work on a configuration device based on an ESP8266 to configure the sensors with a smartphone over onewire.

1wire-sensor-node-prototype

We are currently in the prototype phase and everything works out great. But, we are stuck with one problem:

When we cut the 5V line of the sensor (slave) the bus breaks down, meaning we can't read data anymore.
We are testing with our ESP8266 implementation and an 3,3 to 5V level shifter based on a BS170. The sensor (slave) uses pin A0 of the ATMega328p and is directly wired to the onewire bus.

My first thought was the internal resistence of the ATmega when it's unpowered (A0-GND), but this should be high enough to not interfere with the pull-up for the onewire line of the master (2k2@5V).

Do you have any suggestion how to separate the onewire slave - meaning ATMega328p - when it's not powered? Did we miss something on the slave connecting to the bus?

Would be great to have your input on this.

Cheers,
Patrik

Pro Micro Board compatability

Hi,

I've just come across your project and I'm impressed with the work. I'm trying to get it to run with my existing project for a test.

I have a LEONARDO board running as a master One Wire device. Connected are two DS18B20 temperature probes that are detected at start up, and polled for temperature with no issue.

I have compiled the OneWireHub example on a Pro Micro (LEONARDO clone, ATmega32) and linked it in as a Slave device. I cannot detect it and get no reading back, however, the debug output shows that it is receiving commands, (example below.)

Is the Pro Micro compatible? Is there something else I should be doing or another example I should try?

Thanks.
Graeme.

Example Error debug output:
Err: incorrect onewire command
cmd : 0 HEX: 0
Err: incorrect onewire command
cmd : 0 HEX: 0
Err: incorrect onewire command
cmd : 204 HEX: CC
cmd : 85 HEX: 55
cmd : 0 HEX: 0
Err: incorrect onewire command

Loxone and Wemos D1

I tried to emulate a DS2438 on a Wemos D1 and find the "sensor" with Loxone. The Wemos D1 has only 3,3V pins so I used a level shifter to rise the signal to 5V. But it couldn't be found.

My wiring scheme is this:
1wire-scheme

My current code is this

#include "OneWireHub.h"
#include "DS2438.h"

constexpr uint8_t pin_led{LED_BUILTIN};
constexpr uint8_t pin_onewire{0}; // Arduino D3

auto hub = OneWireHub(pin_onewire);
auto ds2438 = DS2438(DS2438::family_code, 0x00, 0x00, 0x38, 0x24, 0xDA, 0x00); // todo what hex code for serial number

// the setup function runs once when you press reset or power the board
void setup()
{
	Serial.begin(115200);
	Serial.println("OneWire-Hub DS2438 BME680");

	pinMode(pin_led, OUTPUT);

	// Setup OneWire
	hub.attach(ds2438);

	Serial.print("Test: set Temperature in float 38 deg C: ");
	ds2438.setTemperature(38.0f);  // can vary from -55 to 125deg
	Serial.println(ds2438.getTemperature());
}

// the loop function runs over and over again until power down or reset
void loop()
{
	// following function must be called periodically
	hub.poll();

	// Blink triggers the state-change
	if (blinking())
	{
		static float    temp = 10.0;
		static uint16_t volt_10mV = 10;
		static uint16_t current = 10;

		if ((temp += 0.05) > 30.0) temp = 10.0;
		if ((volt_10mV++) > 200) volt_10mV = 10;
		if ((current++)   > 200) current = 10;

		ds2438.setTemperature(temp);
		ds2438.setVoltage(volt_10mV);
		ds2438.setCurrent(current);

		Serial.println(temp);
	}
}

bool blinking(void)
{
	const  uint32_t interval = 2000;          // interval at which to blink (milliseconds)
	static uint32_t nextMillis = millis();     // will store next time LED will updated

	if (millis() > nextMillis)
	{
		nextMillis += interval;             // save the next time you blinked the LED
		static uint8_t ledState = LOW;      // ledState used to set the LED
		if (ledState == LOW)    ledState = HIGH;
		else                    ledState = LOW;
		digitalWrite(pin_led, ledState);
		return 1;
	}
	return 0;
}

Is this correct or am I missing something?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.