**** BEGIN LOGGING AT Thu Jul 12 03:00:01 2018 Jul 12 14:33:53 I want to get some info on the bbx15 but I wanted to see what was in the archives first. Can some one point me to an archive search or download. Thank you! **** BEGIN LOGGING AT Thu Jul 12 15:33:41 2018 Jul 12 17:36:41 When I connect ADT7516 sensor with the BBG, I get am335x as the sensor under /sys/bus/iio/devices/. How can I have my sensor connected? Jul 12 17:39:32 it needs to be declared in Device Tree, or in case of i2c devices can be declared at runtime by writing the appropriate info into some sysfs attribute (I'd need to quickly dig to find that one) Jul 12 17:42:12 both methods are sorta documented as method 1b and method 4 in https://www.kernel.org/doc/Documentation/i2c/instantiating-devices Jul 12 17:42:46 @zmatt so you are saying that it needs to declared in the /arch/arm/boot/dts/am335x-bonegreen.dts correct? Jul 12 17:44:02 declaring it in the device tree, either by customizing the main dts or by using an overlay, is the most general way of informing the kernel about the existence of devices, and can handle the greatest variety of devices Jul 12 17:44:45 it also supports for example declaring the interrupt line from the ADT7516 Jul 12 17:46:55 ok. So I've tried the 4th method from this, but when I do i2cdetect -y -r 2, I get the output as 0x51 which is not the I2C address of the ADT7516. And when I check into the /sys/bus/iio/devices, it shows me am335x as the sensor and not the adt7516. Is it due to some connection problem? Jul 12 17:48:54 the am335x adc is always present in /sys/bus/iio/devices obviously, and your device is not going to show up in /sys/bus/iio/devices until it's been added correctly Jul 12 17:49:13 are you sure 0x51 is not your device? I'd expected i2c bus 2 to be empty otherwise Jul 12 17:49:21 *expect Jul 12 17:50:13 hmm, it really doesn't seem to be its address Jul 12 17:50:50 do you have external pull-ups on the two i2c lines? Jul 12 17:50:59 Yes I am sure that 0x51 is not my device. Ok suppose that it is the device then it should be shown up under /sys/bus/iio/devices right? But there I only see device0 which is am335x Jul 12 17:51:13 no it won't show up there automatically Jul 12 17:51:43 you need to add it explicitly using the correct driver name Jul 12 17:52:07 i2c is not a bus that supports automatic discovery Jul 12 17:52:27 i2cdetect can sometimes detect the *presence* of devices (although it is unreliable and can mess up devices), but it cannot identify them Jul 12 17:53:37 But when I connected digital light sensor (TSL2561), I had to do nothing as it showed the correct address and I was able to get it as device1 Jul 12 17:54:07 how did you add it? Jul 12 17:54:41 or maybe better question, what did you write to /sys/bus/i2c/devices/i2c-2/new_device to attempt to add the ADT7516 ? Jul 12 17:55:15 cd /sys/bus/i2c/devices/i2c-2 echo tsl2561 0x29 >new_device watch -n0 cat 2-0029/iio\:device1/in_illuminance0_input Jul 12 17:56:02 Just the above lines helped me to take the readings Jul 12 17:56:36 But there I was getting the correct address as 0x29 Jul 12 17:56:40 I'm in the exact same spot here with a ina219 DC current sensor Jul 12 17:57:09 something like that *should* work for the adt7516. did you see an error in the kernel log? Jul 12 17:57:29 i2cdetect can see it, I can set it up and use it with i2cget/i2cset but I can't have it to load its dedicated kernel module Jul 12 17:58:09 @zmatt nope, have not checked the kernel log Jul 12 17:58:36 MichaelLong: same question, after attempting to add it via the 'new_device' sysfs attribute of the i2c bus, do you see any error in the kernel log? Jul 12 17:58:39 dmesg | tail Jul 12 17:58:55 But how will it work as at the first place I'm not getting the correct I2C address Jul 12 17:59:17 I see one difference which I would like to share here Jul 12 17:59:18 no errors, it just mentioned an action reading adding a device but nothing new in hwmon Jul 12 18:00:01 shreeya: it's possible i2cdetect is simply unable to detect the device, although that doesn't explain the spurious detection of 0x51. does that detection disappear when your sensor is not connected? Jul 12 18:00:02 Digital light sensor had .compatible line in it's code but I don't see that in ADT7516 Jul 12 18:00:32 new_device uses the struct i2c_device_id list in the driver code Jul 12 18:00:49 the adt7316-i2c driver includes "adt7516" in that list Jul 12 18:01:11 :zmatt exactly, that device disappers when I don't connect it with the BB Jul 12 18:01:55 that's really wonky, since it simply doesn't agree with the datasheet Jul 12 18:02:29 Hmm yes and hence I'm here Jul 12 18:02:33 MichaelLong: does your device show up in /sys/bus/i2c/devices ? Jul 12 18:02:42 no Jul 12 18:06:21 MichaelLong: what exactly appeared in kernel log? Jul 12 18:06:46 and what exactly did you write to new_device ? Jul 12 18:07:42 sorry can't tell the exact phrase right now, I don't have the BBB at hand but it was something about the action of adding a new device but definately no error Jul 12 18:08:09 I've never had any problems getting an i2c device recognized, but I've never used new_device myself, only DT declaration Jul 12 18:08:17 echo ina2xx 0x40 > /sys/bus/i2c/i2c-2/new_device Jul 12 18:08:24 that's definitely wrong Jul 12 18:08:27 it should be ina219 Jul 12 18:08:39 no its not Jul 12 18:09:02 ina2xx is the module for several similar ICs Jul 12 18:09:15 yes, but that driver needs to know which part you're using Jul 12 18:09:50 https://github.com/beagleboard/linux/blob/4.14/drivers/iio/adc/ina2xx-adc.c#L917-L925 Jul 12 18:10:11 that's the list of ids recognized by the driver Jul 12 18:10:30 (the corresponding list of "compatible" strings for DT-declaration is below it) Jul 12 18:11:27 I'm seeing the same here https://github.com/torvalds/linux/blob/master/drivers/hwmon/ina2xx.c (to be honest I don't now what the iio adc stuff is about) Jul 12 18:13:16 oh interesting, two drivers for the same device Jul 12 18:13:20 that's... fun Jul 12 18:13:25 yes I'm confused Jul 12 18:14:17 are both are enabled in the kernel config? grep -i ina2xx /boot/config-$(uname -r) Jul 12 18:14:18 ok I'll try that out Jul 12 18:15:06 I'm using the stock ubuntu 16.04 bbb kernel but I checked everthing is there Jul 12 18:15:28 if only one is enabled, then that's the one you'll get. if both are compiled as module, you may need to explicitly load one of the two modules to ensure that one is used Jul 12 18:15:34 ... ubuntu? .... okay Jul 12 18:16:00 ok thanks I'll definately try that out as soon as possible. Jul 12 18:16:43 zmatt: I don't see any error when I do dmesg | tail Jul 12 18:16:48 I had the impression that the ina2xx module tries to figure it out by itself (e.g. reading a i2c reg) Jul 12 18:17:03 Any other solution to have this working? Jul 12 18:18:06 but the ina2xx_probe() is checking dev.of_node somehow Jul 12 18:19:09 I haven't looked at the driver code in any detail, but if it *requires* the presence of of_node then using a DT declaration is the only way, new_device won't work in that case Jul 12 18:19:30 usually it's optional though Jul 12 18:19:35 hmm Jul 12 18:19:47 first just try with ina219 instead of ina2xx Jul 12 18:20:08 I thought I could get around dt declaration with the universal-cape stuff Jul 12 18:20:44 cape-universal helps avoid DT declarations for the am335x pins and peripherals (usually, in basic cases at least) Jul 12 18:21:05 it doesn't (and can't) do anything for devices on external buses such as spi or i2c Jul 12 18:21:39 if you want to use kernel drivers for them anyway Jul 12 18:22:49 but why is a DT helping in any way? in the end there is only the bus (like i2c or SPI) and a additional information (whats behind the bus) it feels not necessary. i2c and SPI pin-setup works very nicely with the universal-cape-approach, I would never got the my current pin config with the old way Jul 12 18:23:39 no, when you want to use a kernel driver for a specific device behind that bus, additional information is very much necessary Jul 12 18:24:00 yes but like an module option Jul 12 18:24:15 or a concrete module-name e.g. Jul 12 18:24:24 with i2c the *bare minimum* would be which kind of device (to match to the driver) and the bus address, which is exactly what you're writing to new_device Jul 12 18:24:47 anyway I'll try that Jul 12 18:25:04 but cape-universal can't know these things nor declare them for all devices just in case. that's what I meant with cape-universal doesn't and can't help with that Jul 12 18:25:57 if the driver needs additional information, e.g. the shunt resistor value for your current sensor, then you're really back to DT declarations Jul 12 18:26:30 anyway, if you do end up having to use DT, do check out https://github.com/mvduin/overlay-utils which aims to make them considerably simpler Jul 12 18:26:37 yes that's what I mean, the universal-cape is only dealing with the bus (like in a PC PCI-bus) and the device of that bus is done by using a specific module (or aditional module option/detection) like a radeon-module Jul 12 18:27:42 of course, from a kernel developer perspective, declaring devices at runtime from userspace is considered an ugly hack and a last resort workaround when normal mechanisms (like DT) have failed you Jul 12 18:28:22 in gerneral I'm quite happy with my current setup considering I'm already using lots of different functionality thats already working (lots of GPIOs, 1xPWM, 3xUART, 1xCAN, 1xSPI, 1xI2C, 3xAIN) Jul 12 18:30:17 I personally do prefer doing gpio declarations in DT since it sets the defaults during early boot, and assigns names to individual gpios to avoid hardcoding gpio numbers in software (hence allow the same software to work across different board variants, where the same gpio may be moved around) Jul 12 18:31:12 it also provides some extra protection of the hardware by preventing userspace from being able to accidently configure input-pins as output Jul 12 18:31:14 zmatt, yes but it is never early enough anyway Jul 12 18:31:34 true I guess Jul 12 18:33:57 we've always having the digital outs isolated until pins are configurable to avoid surprises (in my first project one DIO I used was high when started and it switched on a fan in a housing which we sold as security measure :) Jul 12 18:34:27 external pull-ups/downs usually suffice Jul 12 18:35:04 since the internal ones are pretty weak (100KΩ ±50%) Jul 13 00:14:36 How can I enable the wireless on my BBBW? Jul 13 00:14:50 connmanctl! Jul 13 00:15:16 then type the cmd: services Jul 13 00:15:39 then copy your router address: wifi_xx.xxx.xxx Jul 13 00:15:50 type agent on. Jul 13 00:16:18 then type the cmd: connect Jul 13 00:16:29 add your copied wifi.xx.xxx.xxx. Jul 13 00:16:41 so, connect wifi_xx.xxx.xxx. Jul 13 00:16:50 Enter your passphrase and BLAM! Jul 13 00:17:39 set_connmanctl doesnt' work. Jul 13 00:17:56 hmmm. Jul 13 00:18:03 set_services does not work either Jul 13 00:18:16 In your terminal, type connmanctl. Jul 13 00:19:25 So, connect to your BBBW via PuTTY on Win or via the terminal on a Linux Distro. Jul 13 00:19:27 It says Error getting VPN connections: The name net.connman.vpn was not provided by any connmanctl connm Jul 13 00:19:36 Heh? Jul 13 00:19:38 Hmm. Jul 13 00:19:45 Hold please. Jul 13 00:19:49 Oh? Jul 13 00:20:00 How are you connected? USB or 5v? Jul 13 00:20:08 usb Jul 13 00:20:35 Okay. That is a start. Does your USB have the lightining bolt next to it? Jul 13 00:21:04 On your desktop or on your laptop? Jul 13 00:21:20 Not all USB connections are equal. Jul 13 00:21:23 yes Jul 13 00:21:30 Alright! Jul 13 00:21:45 Let me look up your net.connman.vpn connection error. Jul 13 00:21:46 brb Jul 13 00:22:35 actually it was plugged into the usb port without the lightning bolt. Jul 13 00:22:45 Oh. Jul 13 00:22:50 which should it be plugged into? Jul 13 00:22:54 I have done that and received errors. Jul 13 00:23:05 The Bolt adds functionality. Jul 13 00:23:13 Power! Jul 13 00:23:32 Hey, are you on your own computer? Jul 13 00:23:43 yes Jul 13 00:23:45 Or...in an office or school? Jul 13 00:23:46 Okay. Jul 13 00:24:02 Plug that sucker into the lightining bolt USB, please. Jul 13 00:24:15 will do Jul 13 00:24:18 Okay. Jul 13 00:24:39 First power down w/ poweroff or shutdown -h now. Jul 13 00:25:01 Or however you power down. Jul 13 00:26:44 it is now in the usb port with the bolt and powered up. Jul 13 00:27:00 Okay. That was fast. Jul 13 00:27:03 Did you just get it? Jul 13 00:27:22 yes Jul 13 00:27:29 Aw. What image do you have right now? Jul 13 00:27:56 uname -r or uname -a? Jul 13 00:28:36 debian 9.4 Jul 13 00:28:46 Okay! Jul 13 00:28:53 Sorry for my overreactions. Jul 13 00:29:05 Now, does connmanctl work? Jul 13 00:29:11 no Jul 13 00:29:18 Serious? Jul 13 00:29:21 Dang. Jul 13 00:29:24 Okay. Jul 13 00:29:51 So, someone w/ more knowlege might need to help you but I can and will research this idea. Jul 13 00:29:58 I know right? Jul 13 00:30:02 Please hold. Jul 13 00:30:30 Are you familiar w/ Linux? Jul 13 00:30:38 no Jul 13 00:30:46 Oh. What OS do you have on your desktop? Jul 13 00:30:56 Windows Jul 13 00:31:05 Okay. Are you using PuTTY for connections? Jul 13 00:31:14 yes Jul 13 00:31:16 Win xxx? Jul 13 00:31:21 10 Jul 13 00:31:24 Okay. Jul 13 00:31:32 Hmm. Jul 13 00:31:51 Hey! Jul 13 00:31:54 Did you sign in yet/ Jul 13 00:31:55 ? Jul 13 00:32:10 yes Jul 13 00:32:26 Why are you using a VPN? Jul 13 00:32:51 I didn't know I was Jul 13 00:32:54 Oh. Jul 13 00:32:57 Okay. Please hold. Jul 13 00:33:08 I am going to look up those errors you posted earlier. Jul 13 00:33:40 ok Jul 13 00:34:11 Thank you and sorry in advance. My knowledge is not all there or even there at times. Jul 13 00:35:08 https://www.ev3dev.org/docs/tutorials/setting-up-wifi-using-the-command-line/ is what I am reading right now. Jul 13 00:35:15 I will brb. Jul 13 00:36:57 Try to install a new image via bbb.io/latest-images Jul 13 00:37:10 This is mine: Linux beaglebone 4.14.49-ti-r54 #1 SMP PREEMPT Fri Jun 15 22:14:13 UTC 2018 armv7l GNU/Linux. Jul 13 00:37:43 Or... Jul 13 00:39:10 Nope. If you type connmanctl, the left hand side shows connmanctl and if this is true, type enable wifi and then scan wifi. Jul 13 00:39:12 Hmm. Jul 13 00:40:20 Hmm. I give up. There is unlimited info. on this subject but I would rather go w/ what works. Try: https://beagleboard.org/latest-images. Jul 13 00:41:34 Since you have the BBBW, you can get the LXQT or IoT image for your board. Jul 13 00:41:37 ok. 9.4 is the latest image Jul 13 00:42:08 Did it come w/ the board or did you put the image on your board? Jul 13 00:42:50 I put the image on the board Jul 13 00:43:13 Oh. Jul 13 00:43:15 Okay! Jul 13 00:43:24 Where did you find that image? Jul 13 00:43:36 https://beagleboard.org/latest-images Jul 13 00:43:55 Oh. Let me go and look up things again. Do you have time? Jul 13 00:44:13 It may take forever and a day. There is unlimited info. online. You know. Jul 13 00:44:19 yes Jul 13 00:44:25 Okay. Please hold. Jul 13 00:45:13 Ken_: if you type "ip link", does it include a wlan0 interface in the list? Jul 13 00:46:10 Ken_: listen to this fellow over me. Jul 13 00:47:01 well I have zero experience with connman, but I do want to quickly check whether or not his BBBW is afflicted by the misprogrammed eeprom issue Jul 13 00:47:06 ip link does not include wlan0 Jul 13 00:47:18 it includes eth0 instead? Jul 13 00:47:37 Oh. Jul 13 00:47:44 yes Jul 13 00:47:46 yep, factory-misprogrammed eeprom Jul 13 00:48:43 is it fixable on my end? Jul 13 00:48:59 although technically this is a manufacturing defect (hence an RMA is reasonable), it is not too hard to fix yourself if you want. it does require a bit of care since you don't want to mess up the eeprom even further Jul 13 00:49:19 also, you'll need a wire to lift the write-protection on the eeprom Jul 13 00:50:44 So far it doesn't sound too difficult Jul 13 00:52:02 https://liktaanjeneus.nl/bbbw-tp1.jpg circled in red is TP1, which needs to be connected to ground. there are many grounding points, but two are highlighted in green Jul 13 00:53:40 first let's inspect the current board identification with: head -c 16 /sys/bus/nvmem/devices/0-00500/nvmem | hexdump -C Jul 13 00:54:12 the first 12 bytes will be correct, otherwise your board wouldn't boot, but the last four will be wrong in your case Jul 13 00:54:37 this is what it's supposed to look like on a black-wireless: Jul 13 00:54:57 aa 55 33 ee 41 33 33 35 42 4e 4c 54 42 57 41 35 |.U3.A335BNLTBWA5| Jul 13 00:57:15 if you're ready to perform the modification, elevate yourself to root using "sudo -i", connect TP1 to ground, and execute: Jul 13 00:57:23 echo -ne '\xaa\x55\x33\xeeA335BNLTBWA5' >/sys/bus/nvmem/devices/0-00500/nvmem Jul 13 00:57:30 Please hold I unplugged the board to get the wire. Jul 13 00:57:38 ok Jul 13 00:58:04 after the write, double-check the contents of the eeprom using the same command as earlier Jul 13 00:58:16 as long as you don't reboot, you can still fix mistakes Jul 13 01:05:36 I see aa 55 33 ee 41 33 33 35 42 4e 4c 54 00 00 00 00 |.U3A335BNLT....| 00000010 Jul 13 01:07:19 i.e. board variant was never programmed Jul 13 01:08:53 TP is connected to the ground Jul 13 01:08:54 I don't really understand how that would happen, but it's a known problem Jul 13 01:09:17 do I type in echo -ne the hit enter? Jul 13 01:09:47 the whole line as-is. echo -ne '\xaa\x55\x33\xeeA335BNLTBWA5' >/sys/bus/nvmem/devices/0-00500/nvmem Jul 13 01:16:32 done. It now looks correct. Jul 13 01:17:04 after double- and triple-checking, reboot and you should now have a wlan0 interface instead of eth0 Jul 13 01:17:20 (remove the wire first) Jul 13 01:18:11 Does it matter how I reboot? Jul 13 01:18:17 no Jul 13 01:21:30 I see wlan0 Jul 13 01:21:40 hurray :) Jul 13 01:21:47 Doinks! Jul 13 01:22:01 That was some handy work. Jul 13 01:23:59 Now how can I get this thing on my network? Jul 13 01:24:11 https://dougreese.com/beaglebone-black-wireless-initial-setup-and-wifi-connect.html has a quick summary of the commands to connect to wifi Jul 13 01:25:06 except they're connecting to the BBBW via the serial console for odd reasons Jul 13 01:25:16 but you're already logged in, so no problem there Jul 13 01:26:46 ... Jul 13 01:26:49 connmanctl? Jul 13 01:27:02 zmatt: hey! Jul 13 01:27:29 Um, if I have two files that I am making a .service file for each, should they both run when I start my BBBW? Jul 13 01:27:46 ... Jul 13 01:27:49 I got the file to run now. Jul 13 01:28:38 How can I connect to my home wifi? Jul 13 01:29:14 Ken_: Can you use connmanctl now? Jul 13 01:29:20 Ken_: if you follow the steps on that page, after doing the "services" command you should see your wifi network listed Jul 13 01:30:33 zmatt: My .service files keep failing. Will you please look here: https://pastebin.com/Bkyy8N49? Jul 13 01:31:20 I still get the error but the other commands like enable wifi appear to work. Jul 13 01:31:36 then just ignore the error and continue Jul 13 01:31:49 (would be my guess) Jul 13 01:31:55 and here: I look up status in systemctl and the....Oh? Jul 13 01:32:02 Okay. Jul 13 01:32:06 I am going to try it. Jul 13 01:32:11 I was replying to Ken_ Jul 13 01:32:14 Oh. Jul 13 01:32:14 not to you set_ Jul 13 01:32:15 Dang! Jul 13 01:32:19 Okay. Jul 13 01:32:21 Sorry. Jul 13 01:32:31 .... again, why on earth are you putting a html file in a .service? Jul 13 01:32:35 you can't execute a html file Jul 13 01:32:39 Okay. Jul 13 01:32:45 I know what happened now. Jul 13 01:32:58 I was confused and she was old (scripts). Jul 13 01:33:13 please stop trying to put something into a service unless it's something you're able to run it as a command manually Jul 13 01:33:15 I am working out of a book. Jul 13 01:33:20 Okay. Jul 13 01:33:23 Gotcha! Jul 13 01:33:35 Now, I understand the idea. Jul 13 01:33:35 I see my network but when I try to use connect, it says it is an invalid argument. Jul 13 01:34:02 Ken_: be sure to connect to the long "wifi_yadayada_managed_psk" string that's shown after your wifi network's name Jul 13 01:34:46 don't ask me why connman thinks this is a sane user interface, I didn't do it ;) Jul 13 01:35:07 I likey! connmanctl! Jul 13 01:35:55 set_: also include WorkingDirectory and User directives in your service file Jul 13 01:36:08 Okay. Jul 13 01:36:41 (corresponding to the directory you're in when you manually perform the command, and the user you are when manually performing the command) Jul 13 01:37:26 it says my network is not registered Jul 13 01:37:52 https://pastebin.com/KfqyqnC4 is my .js file that I run w/ node. Jul 13 01:38:23 missing WorkingDirectory and User Jul 13 01:38:34 Now...So, under [Service], I put the WorkingDirectory and User or I make new headings? Jul 13 01:38:45 they're under [Service] yes Jul 13 01:38:51 Okay. Thank you sir. Jul 13 01:39:23 yes. I just turned the agent on and I think I am connected Jul 13 01:39:27 This has been racking my Brian. Okay. I am up, up, and away for testing. brb. Blah. Jul 13 01:40:31 also it's probably clearer if you write ExecStart=/usr/bin/node secondcontrol.js but the ExecStart you're using currently should work too provided the .js file is marked as executable and has a shebang line at the top Jul 13 01:40:54 Ken_: yay Jul 13 01:40:56 Okay. Jul 13 01:41:36 Is there any was to extend the range on the BBBW? Ideally I'd like it to have at least a 500ft range. Jul 13 01:41:36 (if you use ExecStart=/usr/bin/node secondcontrol.js then the js file does not need to be marked as executable nor does it need a shebang) Jul 13 01:41:56 Ken_: better antennae I guess? Jul 13 01:41:59 Now...that is cool. Jul 13 01:43:11 Ken_: the antennae on the BBBW are also kinda too close together, although putting them at an angle helps to compensate somewhat Jul 13 01:45:48 The damn things keep failing. There must be a trick or something not listed (somewhere over the rainbow). Jul 13 01:46:57 note: after changing the .service file, don't forget to do "sudo systemctl daemon-reload" before attempting to "sudo systemctl restart whatever.service" Jul 13 01:47:08 Right. Jul 13 01:47:34 But...it seems like every time I start the new service, the .service file warps my software into not working. Jul 13 01:47:39 Let me check the software again. Jul 13 01:47:42 It just worked. Jul 13 01:48:13 and it may be useful to keep a "journalctl -f" open in a separate window to monitor log messages Jul 13 01:48:22 okay. Jul 13 01:48:39 both from systemd (if your service fails to start) and from your service Jul 13 01:48:48 Oh...okay. Jul 13 01:48:59 (journalctl shows all log messages by default) Jul 13 01:51:07 One last question... How do I change the root password? Jul 13 01:51:22 ooh, ooh. I know. Jul 13 01:51:26 passwd. Jul 13 01:51:49 it's usually better to just log in as debian and just use sudo in the rare cases you need root privileges (user debian can do pretty much everything) Jul 13 01:52:02 but yeah if you really do want to configure a root password, sudo passwd Jul 13 01:53:10 note however that sshd in its default configuration won't let you log in as root via ssh using a password (only using public-key authentication) Jul 13 01:53:46 zmatt: journalctl says permission denied for my .service file. Jul 13 01:53:51 so you'd need to change /etc/ssh/sshd_config too Jul 13 01:53:54 set_: ? Jul 13 01:54:03 Weird heh/ Jul 13 01:54:03 set_: what's the exact error? Jul 13 01:54:10 Oh...please hold. Jul 13 01:54:34 Ken_: (or use public-key authentication of course, but then you also don't need to set a root password) Jul 13 01:54:44 secondcontrol.service: Failed at step EXEC spawning /home/debian/secondcontrol.js: Permission denied Jul 13 01:54:59 ... Jul 13 01:55:01 that means the file is not executable Jul 13 01:55:05 Oh. Jul 13 01:55:07 That is it? Jul 13 01:55:27 which also means you didn't test the command manually first Jul 13 01:56:01 03:33 < zmatt> please stop trying to put something into a service unless it's something you're able to run as a command manually Jul 13 01:56:55 Sir, I already ran the software manually. It works and then I started my .service file for it and bam. The file, the .js and .html files, no longer work. Jul 13 01:57:06 Odd days. Jul 13 01:58:02 well you probably did something in between, or ran it using "node secondcontrol.js" rather than "./secondcontrol.js" Jul 13 01:58:07 Do I need to reboot for the password to work? Will my BBBW reconnect to my network automatically after a roboot? Jul 13 01:58:31 as far as I know the configuration you did using connmanctl is persistent Jul 13 01:58:57 setting the root password takes immediate effect Jul 13 01:59:15 changing the sshd configuration requires restarting sshd (not necessarily the whole beaglebone) Jul 13 02:00:15 set_: but if you just use ExecStart=/usr/bin/node secondcontrol.js like I recommended then you don't need to make the js file executable Jul 13 02:00:26 The password did not work Jul 13 02:00:49 Ken_: ? Jul 13 02:00:51 Okay zmatt: I will try again. Jul 13 02:00:57 clarify "did not work" Jul 13 02:02:05 I cannot logon as the root user Jul 13 02:02:41 which steps did you perform, and how are you trying to log in? Jul 13 02:03:14 sudo su Jul 13 02:03:39 please never use "sudo su", that creates two nested sessions Jul 13 02:03:45 Oh. Jul 13 02:03:46 Okay. Jul 13 02:03:47 sudo su Jul 13 02:03:51 Hahahah. Jul 13 02:04:00 then sudo passwd root Jul 13 02:04:19 (use "sudo -s" or "sudo -i" depending on whether you want a clean environment or not) Jul 13 02:05:05 using sudo inside sudo su... that's three nested sessions (inside the original login session) ... nice Jul 13 02:05:56 "sudo -i" is equivalent to logging in as root Jul 13 02:06:17 also, maybe you didn't see me saying earlier: Jul 13 02:06:44 03:53 < zmatt> note however that sshd in its default configuration won't let you log in as root via ssh using a password (only using public-key authentication) Jul 13 02:08:23 Hey zmatt: When I start a service file, the service file in /lib/systemd/system is supposed to be highlighted, right? Jul 13 02:08:56 set_: your own service files should be in /etc/systemd/system/, not anywhere in /lib Jul 13 02:09:01 Oh. Jul 13 02:09:03 Crap! Jul 13 02:09:11 What the hell did i read? Jul 13 02:09:17 Some old stuff, I guess. Jul 13 02:09:18 /lib are system-provided service files Jul 13 02:09:22 Oh. Jul 13 02:09:24 /lib/systemd/system I mean Jul 13 02:09:31 zmatt: you are a miracle worker. Jul 13 02:09:40 etc! Not lib! Jul 13 02:09:51 also I don't know what you mean by "highlighted" Jul 13 02:09:56 I should have known. Jul 13 02:10:24 Oh. My colors are fascinating on my .service file section under /lib/systemd/system. Jul 13 02:10:26 That is all. Jul 13 02:11:06 How do I create a public-key authentication? Jul 13 02:11:28 set_: there are a fair number of symlinks there (which are colored), but other than that I have no idea what you might be referring to Jul 13 02:11:45 That is all. Jul 13 02:11:54 symlinks get highlighted. Now, I know. Jul 13 02:12:12 or colored/highlighted. Jul 13 02:12:18 I got it now. Jul 13 02:12:46 Ken_: what ssh client do you use? Jul 13 02:12:59 The .service files ended up in my etc dir by accident. Now, onto fixing the issue. Jul 13 02:14:05 I don't know? I'm using putty. Jul 13 02:14:19 then you do know: you're using putty Jul 13 02:14:47 though again I have to wonder, why not just use sudo for the rare occasion you need to be root? Jul 13 02:15:54 Power trip? Jul 13 02:17:09 Yes. The ultimate goal is to install the Labview RT engine on the BBBW. I was able to do this on an older BBB by changing the root password. The Labview installer needs to log onto the BBBW as the root user to do the install. Jul 13 02:17:25 o.O Jul 13 02:17:43 the installer itself logs in via ssh? Jul 13 02:18:09 oh wow Jul 13 02:18:46 I am assuming so. It requires the ip address, username (root), and password. Jul 13 02:19:34 well like I said earlier, you can change sshd's configuration to allow root login using password instead of public-key authentication. although some quick googling does seem to suggest that Labview RT also supports public-key authentication Jul 13 02:20:07 I think Jul 13 02:20:46 probably easier to just change sshd's config Jul 13 02:21:06 in /etc/ssh/sshd_config find this line: Jul 13 02:21:06 How can I change the config Jul 13 02:21:09 #PermitRootLogin prohibit-password Jul 13 02:21:11 and change it to Jul 13 02:21:13 This is making my Brian explode. Jul 13 02:21:15 PermitRootLogin yes Jul 13 02:21:56 use e.g. "sudo nano /etc/ssh/sshd_config" to edit the file Jul 13 02:22:08 ls Jul 13 02:22:11 oops. Jul 13 02:22:35 then restart sshd using "sudo systemctl restart ssh" Jul 13 02:25:08 Well...I got the .service file up and running but i have a bug now. Jul 13 02:26:03 brb Jul 13 02:29:01 There odd words on my PuTTY terminal that i cannot remove w/ Linux/Unix commands. Jul 13 02:29:08 yikes! Jul 13 02:29:24 try "screen false" or "vi +:q" Jul 13 02:31:17 also, be sure that putty actually tells the beaglebone it's "putty" and not "xterm". you can use "echo $TERM" to check, and if it's wrong then you'll need to dig into putty's settings Jul 13 02:32:01 oh actually, I'm not 100% sure whether the terminfo for putty is installed by default.... hm :-/ Jul 13 02:34:44 So. screen false should show some ideas on how to remove things that should not be there? Jul 13 02:34:45 ... Jul 13 02:34:56 no, it might get rid of them Jul 13 02:35:00 Oh! Jul 13 02:35:09 Cool. Let me try real quickly. Jul 13 02:35:32 Nope. I even tried to reboot. Jul 13 02:35:35 It was still there. Jul 13 02:35:38 depending a bit on what you mean or how it got there Jul 13 02:36:04 "not provided by any .service files" is what it says. Jul 13 02:36:25 I'm really confused now, what the heck do you mean? Jul 13 02:36:45 I type ls and that sentence appears. Jul 13 02:36:56 what on earth did you do Jul 13 02:36:57 w/ my files and directories. Jul 13 02:36:59 I do not know. Jul 13 02:37:06 I thought things were okay. Jul 13 02:37:16 Well...I did journalctl Jul 13 02:37:26 maybe you actually managed to create a file by that name somehow? Jul 13 02:37:37 Then, I copied a journalctl error message I found. Jul 13 02:37:39 Oh. Jul 13 02:37:53 There are spaces instead of _ or . between each word. Jul 13 02:38:01 a filename can contain spaces Jul 13 02:38:04 Oh? Jul 13 02:38:07 In linux? Jul 13 02:38:20 Wow Wow Wow. How can I get rid of it? Jul 13 02:38:22 a filename can contain any byte other than the nullbyte or / Jul 13 02:38:25 zmatt I've made the changes but I still cannot log on as the root user. Jul 13 02:38:42 Ken_: did you restart the ssh service? Jul 13 02:39:14 yes Jul 13 02:40:29 set_: you can escape the spaces using \, but it's easier to just rely on tab completion, i.e. type "rm not" without pressing enter, press tab to see if it completes it to a filename (with the spaces escaped), and if so press enter Jul 13 02:40:56 That is a cool trick. Jul 13 02:40:59 Thank you. Jul 13 02:41:14 I forgot. Jul 13 02:41:18 Ken_: it should work then. check the root password is set correctly by doing "su" as a normal user (which will ask for the root password) Jul 13 02:43:58 that works but when trying to log on using putty it doesn't Jul 13 02:44:24 then my guess would be you did something wrong in the sshd config Jul 13 02:44:31 somehow Jul 13 02:45:05 otherwise logging in as root should simply work Jul 13 02:45:40 what does the log show when you attempt to log in? (keep "journalctl -f" open in a separate window while attempting to log in as root) Jul 13 02:54:12 ... Jul 13 02:54:53 If I stop my server accidentally by exiting out of the webpage, is there a way to get back onto my .service file server from userspace? Jul 13 02:55:19 I have no idea what that even means Jul 13 02:55:24 Okay. Jul 13 02:55:52 I think that there is a cancelation of my server when I exit out of my webpage. Jul 13 02:56:05 if you mean, "can systemd automatically restart my service when it exits" then the answer it yes, put Restart=always in the [Service] section Jul 13 02:56:15 Oh. Jul 13 02:56:17 Okay. Jul 13 02:56:32 Restart=always! Jul 13 02:57:04 normally it will only restart it if it looks like it crashed, not if it exits normally Jul 13 02:57:12 Oh. Jul 13 02:57:16 That cannot be good. Jul 13 02:57:26 well it makes the most sense Jul 13 02:57:31 Right. Jul 13 02:57:58 oh never mind, the default is Restart=no Jul 13 02:57:58 I exit normally and the server is not available online any longer. Jul 13 02:58:09 Oh. Jul 13 02:59:00 see https://www.freedesktop.org/software/systemd/man/systemd.service.html#Restart= for a full description of that option Jul 13 02:59:23 I have been reviewing that page online, i.e. freedesktop.org. Jul 13 02:59:44 I have found out a bunch of stuff that seems like it would help but you know me. Blah! **** ENDING LOGGING AT Fri Jul 13 03:00:01 2018