#robotics Logs

Mar 07 2018

#robotics Calendar

10:04 AM hackman127: rue_, long time! And thanks, btw, every little bit helps!
12:31 PM Tom_itx is now known as Tom_L
03:25 PM veverak: nobody here tday?
03:26 PM veverak: :)
03:26 PM Tom_L: NOPE
03:26 PM veverak: cool
03:26 PM veverak: anybody what can cause "Bad file descriptor" on file write on raspberry?
03:27 PM veverak: I did opened the /dev/i2c-1 with O_RDWR
03:27 PM Tom_L: can't help with arm
03:27 PM veverak: does not have to be related to the HW really I think
03:27 PM veverak: A. i2c-1 opened with O_RDWR
03:27 PM veverak: B. write failed with "Bad file descriptor"
03:29 PM Tom_L: describe it better
03:29 PM veverak: fd = open( "/dev/i2c-1", O_RDWR);
03:30 PM veverak: ret = write( fd, bytes, 2);
03:30 PM veverak: ret == -1
03:30 PM veverak: errno says "Bad file descriptor"
03:30 PM veverak: file rights on the /dev/i2c-1 are OK
03:31 PM veverak: the fd is '10', so no error during the openning of the i2c
03:32 PM veverak: also, ioctl( fd, I2C_SLAVE, addr ) did not returned any error
03:32 PM Tom_L: what do they use for debuggers on those?
03:35 PM veverak: cgdb?
03:35 PM veverak: :)
03:35 PM veverak: or on i2c?
03:39 PM veverak: ok, fuck me
03:39 PM veverak: addres was not '40', but 64
03:39 PM veverak: in dec
03:39 PM veverak: as it was 40 in hex
03:40 PM veverak: hmm, but it still does not work
03:40 PM veverak: i2cset 1 64 250 0
03:40 PM veverak: is bash command, to send byte '0', to register '250', to device '64', on bus 1
03:40 PM veverak: which works correctly
03:40 PM veverak: or does not report an error
04:11 PM DEA_ is now known as deacyde2point0
04:39 PM veverak: on the other hand, I am happy with the state of the code https://github.com/Schpin/schpin-ros/blob/master/schpin_control/include/i2c.h
04:39 PM veverak: maybe I could find a way for writing the readByte on fewer lines
06:07 PM dravine: veverak nice!
06:07 PM dravine: I've been writing some drivers for a few chips on an embedded project for the last few weeks
09:49 PM id4rk_ is now known as id4rk
10:50 PM mrdata__ is now known as mrdata