**** BEGIN LOGGING AT Thu Apr 16 02:59:57 2020 Apr 16 07:55:25 hi...ian rhino, iam new user and try use beaglebonegreen wireless. Iam update my beaglebone from mmc with new image AM3358 Debian 10.3 2020-04-06 4GB eMMC IoT Flasher, after end flash and turn off beagleboard i canot akses it from usb or wifi like before update firmware. Everybody please help me Apr 16 21:38:03 if I am expecting a hex value returned to me can I put it in a ssize_t Apr 16 21:46:00 also what does it mean for hex to have most significant bit cleared Apr 16 22:14:05 mastermind__: your question makes no sense Apr 16 22:14:20 hexadecimal is just a way to represent numbers Apr 16 22:14:25 to humans Apr 16 22:28:41 mastermind__ what are you trying to do? (over all not specifically) are you processing text from an application or a script? Apr 16 22:46:18 seems they are gone. Apr 16 23:51:39 can echo a hex code Apr 16 23:51:44 like 0x11 Apr 16 23:51:53 and it will be interpreted as hex Apr 16 23:52:10 i want to diagnose what the hell the controller is doing outside a program Apr 16 23:54:37 MattB0ne: ? Apr 16 23:55:35 so I have a jrk motor controller that I am communicating via serial. I am getting a response from the controller but not what I am expecting. So for example setting a target to 4000 and getting back a number like 30000 for the same variable Apr 16 23:55:51 so I think there is a bug in my code but I just would like to talk to the board man to man Apr 16 23:55:59 man to machine Apr 16 23:56:13 so I tried cat on /dev/ttyS4 Apr 16 23:56:18 but it does not stay open Apr 16 23:56:46 so now I have screen /dev/ttyS4 9600 -crtscts Apr 16 23:56:49 in one terminal Apr 16 23:56:50 didn't that thing use a binary protocol anyway? Apr 16 23:57:11 and I am trying hex or decimal Apr 16 23:57:14 i think Apr 16 23:57:21 i do not see any binary commands Apr 16 23:57:45 yeah I mentioned this already last time, it uses a binary protocol so using a terminal is not going to work Apr 16 23:58:04 you need to send and receive data that isn't text Apr 16 23:58:21 so echo 0xA1 > /dev/ttyS4 Apr 16 23:58:28 will not work Apr 16 23:58:37 since that sends a 4-byte string "0xA1" Apr 16 23:58:42 not a single 0xA1 byte Apr 16 23:58:53 how about via screen Apr 16 23:58:58 same thing Apr 16 23:59:18 is there a manual way of sending binary Apr 16 23:59:25 or I have to code it Apr 17 00:00:02 i see what you mean now by binary Apr 17 00:00:15 doing it with code is probably easier than trying to do it "manually" Apr 17 00:00:22 especially for receiving and decoding the responses Apr 17 00:01:18 echo "0xA1" actually outputs 5 bytes, not 4, specifically 0x30 0x78 0x41 0x31 0x0a (I forgot about the newline) Apr 17 00:02:44 after I have an open connection what is the most generic read statement I can get Apr 17 00:02:54 like just pipe everything to the screen Apr 17 00:03:08 I am worried me trying to store it in a variable is messing it up Apr 17 00:03:09 I have no idea what you mean by that Apr 17 00:03:22 I'd just use a python script or something Apr 17 00:03:32 or even just use pyserial via python's repl Apr 17 00:03:42 that way you can send and receive binary data with ease Apr 17 00:03:51 ok let me check that out Apr 17 00:04:36 e.g. port.write(b'\xA1') would send a single 0xA1 byte (where "port" is the serial port object) Apr 17 00:05:40 or if you prefer you could nodejs or C/C++ or perl or pretty much any other language Apr 17 00:09:16 i think pyserial will be the easiest Apr 17 00:09:24 though how would it work in a c program Apr 17 00:09:45 i do not need to confiugre the port at all? Apr 17 00:09:50 configure* Apr 17 00:10:20 pyserial is definitely easier than C Apr 17 00:11:10 more importantly, python allows you to easily test stuff interactively Apr 17 00:11:12 pyserial it is Apr 17 00:12:43 i wonder why even the new images ship with python2.7 Apr 17 00:12:50 they ship with both Apr 17 00:12:59 but I think some stuff in debian still depends on python2 Apr 17 00:13:09 but they're working on phasing it out Apr 17 00:13:55 or maybe rcn still includes it intentionally (alongside python3) for people who are still using it... I hope not Apr 17 00:14:20 regardless, you shouldn't use it Apr 17 00:14:23 use python3 Apr 17 00:16:14 ok i am in python3 Apr 17 00:16:20 and used pip3 to get pyserial Apr 17 00:16:36 so I tried to write to the serial port and it shot back a 1 Apr 17 00:16:42 is that the response Apr 17 00:16:49 or is it telling me it failed Apr 17 00:16:50 no, that's the number of bytes written Apr 17 00:17:10 failures in python generally raise an exception Apr 17 00:17:16 so that's simply success Apr 17 00:17:46 so if I read the port I get back what I wrote Apr 17 00:18:19 i am not looped back so that went to the board Apr 17 00:18:27 the controller I mean Apr 17 00:19:02 if I type read again it is hung Apr 17 00:19:08 I guess because there is nothing there Apr 17 00:19:33 yeah, open the port with timeout=0 Apr 17 00:19:40 to avoid that Apr 17 00:22:24 case sensitive on the letters in a byte Apr 17 00:22:25 ? Apr 17 00:23:02 for a \x escape you mean? no Apr 17 00:25:02 the letter part so 0xA1 vs 0xa1 Apr 17 00:25:10 ? Apr 17 00:25:15 what are you doing exactly? Apr 17 00:25:26 ser.write(b'\xA3') Apr 17 00:25:35 vs ser.write(b'\xa3') Apr 17 00:25:39 those are the same thing right Apr 17 00:25:45 yes Apr 17 00:26:00 once written to the serial port Apr 17 00:26:03 it should go right Apr 17 00:26:10 if you type b'\xA3' into python it'll actually echo it back as b'\xa3' Apr 17 00:26:11 I do not have to hit send i assume Apr 17 00:26:24 pretty sure it'll write immediately yes Apr 17 00:27:23 so I guess it is bad if all I get back is what I wrote in the first plate Apr 17 00:27:25 place * Apr 17 00:27:28 and nothing more Apr 17 00:27:30 hmmm Apr 17 00:28:00 yep that sounds like something is very borked, since it makes no sense to get what you wrote echoed back Apr 17 00:28:04 if it could not write I would get and error I would think Apr 17 00:28:16 definte "could not write" Apr 17 00:28:18 *define Apr 17 00:28:27 I can imagine almost no circumstance under which you'd get an error Apr 17 00:28:39 on attempting to write a serial port Apr 17 00:28:46 hmmm Apr 17 00:29:00 I need to get a sign of life other than the light being on the board to confirm it is working Apr 17 00:29:01 if something is misconfigured (e.g. wrong baudrate) you'll just get garbage or nothing, but not an error Apr 17 00:29:09 there's nothing based on what it could detect that something is wrong Apr 17 00:29:20 especially not for transmit Apr 17 00:29:51 I mean regardless of whether it's working, why are you getting back the data you wrote? Apr 17 00:29:59 i dunno Apr 17 00:30:02 that itself makes no sense in the absence of a loopback connection Apr 17 00:30:44 with it unplugged I get something different back Apr 17 00:30:49 0x00 Apr 17 00:31:00 so that is a start Apr 17 00:31:03 that makes even less sense Apr 17 00:31:05 no it's not Apr 17 00:31:13 lol Apr 17 00:31:25 so I just pulled the pins out of 11 and 13 for UART4 Apr 17 00:31:37 and wrote to the 0xA3 Apr 17 00:31:46 got back 0x00 when I read Apr 17 00:31:54 are you sure that 0x00 wasn't still buffered? Apr 17 00:32:07 do ser.read(256) or something Apr 17 00:32:32 timeout=0 will ensure that it'll just return immediately with whatever's in the input buffer (up to 256 bytes) Apr 17 00:32:43 (opening with timeout=0 I mean) Apr 17 00:33:03 so before I did the 256 bytes I read 3 more bytes getting back 0x00 Apr 17 00:33:05 each time Apr 17 00:33:13 the 256 byte read has b'' Apr 17 00:33:21 this is nothing plugged in Apr 17 00:33:28 ??? can you just share a transcript of what you were doing? Apr 17 00:33:57 https://pastebin.com/0Sgy0JEH Apr 17 00:34:00 b'' is the only thing you should ever be getting from a not-connected serial port Apr 17 00:34:24 ser.read() is equivalent to ser.read(1), so you've probably just been reading old buffered data Apr 17 00:35:23 ok so I will do ser.read(256) to get a lot Apr 17 00:36:33 let me reset the baud settings with the config tool and try again Apr 17 00:36:39 also, you opened it twice but never closed the first instance.... *maybe* that first serial port instance got garbage-collected since you overwrote the variable that contained it, but that would have been after you opened the second instance so who knows what happened Apr 17 00:37:08 is there a port reset Apr 17 00:37:13 command? Apr 17 00:37:17 you need to specify the baudrate when creating a serial port instance Apr 17 00:37:22 pyserial will reconfigure the port Apr 17 00:37:26 ok Apr 17 00:38:25 and use timeout=0 instead of timeout=1 to avoid reads hanging for a second Apr 17 00:47:58 so i am going to reset the port to 9600 baud rate Apr 17 00:48:07 so I am just going to close what I have open now Apr 17 00:48:32 juse close and reopen python, that'll definitely get rid of anything Apr 17 00:50:44 ok I am back where I was Apr 17 00:50:53 getting my thing parroted back Apr 17 00:51:04 dumb dumb question coming up Apr 17 00:51:31 the TX from my controller should be plugged into the Rx of my BBB Apr 17 00:52:08 via a level shifter yes Apr 17 00:52:25 yup Apr 17 00:52:47 and I have a level shifter with low side on the BBB and the controller sees the 5V side Apr 17 00:53:27 what level shifter are you using? Apr 17 00:53:31 also I have the 5V and 3V powering the controller and providing the reference signals to the level shifter Apr 17 00:54:41 FTCBlock 10Pcs 3.3V-5V 4 Channels Logic Level Converter Bi-Directional Shifter Module for Arduino CYT1076 Apr 17 01:01:46 ew, bidirectional level-shifters are kinda meh, even though they get the job done Apr 17 01:02:08 kinda sucks though that I don't see any specs for this thing, no mention of the partcode of the level shifter they're using either Apr 17 01:03:21 still it should work okay Apr 17 01:03:54 (bidirectional level shifters mainly become a problem for higher speeds or if you need to drive significant loads) Apr 17 01:31:24 ok I will keep that in mind going forward. Apr 17 01:32:00 do you think the way in how I power the references with everything coming from the BBB works Apr 17 01:32:05 so same GND Apr 17 01:32:19 5V going to the high side and 3V going to the low Apr 17 01:33:56 for the 5V you should use the one provided by the motor controller Apr 17 01:35:59 ok Apr 17 01:36:03 bigger problem Apr 17 01:36:12 ? Apr 17 01:36:12 my BBB spontaneously discconected Apr 17 01:36:15 and wont power on Apr 17 01:36:20 i took the cape off Apr 17 01:36:35 and have the 5V plugged in but nothing if I pushe the power button Apr 17 01:36:51 i will get power LED flash than nothing Apr 17 01:37:03 well that ain't good Apr 17 01:37:33 crap Apr 17 01:37:51 any quick way pf testing for a fried board Apr 17 01:38:20 if I had to hypothesize based on the very limited info available to me, I'd guess you somehow exposed a beaglebone I/O to 5V Apr 17 01:38:36 brief power led flash pretty much tells you all you need to know Apr 17 01:39:06 damn Apr 17 01:39:26 it means the pmic detected a short-circuit while trying to power up the beaglebone. if there's no external connections that could explain such a short-circuit, it's typically due to an internal short inside the SoC caused by a fried I/O cell Apr 17 01:39:39 took out the whole board Apr 17 01:39:40 dang Apr 17 01:40:24 jumper must of got loose i really do not have anything secure Apr 17 01:40:30 yeah unfortunately that seems to be a typical failure mode when a processor I/O is sufficiently abused Apr 17 01:41:01 ok i will drop some more dough and get a new Apr 17 01:44:59 70 dollar lesson right there Apr 17 01:46:51 SoCs like the am335x unfortunately don't have the sort of robust I/O that microcontrollers often have... I think it's just a side-effect of producing chips on 45nm process or smaller. the tiny tiny transistors can be destroyed by as little as 2V (they had to do some magic to get 3.3V I/O in the first place) Apr 17 01:47:18 the 3.3V supplies of the am335x are actually called "VDDHV" ... they're High Voltage supplies :P Apr 17 01:47:44 well I will be more careful next time Apr 17 01:47:45 so if 5V accidently comes along, it's *poof* Apr 17 01:47:56 was getting to careless Apr 17 01:48:06 it happens. we've fried quite a few beaglebones at work Apr 17 01:48:14 so I actually did have 5V coming from the controller Apr 17 01:48:21 but I power the controller from the BBB Apr 17 01:48:27 on the motor side Apr 17 01:48:38 the controller's power input requires 6V or more though I think? Apr 17 01:48:53 with load I do not have the motors attached Apr 17 01:49:06 since I just wanted to confirm I could get and set Apr 17 01:49:20 it's not just about load: it has an on-board 5V regulator Apr 17 01:49:29 and you can't create a regulated 5V supply from a 5V supply Apr 17 01:50:11 hmm, which one do you have? 12v12 or 21v3 ? Apr 17 01:50:21 12v12 Apr 17 01:51:20 ok yeah it specs 6-16V for VIN Apr 17 01:52:15 do you think since I was only providing 5V it could not provide enough power to properly send the signal back Apr 17 01:52:35 dunno, I doubt it Apr 17 01:52:59 but hard to say, it may be destabilized its 5V logic supply which could in principle cause erratic behaviour Apr 17 01:53:07 *it could have Apr 17 01:53:22 https://pastebin.com/kCrtXLmS Apr 17 01:53:31 here is what happened moments before the murder Apr 17 01:53:50 its weird I set the baud rate to 9600 on the config tool and in pyserial Apr 17 01:53:53 so it cannot be that Apr 17 01:54:03 but I only occasionally get 0x00 back Apr 17 01:54:13 besides my most recent command Apr 17 01:54:40 I feel like something weird must have been going on electrically, why else would your bbb have gotten fried Apr 17 01:55:11 me user error Apr 17 01:55:12 lol Apr 17 01:55:37 anyway, I can't tell from this what might have been going on, I have no idea Apr 17 01:55:52 yeah i may look for a new controller Apr 17 01:56:07 if the LCD was not eating so many pins I would look for a cape Apr 17 01:56:13 I saw they have some load capes Apr 17 01:56:33 where is set_ when you need him Apr 17 01:56:34 lol Apr 17 01:57:58 Heh? Apr 17 01:58:21 You need problems? I got problems. Apr 17 01:58:23 Ha. Apr 17 01:58:26 you drive motors with capes Apr 17 01:58:29 Yep! Apr 17 01:58:43 do you have one that does not need a lot of pins Apr 17 01:58:52 and all b/c of @zmatt and some book maker Prabakar. Apr 17 01:58:53 Yes. Apr 17 01:58:54 i want to use a motor cape and lcd cape Apr 17 01:58:58 Ut oh. Apr 17 01:59:04 The GHI MotorCape? Apr 17 01:59:39 And what LCD Cape? Apr 17 02:00:04 I know that the GHI MotorCape, if this is the one you are using, has specific pins dedicated to its workings. Apr 17 02:00:20 i dont have a cape for he motors Apr 17 02:00:23 So, GPIO and PWM make the Cape work. Apr 17 02:00:32 Oh. Apr 17 02:00:35 Okay. Apr 17 02:00:35 i am just tired of putzing with this jrk motorcontrollers Apr 17 02:00:43 Oh! Apr 17 02:01:03 Yea. I had some Pololu drivers for motors once. Apr 17 02:01:07 Blah! Apr 17 02:01:52 no good? Apr 17 02:01:58 Let me show you the GHI MotorCape pinout. Apr 17 02:02:03 Well, it was not that. Apr 17 02:02:11 They were okay. I still have them. Apr 17 02:02:32 The drivers just needed to have tons of graphical display troubleshooting. Apr 17 02:02:40 why switch then Apr 17 02:03:09 I try all sorts of motor drivers in the "rare" case I may use them at its peril. Apr 17 02:03:10 Ha. Apr 17 02:03:47 MattB0ne: Do you want me to set up a LCD and MotorCape? Apr 17 02:04:03 ideally Apr 17 02:04:05 I have a LCD on hand that is 3.3v logic and I can probably figure something out. Apr 17 02:04:21 well I bough that newhaven display Apr 17 02:04:23 which I like Apr 17 02:04:52 https://www.newhavendisplay.com/nhd70ctpcapev-p-9536.html Apr 17 02:05:58 Yep. I remember now. Apr 17 02:06:09 You wanted to use it w/ you BBG? Apr 17 02:06:30 yeah so that did not work because the BBG does not have a 5V power Apr 17 02:06:36 MattB0ne: Right! Apr 17 02:06:39 and cannot drive the board and screen Apr 17 02:06:42 shelled out for a BBB Apr 17 02:06:44 Did you ever get the BBB? Apr 17 02:06:46 I just fried it Apr 17 02:06:46 Okay. Apr 17 02:06:49 Nice. Apr 17 02:06:51 messing with this jrk motor Apr 17 02:06:51 Ut oh. Apr 17 02:06:54 Oh. Apr 17 02:06:57 jrk? Apr 17 02:06:57 so just bough another BBB Apr 17 02:07:02 Ha. Okay. Apr 17 02:07:10 what is jrk? Apr 17 02:07:12 I want to drop kick this jrk controller to the trask Apr 17 02:07:15 the pokulo Apr 17 02:07:21 Oh. Apr 17 02:07:23 Okay. Apr 17 02:07:26 just the brand of this thing Apr 17 02:07:37 Pokulo jrk? Apr 17 02:07:38 Pololu Apr 17 02:07:40 Oh. Apr 17 02:08:02 jrk 12v12 Apr 17 02:08:22 Okay. Let me look it up before you buy the MotorCape from GHI but... Apr 17 02:08:47 yeah if you dont mind. Apr 17 02:08:58 i am gonna blow off some steam with some ice cream Apr 17 02:09:09 afk for a bit Apr 17 02:09:14 Although, the GHI MotorCape is expensive for L298s, it works, the Cape is nicely packaged. Apr 17 02:09:41 There is room for other peripherals and tons of motors (4). You can double stack 'em from what I hear. Apr 17 02:09:49 Okay. afk. See you in a bbbit. Apr 17 02:12:37 See... Apr 17 02:13:12 Same thing w/ this Pololu jrk 12 v 12, it needs "calibration" w/ a Windows software program. Apr 17 02:16:20 And yes, I found the user guide. Their user guides are always long and drawn out. Nice for people willing to read and not so nice for me starting today to help you on this venture. Apr 17 02:16:32 WHy? B/c I know nothing about this particular driver so far. Apr 17 02:18:47 So, I guess you would like to use UART communication over from your BBB or other family board to the Motor Driver (Pololu jrk). Apr 17 02:19:09 W/ this in mind, @zmatt taught me a trick a while back w/ heavy duty motor drivers and UART. Apr 17 02:19:20 It is bidirectional but it does not have to be that way. Apr 17 02:19:33 Uni instead of bi might work for you. Do you need feedback? Apr 17 02:21:35 There is a regulated 5v output. I am guessing this can power the board, i.e. BBB. Apr 17 02:23:13 MattB0ne: When you get back, let me know how your connection was established, e.g. what connection was made to ruin the BBB. This way, we can rule out that method of connection. Apr 17 02:30:31 So, from what I gather, the jrk must be configured w/ Win and then can be used w/ Linux. Initial configs. must be done w/ a Win derivitive. Apr 17 02:35:01 For instance, if you want feedback, look at this guide on their site: https://www.pololu.com/docs/0J38/5. Just remember to use Win for their config, GUI utility. Apr 17 02:37:06 https://www.pololu.com/docs/0J38/4.i.1 <<< .c file for Unix like systems! Apr 17 02:39:03 set_: the 5V output of the jrk is 50 mA, it can't power the bbb Apr 17 02:39:13 I saw that. Yikes. Apr 17 02:39:18 At 12v! Apr 17 02:39:54 So, is this what happened? Apr 17 02:40:16 yeah true, so it can presumably provide a bit more if powered at 6V. but anyway, I see no reason why you'd use the 5V output of the jrk to power the bbb Apr 17 02:40:27 ? Apr 17 02:41:12 Can you power more than one pin of the BBB power pins w/ the 12v 50 mA dual-pin to create a "mixture" of input of current to more pins? Apr 17 02:41:40 that sentence makes so little sense I feel like I just lost a few IQ points as a result of reading it Apr 17 02:42:10 Fine. Apr 17 02:42:38 anyway, the hardware setup he described didn't sound like it had any obvious problems Apr 17 02:42:48 I just thought since the mA is so high for one pin, we can use more than one pin for the 5v. Apr 17 02:43:04 B/c the headers can handle more than 50mA at one time. Apr 17 02:43:33 Just a thought. Apr 17 02:43:40 I don't understand what you're going on about. the jrk and the bbb are independently powered afaik Apr 17 02:43:46 Oh. Apr 17 02:43:47 Okay. Apr 17 02:43:49 GOt it. Apr 17 02:43:50 with a level shifter between them Apr 17 02:44:04 (for the serial communication) Apr 17 02:44:08 Aw. See, I have no clue as it how things got connected. Apr 17 02:44:17 anyway, afk again Apr 17 02:44:20 Yea! Apr 17 02:47:02 Jello ! Apr 17 02:48:20 So, are you all using analog and digital to use the motor? Apr 17 02:48:29 From the jrk? Apr 17 02:48:41 KenUnix Lives! Apr 17 02:49:54 I have been very busy last few days. Check out https://groups.google.com/forum/#!category-topic/beagleboard/announcement/newbies/beaglebone-black/software/debian/uf4m2S2vqa8 --and-- https://github.com/kenmartin-unix/Bwbasic-3.2a-for-BeagleBone Apr 17 02:50:55 Nice...I will look soon. **** ENDING LOGGING AT Fri Apr 17 02:59:57 2020