This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setup without Mouse/Keyboard/Screen
#11
Hello friends
Besides the hit generated, I'm in a very similar condition. I'm struggling to connect, but I'm getting nervous to go back an forward to the TV-set to see/arrange some result.
IN certain case I'm able to browse the file system with my laptop, just to modify some file, if needed.
.
My actual situation is that I have my smartphone used as access point, so TB and my computer can connect to that.
At the first I could arrange NetworkManager to connect to AP and automatically reconnect at boot time.

I've tried to come to a setup according to this, but if I try, I'll get
Code:
$ ssh linaro@tinker -pXXXX        # arbitrarily hidden port number
ssh: connect to host tinker port XXXX: Connection refused
Of course I recorded the IP Tinker address in my /etc/hosts Wink
I'm trying to use RSA keys and perhaps no password, but still a bit hard to achieve Sad

So I'd like to arrange TB as access point and to connect IPcam, one HDD and some relays for a small Home automation Wink. But it is a bit frustrating that I can get it over a SSH.
Reply
#12
(07-20-2018, 05:44 PM)Im4Tinker Wrote: Hello friends
Besides the hit generated, I'm in a very similar condition. I'm struggling to connect, but I'm getting nervous to go back an forward to the TV-set to see/arrange some result.
IN certain case I'm able to browse the file system with my laptop, just to modify some file, if needed.
.
My actual situation is that I have my smartphone used as access point, so  TB and my computer can connect to that.
At the first I could arrange NetworkManager to connect to AP and automatically reconnect at boot time.

I've tried to come to a setup according to this, but if I try, I'll get
Code:
$ ssh linaro@tinker -pXXXX        # arbitrarily hidden port number
ssh: connect to host tinker port XXXX: Connection refused
Of course I recorded the IP Tinker address in my /etc/hosts Wink
I'm trying to use RSA keys and perhaps no password, but still a bit hard to achieve Sad

So I'd like to arrange TB as access point and to connect IPcam, one HDD and some relays for a small Home automation Wink. But it is a bit frustrating that I can get it over a SSH.



Here is what I have for SSH.  Maybe you can use it.


SSH setup steps:    use cellphone with SSH to access tinkerOS terminal commands, if USB System is unaccessable.
1. Check the IP address of your tinker board via router admin page. (If you don't know, google it.)
2. Then use any terminal to ssh thing. Putty on Windows system, built-in terminal on Mac, built-in terminal on Linux. Termius on iPhone or Android phone.
3. Mac for example, SSH to your tinker board by using "ssh linaro@192.168.1.x". Here 192.168.1.x is the IP address of tinker board. Input password when it prompt.
4. On cellphone install Termius.
Create a new host. Your device has to be connected to the same network as your tinker board.
Alias: whatevernameyouwant
Hostname: 192.168.1.x (your tinker board IP address here)
Group: leave it blank
Tags: leave it blank
User SSH: toggle on
Port: leave it as 22 if you didn't change it
Username: linaro
Password: your password (default is linaro)
Key: leave it blank
Use Mosh: toggle off
Tap save if all info is right. Then tap the newly created host. It will connect if IP, username, password are right. Don't use something like local terminal, it's a simulated one maybe and without ssh built-in. I'm using iOS version. There's no local terminal.
5. After it logs in, you can do stuff like apt-get update and upgrade etc.
   If usb is disabled, execute this in the cell phone:  sudo apt --fix-broken install
Reply
#13
Thank you for your kind support.
I found the problem, let's say that shouldn't be expected. The ssh daemon doesn't start at boot time.
Now I'm finally logged in, but I scare that when I'll restart the TB I'll fall into the same problem.
I was devoured by mosquitoes trying to fix this damn problem  Huh Huh

I'm rather rusty to use sysV style to start the daemons. I was hands-on about debian 12 years ago. Although it is quite a farce, behind this, now there is systemd, then I failed to set up the service by issuing the command
Code:
$ sudo systemctl enable ssh
So using sudo sysv-rc-conf now it shows that is ready to run by the level 2
Reply
#14
(01-04-2018, 03:38 PM)will2learn Wrote: No way, If you want to setup first with no screen/keyboard.  How can you connect the wireless to your network?  No way impossible.

Maybe my answer comes out of date.

Sorry I don't subscribe this point of view Smile
My POV is from a maker, which might have already a basic knowledge on dealing with hardware and installations. though we may be ignorant at certain point Smile
Definitely a maker is not keen to get Mouse/Keyboard/Screen just for a couple of simple operations, like connect to an AP and start the ssh service.
 
There might be a way, like to set up the installation which is ethernet ready, perhaps like an IPcam Wink. That way it requires a static IP, which is given to know to whom is going to run the first setup (same as for the passwords)

A second way might be to set up a dhcp server (or this) and get the tinkerboard IP once it gets connected.

After that, everything would be available through ssh service. Even the configuration to connect the home router via mncli or nmtui (for who knows a little about NeworkManager CLI commands)

Just for my curiosity, I'll spend some time  to try this concept out Wink
Reply
#15
Okay thanks to everyone here for their help.

What worked for me was:
1) Putting a old SIM card in my LG G6 (To enable USB tethering, dont actually need internet).
2) Plugging in USB and enabling USB Tethering
3) Installing Termux on Android
4) At Termux I was able to find the IP for the TinkerBoard like this:

# android uses this subnet 192.168.42.
# Run this code

```
IP_RANGE="192.168.42."
rm ping.log
COMMAND=""
for i in {1..255}; do COMMAND="$COMMAND ping -c 1 $IP_RANGE$i >> ping.log &"; done
COMMAND="$COMMAND& fg"
eval $COMMAND
wait
cat ping.log | grep -C 1 '1 received'
```
You will see the IPs which responded to the ping and one of the two will be the device.
Then I used JuiceSSH to log in:
192.168.42.x
user:linaro pw:linaro

After that, I made a script which enables WiFi.

Put this in a file called setwifi.sh
Dont forget chmod +x setwifi.sh for executable permissions
Then you can run it like:
$ sudo su
$ ./setwifi.sh wifiname wifipassword

```
WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf"

if [[ -z "$1" ]]; then
echo 'First param SSID';
else
if [[ -z "$2" ]]; then
echo 'Second param password';
else
wpa_passphrase $1 $2 > $WPA_SUPPLICANT_CONF
ip link set wlan0 down
ip link set wlan0 up
wpa_supplicant -B -iwlan0 -c $WPA_SUPPLICANT_CONF -Dwext
dhclient wlan0
ip4=$(/sbin/ip -o -4 addr list wlan0 | awk '{print $4}' | cut -d/ -f1)
echo "WiFi Configured for $1"
echo "Host IP: $ip4"
fi
fi
```

It will echo out the IP and you can go to your laptop and SSH in properly!
Voila!

Now I just need to get the WiFi to stay on reboot.

Okay iv made some improvements, adding this file will make it work on reboot:
https://raspberrypi.stackexchange.com/qu...s-pi/57023

I have updated my script below to do this automatically.

If you have these in a text file on your Android phone you can copy and paste them into both Termux and the SSH Client and just hit paste and your up and running in a few seconds which is pretty awesome.

Next problem... Anyone know why it takes ab out 1.5 minutes to connect to WiFi after hitting "shutdown -r -t now". The boot sequence to screen is pretty quick, seems to take a long time to connect and for SSH to work.

```
#!/bin/bash

# run as root

WPA_SUPPLICANT_CONF="/etc/wpa_supplicant/wpa_supplicant.conf"

INTERFACE_FILE="auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam $WPA_SUPPLICANT_CONF
post-up ifdown eth0
iface default inet dhcp"

if [[ -z "$1" ]]; then
echo 'First param SSID';
else
if [[ -z "$2" ]]; then
echo 'Second param password';
else
wpa_passphrase $1 $2 > $WPA_SUPPLICANT_CONF
ip link set wlan0 down
ip link set wlan0 up
wpa_supplicant -B -iwlan0 -c $WPA_SUPPLICANT_CONF -Dwext
dhclient wlan0
ip4=$(/sbin/ip -o -4 addr list wlan0 | awk '{print $4}' | cut -d/ -f1)
echo "WiFi Configured for $1"
echo "$INTERFACE_FILE" > /etc/network/interfaces.d/wlan0
echo "Host IP: $ip4"
fi
fi
```
Reply
#16
I installed TinkerOS, but it is going nowhere, without seeing and handling what is coming up.
You mentioning ssh server. I found there's no way to connect to TB, prior entering the OS and set up a WiFi connection, nor the wire one. Furthermore the sshd service must be started within the OS.

To prove what I'm telling. I re-install  the OS a couple of times. But I didn't find no WiFi, nor ssh ready.

I do believe that the developers should do a little effort to add a dnsmasq enabled for DHCP, to have the sshd.service started at boot time and to set an access point for the WiFi. Otherwise a static IP for the ethernet.

Who just like to start as usual will go to the NetworkManager configuration and change for a normal setting.
Reply
#17
(07-25-2018, 06:00 AM)Im4Tinker Wrote: You mentioning ssh server. I found there's non way to connect to TB, prior entering the OS and set up a WiFi connection, nor the wire one. Furthermore the sshd service must be started within the OS.

To prove what I'm telling. I re-install  the OS a couple of times. But I didn't find no WiFi, nor ssh ready.

SSH is set to autostart on current TinkerOS, and I think it's been on every version. 

WiFi won't autoconnect to anything before you configure it, see below:

If you connect the ethernet cable, you can find it's IP address and then SSH into it to configure it.
Find it's IP address using e.g. FING app on iOS/android.

Once in SSH (linaro/linaro) you can edit the file /etc/wpa_supplicant/wpa_supplicant.conf to setup wifi:
Code:
sudo nano /etc/wpa_wupplicant/wpa_supplicant.conf

add this at the end: 

Code:
network={
   ssd="yourssid"
   psk="yourpassword"
   }

then save and reboot and it will autoconnect to your wifi.

add the following to connect to ANY unsecured open wifi:

Code:
network={
   key_mgmt=NONE
   priority=-999
   }

The priority bit just means connect to your own wifi in preference to an open one.
Reply
#18
(01-04-2018, 03:38 PM)will2learn Wrote: SSH is set to autostart on current TinkerOS, and I think it's been on every version.
My apologize to everyone here, I was wrong. Today I discover what has been set up in theTinkerOS. My suppositions were to find a service running, but there's a socket instead. The latter differs from the former that it spawns on demand.

will2learn Wrote:WiFi won't autoconnect to anything before you configure it, see below:

I don't agree about it. There might be a setup to make TB as access point. Simple, doesn't it ?
will2learn Wrote:If you connect the ethernet cable, you can find it's IP address and then SSH into it to configure it.
Find it's IP address using e.g. FING app on iOS/android.
I think. Anyway it is probably a lengthy procedure. Imagine to scan all 192.168.x.x an 10.0.x.x for 2^15 ports. It could be something like 2^33 times, at its least.

I'm trying fing

Code:
01:06:12 > Discovery round completed in 46.483 seconds.
01:06:12 > Network 192.168.0.0/24 has 0/0 hosts up.
They forgotten to set a static IP Cry or a DHCP server,  That's the joke.
It is all, but discouraging to use any kind of shell.

will2learn Wrote:Once in SSH (linaro/linaro) you can edit the file /etc/wpa_supplicant/wpa_supplicant.conf to setup wifi:
About this, I got  the knowledge to go for it Big Grin
But even simpler to invoke nmtui and make the wanted connection. Wink
Reply
#19
(01-04-2018, 10:45 PM)will2learn Wrote:
(01-04-2018, 06:06 PM)Jay Smith Wrote:
(01-04-2018, 04:37 PM)will2learn Wrote: Thanks Jay Smith.

So I knew about Tethering, I knew about SSH... but I did not know you could SSH into a device which is using tethering.  I got the IP address and was able to SSH into it.  Thanks for that missing link.  So I am able to SSH into the Tinker Box, and I assume I will now be able to configure wireless and enable VNC to access the device from my main PC.

Thanks a lot.  I am looking forward to seeing how this box compares to the Pi 3.
William

Please let us know what you find.

I finally managed to get it working.  My system was a bare Tinker Board (TB), no keyboard, no monitor, no mouse.  I had only one network cable.  Using the settings below, I was able to use my PC to VNC into the booted TinkerOS system and browse the web.  For anyone having difficulty and with limited hardware to achieve this, I include my instructions below.

My setup instructions are as follows:
Prerequisites:
a.) make sure wpasupplicant is installed: "apt-get install wpasupplicant" (without quotes)
b.) VNC server is installed and ready (this is fairly lengthy, but can easily be googled using something like "install VNC Debian").  To enable it, type: "vncserver".

1.) I used a mobile phone (a Samsung S7 running Android, with no internet capability) to create a Tethered connection over USB to the TB.  Once there, I used the Android app JuiceSSH to connect to the command line (U: linaro, P: linaro).  It is worth noting here that to run certain commands, root access is needed, which is achieved via typing the following on the command line: "sudo su -".  To find the IP address which the tethered connection assigned to the TB, I ran the Android app "Network Scanner".  I used this IP address in JuiceSSH to connect to the TB over SSH.

2.)  I created a hash string of the wireless network passphrase using the following command (without quotes): "wpa_passphrase MyNetworkName MyNetworkPassphrase".  

The output is as follows:
network={
        ssid="MyNetworkName"
        #psk="MyNetworkPassphrase"
        psk=MyNetworkPassphraseHashString
}

You must copy the value of MyNetworkPassphraseHashString, i.e. everything after "psk=".  It will be used in the next step.

3.)  I modified the following file: /etc/wpa_supplicant/wpa_supplicant.conf to include the following:
update_config=1
country=US
network={
        ssid="MyNetworkName"
        psk=MyNetworkPassphraseHashString
}

Note that MyNetworkPassphraseHashString is not enclosed in quotes, whereas the SSID value is.

4.)  Using the command "ip link show wlan0", I was able to get the following:
4: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DORMANT group default qlen 1000
    link/ether f0:03:8c:63:0c:bd brd ff:ff:ff:ff:ff:ff

The string "BROADCAST,MULTICAST,UP,LOWER_UP" tells me the network is up.

5.)  The command "sudo ip link set wlan0 up" turns it on if it was not already (if the previous point showed it was DOWN and not UP).  Run the command in point 4 to make sure it is up.

6.)  The following command is optional to see any networks that are available: "sudo /sbin/iw wlan0 scan"

7.)  Run this command to tell wpa_supplicant to read the updated config file: "sudo wpa_supplicant -B -D wext -i wlan0 -c /etc/wpa_supplicant.conf".

8.)  Lastly, to view the connection, try this: "/sbin/iw wlan0 link".

9.)  Make sure VNC is running: "vncserver" - it may ask you to set a password for accessing the device over VNC.


This means that Wifi should now be up and running.  You may need to reboot the TB.  I also disconnected the tethering cable for this stage, but that is not necessary I think.  Using the Android App "Network Scanner" you should be able to see the new IP address of the TB.  Just set up the PC version of VNC, enter that IP address and possibly provide the following suffix: ":5901", e.g. "192.168.137.180:5901".

This setup worked for me.  I mostly edited the files in Nano or Vi.  If Nano, you will first need to install that using "sudo apt-get install nano".

Note: I did play around with editing /etc/network/interfaces, but ultimately found this unnecessary.  Also, another user created a useful utility - I was not able to use this to get the wifi to work, but maybe others can:
$ wget https://raw.githubusercontent.com/mikerr...ker-config
$ sudo sh tinker-config

I hope I did not leave out any steps.  Any questions, then please ask away.
William

I tried this method. Now everytime I reboot my tinkerboard, I need to login using password on my vnc user. I cannot login in my Main user though. Any fix? thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)