Go Down

Topic: Arduino hangs on Bridge.begin() (Read 9300 times) previous topic - next topic

HSpaigu

@jessemonroy650 @alexafa

hi, i meet the same problem and want to try this way, but i dont know how to save and exit?

ps: i use puTTy to ssh to the arduino

jessemonroy650

::::SNIP:::

hi, i meet the same problem and want to try this way, but i dont know how to save and exit?

ps: i use puTTy to ssh to the arduino
@HSpaigu
"Save and exit" what?

Jesse

HSpaigu

@HSpaigu
"Save and exit" what?

Jesse

@jessemonroy650
i meet the problem that the sketch does not run bridge.begin(), at #13,  @alexafa has found a solution, he says need to create a new file K49stop-mcu

but i dont know how to do this.
i ssh into the linux side, go to the directory: /etc/rc.d/
and then type
Code: [Select]

#nano K49stop-mcu

#!/bin/sh

echo 18 > /sys/class/gpio/export
echo "high" > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
echo 18 > /sys/class/gpio/unexport


but after these, the file K49stop-mcu not be created

jessemonroy650

@HSpaigu
okay,
DO NOT create file in /etc/rc.d
CREATE file in /etc/init.d

After create file, chmod 755 stop-mcu;
then make link from rc.d to file. Use ln(1) to make link. Do you know how to do this?

With editor
When using nano, see bottom. You should see ^X Exit
When you press, control-x you should exit editor.
It will ask

Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?

Press button 'y'.
It will ask you to confirm the new name (or current name).
Then do


Any Questions?
Jesse

HSpaigu

@jessemonroy650

thank you!

however the bridge.begin() still not works, the sketch run to the bridge.begin(), then hang on, ive already try many ways, but not work:

1, upgrade to the latest lininoIO
2, remove python-firmata and pyserial
3, change bridge.begin() to bridge.begin(250000)
4, create stop-mcu in /etc/rc.d or /etc/init.d

almost give up, find arduino yun has so many problems

jessemonroy650

@HSpaigu,
Your message are quite unclear. In addition, it appears you have purchased a Yun from Arduino.org. As such, I am going to discontinue this conversation. Please use the forum on Arduino.org

If you are having a problem understanding, please from this forum the recent posts

- Arduino Yún Retirement and Replacement

- @Angelo9999 please consider shutting down this forum channel

- Arduino Yún .CC vs .ORG Compatibility?

Best of Luck
Jesse

novski

#21
Mar 12, 2019, 11:26 am Last Edit: Mar 12, 2019, 11:27 am by novski
Hello!

This is my solution.

Create a new file int '/etc/rc.d/' named 'K49stop-mcu' (Scripts that run at shutdown)

#nano K49stop-mcu

Add this content:

 #!/bin/sh
 
 echo 18 > /sys/class/gpio/export
 echo "high" > /sys/class/gpio/gpio18/direction
 echo 1 > /sys/class/gpio/gpio18/value
 echo 18 > /sys/class/gpio/unexport

Save, exit and change permissions:
    
    chmod 7777 K49stop-mcu

It is done.
----------------------------------------------------
MCU stops before restarting and so the bridge does not fail booting Linino.
this seams logic. for those who feel  like a bit more education cold help: https://unix.stackexchange.com/a/310132

Go Up