Is there any way to connect my spark core to a wi-fi ( which requires proxy to connect ) or to set the proxy in my spark core to connect my core with wi-fi ??
@prashuk, a proxy appears to your core like a gateway. Your DHCP server should be passing that information to the core when it gets the IP. Is this what you meant?
i assume by proxy the op means like a corporate http proxy, or your average internet cafe login page kind of thing. you’re not going to get socks on the spark for certain
@sej7278, that’s what my question was leading to and you are quite correct. Hopefully, he will clarify
Do you guys know if it would be possible to connect to the internet through the USB? That would make coding in coffee shops possible because then all we would need is a laptop that can connect, right? Sorry if this is way off the mark.
@Catalyst, you cannot connect to the internet via USB. You can, however, use your phone as a wifi hotspot while it is connected to the internet via your At&T or whatever. Then your Spark connects to that hotspot.
yes !! By proxy i mean just like a corporate http/https proxy to access the internet.
By setting the proxy in the network settings (LAN settings ) and providing username and password …then only internet access is allowed.
Right now i am using my mobile as hotspot to connect my core but i am unable to connect the core to my college wi-fi as it works on proxy- server.
@prashuk, the Spark cannot handle the type of domain/user authentication (username/password) required by your proxy.
I also have similar firewall in my institute. the work around I have planned is to buy a wi-fi router and connect that wifi router to ethernet. The wi-fi router will take care of proxy address. Can Spark Core handle this?
To sum up: Spark Core (192.168.x.x) -> Wi-fi router -> core network switch/ firewall (10.x.x.x) -> Internet
Will this work???
News on this?
My proxy server don’t require (username/password) but requires to setup proxy in network settings. SO Will I need to hard code it or core will get that information during handshake when its getting the ip. (Sorry I don’t have the photon right now hence asking)
From a duplicate topic, edit by @moors7:
For using my college wifi, I need to set the proxy on my laptop like (10.x.abc.pqr) . How can I do that thing with spark core? Will it do this automatically for me or What should I do?
So I wanted to ask if there is any extra library I can use or something for proxy.
@alok, as long as your DHCP server has the correct gateway configuration, then it should work. Often though, a home router is setup to be the DHCP server and it sets the DHCP gateway to its own IP. Bottom line - check you DHCP configuration.
There was some proof-of-concept work done on setting a static IP on the Core:
I’m not sure if this is the most ideal solution or not, but it may prove to be an easy one; Xiaomi makes these tiny USB wifi routers. If you plug them into your computer, you can share its internet connection over a newly created WiFi hotspot. It’s not going to be a solution if you’re planning on having a Core in a permanent setup, but for developing on networks like that, it might be useful. You can get 'em on dealextreme for a couple of dollars, over here. I have one in the mail right now, and I’ll report back when it’s here
If the proxy doesn’t need authentication then it might be possible to code a tcp client on the Core to make use of the http proxy. I’d have to check, but off the top of my head it’s usually something like setting the destination IP to that of the proxy and setting the HTTP Host header to where you actually want to go.
However, from what I’ve read in this forum, it looks like Core also needs a tcp connection to the Spark Cloud on port 5683 using its enhanced COAP protocol. A secure corporate network typically won’t allow communications out to the internet unless it’s either it goes via their HTTP proxy, so that it can be intercepted and checked, or to a specific set of known destinations. The COAP comms won’t be routed via the HTTP proxy, and if it was it wouldn’t be able to make sense of the encrypted COAP so should be dropped by the proxy. If you’ve coded your Core to run off-Cloud then these comms wouldn’t be needed so there’s a possibility that it would work as per para-1.
[In the case where corporate comms uses a captive portal to authenticate and then allow all ports, it wouldn’t work in this case because the Core wouldn’t be able to easily perform the aurhentication]
Looks to me like the easiest way is to tether to a mobile phone hotspot.