I currently have a C script on the Pi that controls a spectrometer (through a USB input) and a servo motor through the GPIO pins on a Raspberry Pi. The program requires a few user inputs, so I need a monitor connected to start the program. However, I may be needing to run this script for a while, so I need to unplug my laptop once the script is running. Right now, when I unplug my laptop, the script stops running, but it is fine to run as long as I ask it to when I keep the laptop hooked up. Any advice on how to remotely run a script that still requires a user input in the terminal window?
You could get the IP address of the Pi using ifconfig and remotely log into it from a different computer and run the script remotely
Use utilities like screen or tmux. They will be available through your package manager.
Related
I am using the USB port of the Raspberry Pi Pico as my debug port when running C programs on the Pico. I have noticed that sometimes when I connect to the Pico USB using Putty in serial port mode, it takes forever (at least 5min) to connect and display the Putty terminal window. I have done the following to eliminate this issue:
Multiple reboots of the Pico before I am able to connect immediately.
Removing Pin configuration and initialization code eg: gpio_init(2); gpio_set_dir(2, GPIO_OUT); and so on. I noticed when doing this I connect immediately. Put this code back and I am back to waiting 5min for Putty to connect or resetting the device multiple times.
Does anybody know why this is happening?
Many Thanks.
I connect to google coral development board using ubuntu terminal with mdt shell command which basically connects via ssh through USB (no wifi required). It has occurred many times that the board disconnects, or becomes unresponsive. Since it happens randomly, I do not know what triggers it and when it will happen, nor can I reproduce it. To confirm, I run mdt devices whenever it happens and it outputs nothing.
Has anyone faced this issue? If yes, what could be the reason and how to deal with it? It will be used for long time demonstration in a fair, so this is a big problem.
Just to confirm, are you running Ubuntu Terminal on Ubuntu OS or Windows running ubuntu terminal?
I had similar issues when I tried doing mdt devices but after I switched to Ubuntu OS, everything worked fine.
Second thing you can try is different cable, maybe the cable is having a lose connection
Let me know if this works.
I am trying to connect my Raspberry pi 3B which has Android Things installed to my PC using the Serial debug cable. I connected it as instructed Here and followed the below steps using PUTTY on Windows 10.
N.B: Same issue is with the Android Emteria version for Raspberry pi 3B.
All I get is an empty console window, which I can't even type into. The device is not seen either in Android studio or using the ADB tool
I am not sure about which Com to use, here's my device manager:
Note
I am able to connect the device using Wifi, and ADB using this command:
adb connect <ip address>
and I install apps normally and they work fine using Android Studio.
Now, I want to make the Serial debug method work, and will it allow me to run my apps from Android studio + see the Logcat logs? Plz review my above mentioned steps and tell me if I am missing something.
From your device manager, it looks like the driver for your serial cable may not be installed correctly.
Assuming you are using the recommended cable from Adafruit, you need to install the proper drivers for Windows. Try downloading the Silicon Labs drivers (http://www.silabs.com/Support%20Documents/Software/CP210x_Windows_Drivers.zip) and installing those. You may need to restart your computer to complete the installation.
Otherwise, if it's a Cypress cable, you may need to update the Cypress UCM Client Peripheral Driver that your device manager is showing an error on. Right click on that and select update driver.
Once your serial cable is installed properly and recognized by Windows, you should be able to connect to your Pi as instructed.
I'm writing some code in C for an IrDA project on one win7 32bit computer. I have another computer setup to display any data received via in infrared. This part works. However the as soon as I connect the IrDA dongle to the PC, it starts to send periodic data for searching other IrDA devices. I want to disable this behavior programmatically so I see only the data sends as a result of my code. Anyone know which command to use? Is it WSASetService? I didn't learn socket programming, not sure what "removes from the registry a service instance within one or more namespaces. " really means. http://msdn.microsoft.com/en-us/library/windows/desktop/ms742211%28v=vs.85%29.aspx
Have you disabled the Infrared Monitor Service manually?
I experienced problems with this functionality in win7 when using Windows to communicating with an embedded micro-controller based device that worked well with windows XP.
I disabled the Infrared Monitor Service manually and found that windows was still polling the IrDA periodically!
I have not found any documentation available that describes it or how to disable it, I will continue searching...
I want to get uImage from windows pc to dm365 based board in uboot boot loader.
Ethernet phy is detected by u-boot.
davinci_eth_phy_detect(), ALIVE = 0x00000002
Ethernet PHY: DP83848 # 0x01
For testing tftp transfer i am disconnecting pc from network and connecting it directly to board.Below configuration i use in the u-boot,
netmask=255.255.255.0
ethaddr=00:0C:0C:0A:FF:EC
ipaddr=192.168.178.156
serverip=192.168.178.129
gatewayip=192.168.178.1
gateway=192.168.178.1
When i ping pc from board ping reports "host is alive"
but i am not able to ping a device from a board.(i dont know if that is required to be done.)
Then i run "tftpd32" on windows pc, i set root/base folder appropriately.
And when i give below command request times out
tftpboot 0x80700000 uImage
When i do same procedure in my colleague's pc, there tftp works fine .
In that pc too ping works one way from board to pc, it doesnt work from pc to board.
I have added tftpd32 utility in allowed program list in windows firewall,
What could be a problem ? any suggestions ??
It was very silly thing which i had missed, When i connect the device to the pc using ethernet cable it was detected as unknown network, and tftpd32 was present in allowed program list in windows firewall but there were three check-boxes for tftpd32(infect for every program there are 3 check-boxes).
1. Domain
2. Home/Work(private)
3. Public
and only 1st one was selected for tftpd32, i checked all three check boxes and it started working :)
It is not that great question to put it on stackoverflow but at times one doesnt find solutions to small problems easily so i am not deleting this question. Hope it helps others too. If anybody feels this is not required to keep on stackoverflow i(or admin) can delete it.
Regards, Ankur