Dangerous Prototypes

Dangerous Prototypes => Bus Pirate Support => Topic started by: jackyjoy123 on November 28, 2020, 02:23:00 pm

Title: Trouble using bit bang mode with 1-wire protocol ?..
Post by: jackyjoy123 on November 28, 2020, 02:23:00 pm
Hello,

I'm playing around with python scripting for the BP through the bit bang mode. I've got a Dallas 1-wire temperature sensor (18B20) that I have no problem communicating with through the serial terminal.  When I try to do the same through bit bang mode I'm unable to read data. Here's what I'm attempting:

1. Open the proper port
2. Send as string of twenty 0x00 to put it in bit bang mode (sends back BBIO1 as expected)
3. Send 0x04 to get into 1-wire mode (sends back 1W01 as expected)
4. Turn on voltage regulator by sending 0x48 (LED lights up as expected)
5. Scan for 1-wire address by sending 0x08 (Expected address comes back)
Here's where the problems start?
6. I need to send a matchrom signal (0x55) followed by the 8-byte address, then the start conversion command (0x44). I send the bulkwrite command in front of these like so: 0x19 0x55 0x28 0xa8 0xcd 0x5e 0x02 0x00 0x00 0xaf 0x44. I get back a six 0x01.
7 I then need to read the temp so I send 0xbe instead of 0xhh at the end: 0x19 0x55 0x28 0xa8 0xcd 0x5e 0x02 0x00 0x00 0xaf 0xbe.

No dice. I get a string of 0x01 back again.

Any idea why I'm not getting the expected results for steps 6 and 7?

thanks
jackyjoy

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.00902048696session_write_close ( )...(null):0
20.00932180288ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.00932181064Database_MySQL->query( ).../DatabaseHandler.php:119
40.05372319800Database_MySQL->error( ).../Db-mysql.class.php:273