General question, but I assume I used 'localhost' as they are on the same wireless network, is that correct? When do you use an IP address instead?
-
udpsend and receive
-
@toddak Hmm, I can't help you with Vanilla (for OSC).... I have never used it.... sorry.
I assume you have fixed the ip of the pi so you know it and it will not change.
You have given [netsend 1] the message [connect 192.168.1.20 9001( which will connect to that address (change it to your Pi address of course) and port over udp? (Of course it will not "connect" because it is not TCP, but it will "send"!.)
And you have created [netreceive 9001] on the Pi (or the other way around?
That should work........ they are vanilla objects....
Have you checked that you can see the computer and the Pi on your network.......... install the App "Network Analyzer Lite" (free of course) on your Ipad............
David. -
@whale-av
And I think we have found the problem, I have never assigned an IP address on my pi. Well, I have never assigned an IP address ever.So that's what I need?
-
(And unfortunately I can't install network analyzer lite as I refuse to upgrade the iOS on my older ipad, it seems to be like a form of [programmed obsolescence' to slow things down...'
-
@toddak Ok......... I have never tried those objects before........ and [netsend 1] I cannot make work for the moment..........
However are two test patches that I now know will work..........
test.zip ((UPDATED))
........ ok........ ip address stuff arriving here asap.........
..... but if you have put Jessie on the Pi I think you can just configure it through a friendly config window......... Give it a fixed address........ then you will always know which one of the four it is when you talk to it.......
Here are some notes about setting up the Ip but if there is actually a wireless setup menu in the desktop menu......... use that........
text.zip
David. -
@whale-av Thanks for the test patches! Will try them out once this IP address process is sorted.
It does make sense, again, excuse my ignorence as I I've basically never done networking before (apart form connecting an ipad/lemur to max/msp). But it would also make sense that you need this for VNC.
Started on a tutorial but will wait for your instructions instead!
-
@whale-av I used the network preferences tab and assigned an IP address of 10.50.50.1 to the Wlan0 interface, thought it might be easier as you said to use the GUI at this point in time (easier to reverse). I then tried to connect to it using [connect 10.50.50.1 3001], but I got the same error message.
I downloaded another network scanning app, and ran it out of curiousity, and the pi did not show up. Thinking I may have done something wrong, I cleared the settings in the network preferences tab, then ran 'sudo ifconfig' and checked the assigned IP address for Wlan0, which was 10.1.1.8.
I then ran the network app again, and it found the other devices in my house (conveniently all apple), and double checked to see if any had the IP address of 10.1.1.8, and none did.
The pi can connect to the internet via network its connected to, but weirdly can't be seen. Any ideas?
-
@toddak Yes, it is not on the same subnet (maybe).........
What are the addresses of the other computers in the house?
They have fixed addresses?....... unlikely.... probably been assigned by dhcp...
David. -
They are:
10.1.1.2
10.1.1.3
10.1.1.5
10.1.1.9The only one that may have been fixed is my laptop, but I can't honestly remember.
-
@toddak Ok....... I just booted in to osx for a moment to check that I can see my Pi from there. It didn't pop up straight away but I could ping it and then it showed up in finder/go/ smb//:
(because I have a samba share/nas running on it).So the 10.1.1.8 address would be fine, but if you can fix it then maybe make it 10.1.1.101 (for later) and the others 102, 103, 104........... easy to remember!
The 10.50.50.x is a different subnet and your router will think it is somewhere that it can't talk to.....
So leave it as 10.1.1.8 for now and try to ping it from terminal..........
In Utilities / terminal on your mac..
ping 10.1.1.8
and you should see numbers coming in for how long the pi takes to respond?
David.
Run............. sudo chmod 4755 /usr/bin/pd-extended ............again in case it is a permissions thing...
BUT its not extended is it......... you will have to google that!
Reboot it maybe ( sudo reboot will do that "softly"...... better than unplugging)...
sorry, off to bed now. -
Well, that helped a lot, thanks!
So I got it to work using that IP address, and the test patches you sent me. WOO!
Then found a tutorial about manually configuring IP addresses, as that area of the GUI wasn't giving me much like. I edited my /etc/network/interfaces file and managed to set the static address of 10.1.1.101. And got it all to work again. WOO!
But... small issue is that I think I need to add a line to the interfaces file, as the pi doesn't automatically connect to the network now. It just keeps scanning up and doesn't actually settle on a network. When I select my network from the options and type in the password again, it works fine. The wpa_supplicant.conf file still has the network name and password in it, which makes me think its the interfaces file instead.
And its PD 0.46.2. I'm no longer sure if this means its extended or vanilla... brain fried...
Will post it below:
-
GNU nano 2.2.6 File: /etc/network/interfaces
interfaces(5) file used by ifup(8) and ifdown(8)
Please note that this file is written to be used with dhcpcd
For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopbackiface eth0 inet manual
#allow-hotplug wlan0
#iface wlan0 inet manual
#wpa-conf /etc/wpa_supplicant/wpa_supplicant.confallow-hotplug wlan0
iface wlan0 inet staticaddress 10.1.1.101
netmask 255.255.255.0
network 10.1.1.0
broadcast 10.1.1.255
gateway 10.1.1.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.confallow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf -
I've also been trying to figure out how to send two different values via the one netsend, but can't seem to figure it out. I assume its some combination of [pack] / [unpack], is that right? Or is this where [oscparse] and [oscformat] come in?
I'm a little confused by those objects, and to be honest after about 6 hours straight this I think I need to stop for a bit... but does the [oscformat] object essentially add the osc address (or name) to the front of a value before its sent?
and is [oscparse] a bit like a routing object (or route in Max/msp) to unpack them at the other end?
-
@toddak Phew...... finally a connection.
We can try to break it in a minute.
Yes, you have installed a very recent Vanilla... not extended.I don't know the osc vanilla objects at all...... but @alexandros has sent you some help below!
OSC messages are just messages like "page1/fader3 0.2345" but they are sent as a string of data and the [packOSC] and presumably the [oscformat] objects will do that conversion.
Then [oscparse] will break up the message according to (and removing) the forward slashes.....
That can be done in a number of ways in extended without using osc objects at all but........ ..Right-click [oscformat] for help...... the same goes for all objects.
Yes for [netsend] and [netrecieve] you can give your message a "header" like "param1" "param2".
Pure data works with lists, and adding a header has made the message into a list. If you attach a print object to the outlet of something you will see what messages are passing through. So if you send messages that are "lists"....... "param1 0.5" param2 0.75" and you send them to [route param1 param2] you will see your messages 0.5 and 0.75 drop out of the relevant outlets (it creates an outlet for every argument + one for any list that doesn't match).....So........ aargh........ networking
http://manual.aptosid.com/en/inet-setup-en.htm is a reasonably good explanation from someone else in Melbourne, although a little complicated, but then it's never easy!.
Always make a backup before you change things......
and then try this. It should boot to your network every time (the wifi dongle must be plugged in at boot) and it should give you the same address on the ethernet connection if the wireless is not working..... AND....... it should try to reconnect to your network if it loses the connection.
If you cannot make it work with wpa-roam then change that to wpa-conf for now.
wpa-roam is what will allow your pi to reconnect if the connection is lost.
pi ip conf.txt
David. -
Just a demo patch showing how to use [oscformat] and [oscparse]. The arguments of [netsend] and [netreceive] (-u -b) stand for a UDP connection and binary format, respectively. -b is necessary for [oscformat] and [oscparse]. If you need a TCP connection then just omit the first argument in both [netsend] and [netreceive].
The message to [netsend] should contain the receiver's IP instead of "localhost".
oscformat_parse_usage.pd -
Haven't followed the whole of this conversation, but what I've understood is that you're trying to connect to a wireless network, right? Do you use a wireless dongle or something? Cause I think the Pi doesn't have wireless, or does it?
Anyway, since both your computer and the Pi are in the same network, you can run a script on the Pi's side to get it's IP and send that over to your computer, if setting a fixed IP is a problem. Actually you can use [shell] to get the IP of the Pi without using a script.
Put the following line in a message:
ip addr list wlan0 | grep "inet " | cut -d' ' -f6 | cut -d/ -f1
and send that message to [shell] and it will output the IP of the wireless from its left outlet. If you know your computer's IP (which should probably be fixed for such a project) you can have that hard coded in the patch running in the Pi and send the output of [shell] to [netsend] via [oscformat]. Then in your computer you can have the incoming IP go through a [symbol] and from there to the following message:
connect $1 9001
taken that the port your computer will send data to the Pi is 9001. Anyway, you get the idea. This way your computer will get connected to the Pi. -
@whale-av Sorry for the break in communication. had some other trouble shooting happening. My modem, the linkysys WRT45GL arrived, so I thought I should set that up then proceed with all the IP work so that its all working off the router it will be using. But for some reason I can't seem to connect to the router using its IP address (192.168.1.1) and safari. The reset button on the back does nothing either. I know this isn't a modem forum, but thought it was worth mentioning as you had a similar model.
So, for that reason I haven't pursued the static IP addresses further, although I'll start booting all the pis up with PD in the mean time, and should the modem not be sorted, will proceed with the IPs. Thanks for the links, and for the txt file, it does make sense and will try it shortly.
Also, thanks for explaining that PD is list based, that I didn't know, and seems to be a big difference between it and max. Max still uses lists, just in a different way.
@alexandros That patch does make a lot of sense, but is there any chance you could show me a version that sends/recieves two different values from two different sources? (Like a volume 1 and volume 2 scenario). I'm just trying to figure out how to send multiple items at the moment, and unsure as to how to package that into a list.
That's an interesting work around for the IP address issue, and good to know about [shell]. Yes, mainly connecting pi's to pi's, but maybe a computer at a later date. They don't have wifi, so yes, a dongle is used on all of them.
-
@toddak Tehe..... routers as well.....
First, a question that I should not ask...... but I have to....... Have you "joined" the new routers' network before trying to access it. It cannot "join" your home network.... sorry to ask....... but it is a completely new and separate network!........
Probably definitely best to do a total reset of the Linksys (especially as you cannot talk to it and you have no idea how it was set up by the previous owner).
Power it up and press the reset for 30 seconds and keep it pressed while unplugging the power.
Now keep it pressed for 30 seconds and keep it pressed still for another 30 seconds after you plug the power again. Now it is "factory reset"
It's address will be 192.168.1.1 OR 192.168.0.1
It will pop up as the network "Linksys".
Its username when you get to the login is just blank..... no user name, and
the password is: admin
If that doesn't work you will have to google a bit.Here is how you can send more parameters over [netsend]. I recommend [netsend 1] as tcp can crash Pd if the connection is broken. udp does not actually make a "connection". It just broadcasts to only one port at one ip address, so if the information is not received it doesn't know and doesn't care. It is safer (for Pd).
send x2.zipYou can add as many list headers (like the "param1") as you need, or change them to "whatever".
Osc is not "special" but works in exactly the same way. Header "paths" for osc are slash delimited........ more about that later if you need it! But you only need osc if you are planning to use external controllers (like TouchOSC) or send to things that require an osc message.................
David.
-
There you go osc_deep_address.pd
The address /volume/1 doesn't work because of some strange behavior of [route] that I can't understand. But /volume/one works fine. -
@whale-av Next I'll be asking you to help me move house :P
But thanks, that actually worked a lot better than the other reset I found! And it seems to be working so far, just need to set it up and save changes, but I should be ok. Sorry for the delay, been sick, but will hopefully get this up and running over the next few days!!@alexandros
Is it possibly numbers in the address that freak it out a bit? Anyway, mega thanks for that patch, that definitely makes the routing a lot clearer to me.